Persist map selections as derived datasets
This commit is contained in:
@@ -406,6 +406,40 @@ Rules:
|
||||
- Results are generated from persisted PostGIS `vector_features`, not from client-side map data.
|
||||
- The response is capped by `limit` and returns `truncated=true` when more matching rows exist.
|
||||
|
||||
### POST `/api/v1/projects/{project_id}/datasets/{dataset_id}/vector/select/derive`
|
||||
|
||||
Persists a bbox selection as a new derived vector dataset and indexes the
|
||||
selected output into `vector_features`.
|
||||
|
||||
Request:
|
||||
|
||||
```json
|
||||
{
|
||||
"bbox": {
|
||||
"min_x": 5.0,
|
||||
"min_y": 51.0,
|
||||
"max_x": 5.1,
|
||||
"max_y": 51.1,
|
||||
"crs": "EPSG:4326"
|
||||
},
|
||||
"limit": 250,
|
||||
"output_name": "selected-buildings"
|
||||
}
|
||||
```
|
||||
|
||||
Response: `DatasetRead` in the canonical API envelope.
|
||||
|
||||
Rules:
|
||||
|
||||
- Only vector/GeoJSON datasets are supported.
|
||||
- Coordinates are EPSG:4326 longitude/latitude.
|
||||
- The new dataset uses `dataset_role="derived"`, `source="operation:selection"`,
|
||||
`source_name="map_selection"` and `derived_from_dataset_id` pointing to the
|
||||
source dataset.
|
||||
- The persisted GeoJSON properties retain source provenance as
|
||||
`source_dataset_id` and `source_vector_feature_id`.
|
||||
- Empty selections return `VECTOR_OPERATION_EMPTY_RESULT` and do not create a dataset.
|
||||
|
||||
### GET `/api/v1/projects/{project_id}/datasets/{dataset_id}/content`
|
||||
|
||||
Returns stored vector dataset content through the canonical API envelope.
|
||||
|
||||
Reference in New Issue
Block a user