geom_parcel_improvements #384

Merged
mpeltriaux merged 8 commits from geom_parcel_improvements into master 2024-02-16 08:44:39 +01:00
Showing only changes of commit 4f02bf1da2 - Show all commits

View File

@ -101,7 +101,7 @@ class SimpleGeomForm(BaseForm):
is_valid &= False
return is_valid
is_valid &= self.__is_size_valid(g)
is_valid &= self.__is_area_valid(g)
polygon = Polygon.from_ewkt(g.ewkt)
is_valid &= polygon.valid
@ -139,8 +139,8 @@ class SimpleGeomForm(BaseForm):
return num_vertices <= GEOM_MAX_VERTICES
def __is_size_valid(self, geom: gdal.OGRGeometry):
""" Checks whether the number of vertices in the geometry is not too high
def __is_area_valid(self, geom: gdal.OGRGeometry):
""" Checks whether the area is at least > 1m²
Returns: