Add map area selection extraction
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled

This commit is contained in:
Codex
2026-06-25 01:59:57 +02:00
parent 00de5dbcb7
commit 851d7220df
18 changed files with 1063 additions and 2 deletions
+29 -1
View File
@@ -1,6 +1,6 @@
from __future__ import annotations
from pydantic import BaseModel
from pydantic import BaseModel, Field, field_validator
class VectorOperationResult(BaseModel):
@@ -191,3 +191,31 @@ class VectorStatsResponse(BaseModel):
geometry_type_summary: dict[str, int]
bounds_json: dict | None
crs: str | None = None
class VectorSelectionBBox(BaseModel):
min_x: float
min_y: float
max_x: float
max_y: float
crs: str = "EPSG:4326"
@field_validator("crs")
@classmethod
def validate_crs(cls, value: str) -> str:
if value.upper() != "EPSG:4326":
raise ValueError("Only EPSG:4326 bbox selection is supported")
return "EPSG:4326"
class VectorSelectionRequest(BaseModel):
bbox: VectorSelectionBBox
limit: int = Field(default=100, ge=1, le=1000)
class VectorSelectionResponse(BaseModel):
selection_bbox: VectorSelectionBBox
feature_count: int
limit: int
truncated: bool
geojson: dict