Support bounded Kempen-wide thematic rasters
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-16 04:43:21 +02:00
parent 3c56bcbf61
commit 6a7fa57463
9 changed files with 49 additions and 12 deletions
@@ -148,6 +148,29 @@ def test_request_is_bounded_allowlisted_and_uses_native_wcs_resolution() -> None
assert exc_info.value.code == "THEMATIC_RASTER_PRODUCT_NOT_SUPPORTED"
def test_complete_kempen_scope_fits_the_tiled_thematic_guardrails() -> None:
settings = Settings(_env_file=None)
request = ThematicRasterAcquireRequest(
bbox={
"min_x": 4.59723873,
"min_y": 51.01047967,
"max_x": 5.26224853,
"max_y": 51.50511313,
"crs": "EPSG:4326",
},
product_key="space_occupation_2025",
)
prepared = ThematicRasterAcquisitionService._prepared_request(request, settings)
assert prepared["width"] * prepared["height"] <= 30_000_000
assert len(ThematicRasterAcquisitionService._tile_bounds(prepared)) > 1
with pytest.raises(AppError) as exc_info:
ThematicRasterAcquisitionService._prepared_request(payload(side_m=61_000.0), settings)
assert exc_info.value.code == "THEMATIC_RASTER_SELECTION_TOO_LARGE"
def test_binary_and_normalized_products_fail_closed_on_invalid_values() -> None:
binary = ThematicRasterAcquisitionService._product("space_occupation_2025")
score = ThematicRasterAcquisitionService._product("service_level_2022")