master #449

Merged
mpeltriaux merged 2 commits from master into Docker 2024-11-13 16:09:50 +01:00

View File

@ -48,11 +48,14 @@ class Command(BaseKonovaCommand):
"geometry__id",
flat=True
)
# ... and resolve into Geometry objects again ...
intersected_geom_objs = Geometry.objects.filter(
id__in=geom_with_intersection_ids
)
# Filter those geometries out (they have intersections and do not need to be processed)
geometry_objects = geometry_objects.difference(intersected_geom_objs)
# ... to be able to use the way more efficient difference() function ...
geometry_objects_ids = geometry_objects.difference(intersected_geom_objs).values_list("id", flat=True)
# ... so we can resolve these into proper Geometry objects again for further annotation usage
geometry_objects = Geometry.objects.filter(id__in=geometry_objects_ids)
self._write_warning("=== Update parcels and districts ===")
# Order geometries by size to process smaller once at first