Compare commits

..

No commits in common. "acca3a4666ae2d82a86a916d3be1aa002582eb8f" and "439a211e013977638490483ffd6b82de640dbf50" have entirely different histories.

View File

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