Initial public release
GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from uuid import UUID
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from .operations import VectorSelectionBBox
|
||||
|
||||
|
||||
class DhmvAcquireRequest(BaseModel):
|
||||
bbox: VectorSelectionBBox
|
||||
area_id: UUID | None = None
|
||||
product_key: str = "dtm_1m"
|
||||
resolution_m: float | None = Field(default=None, ge=1.0, le=10.0)
|
||||
force_refresh: bool = False
|
||||
|
||||
|
||||
class DhmvProductRead(BaseModel):
|
||||
key: str
|
||||
display_name: str
|
||||
surface_model: str
|
||||
coverage_id: str
|
||||
native_resolution_m: float
|
||||
source_crs: str
|
||||
vertical_reference: str
|
||||
acquisition_period: str
|
||||
catalog_url: str
|
||||
attribution: str
|
||||
limitation_message: str
|
||||
|
||||
|
||||
class DhmvAcquisitionResult(BaseModel):
|
||||
output_dataset_id: UUID
|
||||
reused: bool
|
||||
provider: str
|
||||
product_key: str
|
||||
display_name: str
|
||||
surface_model: str
|
||||
coverage_id: str
|
||||
native_resolution_m: float
|
||||
resolution_m: float
|
||||
width: int
|
||||
height: int
|
||||
valid_pixel_count: int
|
||||
nodata_value: float
|
||||
bbox_epsg4326: list[float]
|
||||
bbox_epsg31370: list[float]
|
||||
vertical_reference: str
|
||||
acquisition_period: str
|
||||
attribution: str
|
||||
limitation_message: str
|
||||
|
||||
|
||||
class TerrainSelectionRequest(BaseModel):
|
||||
bbox: VectorSelectionBBox
|
||||
area_id: UUID | None = None
|
||||
|
||||
|
||||
class TerrainPartitionSelectionRequest(TerrainSelectionRequest):
|
||||
product_key: str = "dtm_1m"
|
||||
dataset_ids: list[UUID] | None = Field(default=None, min_length=1, max_length=4096)
|
||||
|
||||
|
||||
class TerrainMetric(BaseModel):
|
||||
metric_key: str
|
||||
metric_label: str
|
||||
metric_value: float
|
||||
metric_unit: str
|
||||
aggregation_method: str
|
||||
derived: bool = True
|
||||
|
||||
|
||||
class TerrainSelectionSummary(BaseModel):
|
||||
metric_label: str
|
||||
metric_value: float
|
||||
metric_unit: str
|
||||
aggregation_method: str
|
||||
primary_metric_key: str
|
||||
metrics: list[TerrainMetric]
|
||||
|
||||
|
||||
class TerrainSelectionResponse(BaseModel):
|
||||
dataset_id: UUID
|
||||
dataset_ids: list[UUID] = Field(default_factory=list)
|
||||
partition_count: int = Field(default=1, ge=1)
|
||||
product_key: str
|
||||
surface_model: str
|
||||
selection_bbox: VectorSelectionBBox
|
||||
selection_area_id: UUID | None = None
|
||||
sample_count: int
|
||||
slope_sample_count: int
|
||||
coverage_ratio: float
|
||||
# Set when the drawn selection is smaller than one source cell and the
|
||||
# analysis was widened to the cells it touches, so the value covers more
|
||||
# ground than was requested.
|
||||
cell_selection_warning: str | None = None
|
||||
resolution_m: float
|
||||
vertical_reference: str
|
||||
summary: TerrainSelectionSummary
|
||||
unsupported_metrics: list[str]
|
||||
limitation_message: str
|
||||
generated_at: str
|
||||
Reference in New Issue
Block a user