Constrain selections to active work areas
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-17 12:58:38 +02:00
parent a29c787238
commit d652db6a1e
20 changed files with 329 additions and 71 deletions
+12 -6
View File
@@ -227,14 +227,20 @@ class ExportService:
area = db.get(Area, area_id)
if not area or area.project_id != dataset.project_id:
raise AppError(code="AREA_NOT_FOUND", message="Area not found", status_code=404)
full_dataset_area = VectorFeatureService.can_use_full_area_fast_path(dataset, area.id)
preclipped_partition_filter = (
None
if full_dataset_area
else VectorFeatureService.preclipped_partition_filter(dataset, getattr(area, "name", None))
selection_geometry, covers_full_area = VectorFeatureService.constrain_bbox_to_area(
bbox,
area.geometry,
)
full_dataset_area = covers_full_area and VectorFeatureService.can_use_full_area_fast_path(
dataset,
area.id,
)
preclipped_partition_filter = VectorFeatureService.preclipped_partition_filter(
dataset,
getattr(area, "name", None),
)
selection_kwargs.update(
selection_geometry=area.geometry,
selection_geometry=selection_geometry,
selection_area_id=area.id,
full_dataset_area=full_dataset_area,
preclipped_partition_filter=preclipped_partition_filter,