Persist map area selection exports
This commit is contained in:
+23
-2
@@ -1013,6 +1013,24 @@ Dataset vector export request:
|
||||
}
|
||||
```
|
||||
|
||||
Map vector selection export request:
|
||||
|
||||
```json
|
||||
{
|
||||
"export_kind": "vector_selection",
|
||||
"dataset_id": "uuid",
|
||||
"bbox": {
|
||||
"min_x": 5.0,
|
||||
"min_y": 51.0,
|
||||
"max_x": 5.1,
|
||||
"max_y": 51.1,
|
||||
"crs": "EPSG:4326"
|
||||
},
|
||||
"limit": 250,
|
||||
"name": "optional-basename"
|
||||
}
|
||||
```
|
||||
|
||||
Detection run export request:
|
||||
|
||||
```json
|
||||
@@ -1050,8 +1068,11 @@ Response persists an `exports` row and writes a deterministic JSON artifact:
|
||||
|
||||
Vector dataset exports use the stored dataset GeoJSON. Detection and
|
||||
segmentation exports use persisted first-class geometry records and the
|
||||
existing Detection/Segmentation GeoJSON conversion services. Raster datasets
|
||||
are rejected for dataset GeoJSON export.
|
||||
existing Detection/Segmentation GeoJSON conversion services. Vector selection
|
||||
exports query persisted PostGIS `vector_features` with the supplied EPSG:4326
|
||||
bbox, write the selected FeatureCollection as a `vector_selection_geojson`
|
||||
artifact, and persist bbox/feature-count metadata in the export record. Raster
|
||||
datasets are rejected for dataset and selection GeoJSON export.
|
||||
|
||||
### POST `/api/v1/exports/metadata`
|
||||
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
## Sprint 107 Map selection export handoff (2026-06-25)
|
||||
|
||||
Changed:
|
||||
- Added `vector_selection` to the GeoJSON export contract.
|
||||
- Added `ExportService.export_vector_selection_geojson`, which queries persisted PostGIS `vector_features` through `VectorFeatureService.select_features_by_bbox`, writes the selected FeatureCollection and persists an `exports` row with `export_type="vector_selection_geojson"`.
|
||||
- Extended `POST /api/v1/exports/geojson` to accept `export_kind="vector_selection"` with EPSG:4326 bbox and feature limit.
|
||||
- Added frontend export API typing for bbox/limit and `useExportWorkflow.exportMapSelectionGeoJson`.
|
||||
- Added `Save area export` to the Map workspace selection result state with loading/error/latest-path feedback.
|
||||
- Updated `docs/API_CONTRACTS.md`, `backend/README.md`, `frontend/README.md`, `CHANGELOG.md` and `docs/TODO.md`.
|
||||
- Added regression coverage in `backend/tests/test_sprint107_map_selection_export.py`.
|
||||
|
||||
Validation:
|
||||
- RED: `python -m pytest backend\tests\test_sprint107_map_selection_export.py -q` failed before implementation because the selection export service, route contract and frontend wiring were absent.
|
||||
- `python -m pytest backend\tests\test_sprint107_map_selection_export.py -q` passed: 3 tests.
|
||||
- `python -m compileall backend/app` passed.
|
||||
- `cd backend && python -m pytest -q` passed: 341 tests.
|
||||
- `cd frontend && npm run typecheck` passed.
|
||||
- `cd frontend && npm run build` passed.
|
||||
- `cd backend && python -m alembic heads` passed: `202606120900 (head)`.
|
||||
- `cd backend && python -m alembic upgrade head --sql` passed.
|
||||
- `bash -n scripts/live_migration_smoke.sh` passed.
|
||||
- `bash scripts/run_readiness_check.sh` passed.
|
||||
|
||||
Limitations:
|
||||
- Selection exports are bbox-only and reuse the same EPSG:4326 constraints as the Map area selection endpoint.
|
||||
- Saving a selection creates an export artifact, not a derived dataset.
|
||||
- No migrations, live provider fetching, AI dependency, real model behavior or new product domain were added.
|
||||
|
||||
Next recommended pass:
|
||||
- Add a live browser smoke that exercises `Save area export`, confirms the export appears in Export Center history and previews/downloads the persisted `vector_selection_geojson` artifact.
|
||||
|
||||
## Sprint 106 Map area selection extract (2026-06-25)
|
||||
|
||||
Changed:
|
||||
|
||||
@@ -373,3 +373,4 @@ This file now starts with the current implementation status. Older preparation/b
|
||||
- [x] Add AI Lab run-readiness checks for Detection and Segmentation before job submission.
|
||||
- [x] Add AI Lab action guardrails so explicit fixture models are not exposed as normal operator runs.
|
||||
- [x] Add persisted vector area selection from the Map workspace with bbox extract and GeoJSON download.
|
||||
- [x] Persist map area selections as Export Center handoff artifacts.
|
||||
|
||||
Reference in New Issue
Block a user