first commit

This commit is contained in:
2026-06-23 09:13:51 +03:00
commit f6c7db328f
103 changed files with 1618 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
from pydantic import BaseModel, Field, model_validator
from app.models.common import GeoJSON
class BuildingsQueryRequest(BaseModel):
bbox: tuple[float, float, float, float] | None = None
path: GeoJSON | None = None
buffer_m: float = Field(default=50, ge=0)
@model_validator(mode="after")
def validate_query_shape(self) -> "BuildingsQueryRequest":
if self.bbox is None and self.path is None:
raise ValueError("Either bbox or path must be provided")
return self
class BuildingsQueryResponse(BaseModel):
type: str = "FeatureCollection"
features: list[GeoJSON]