fix(map): exclude high-resolution rasters from overview
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-21 22:56:39 +02:00
parent 20829f1a24
commit 20ec8ad6b2
4 changed files with 63 additions and 3 deletions
@@ -100,6 +100,23 @@ export function selectionAnalysisScale(bbox: VectorSelectionBBox): SelectionAnal
return 'overview'
}
export function persistedDatasetSupportsSelection(
dataset: { dataset_type: string; source_name?: string | null },
bbox: VectorSelectionBBox,
): boolean {
if (dataset.dataset_type !== 'raster') return true
const scale = selectionAnalysisScale(bbox)
if (scale === 'overview') return false
const dimensions = selectionDimensions(bbox)
if (dataset.source_name === 'digitaal_vlaanderen_dhmv' || dataset.source_name === 'vmm_flood_hazard') {
return dimensions.areaSquareMetres <= 280_000_000
}
if (dataset.source_name === 'department_omgeving_thematic_raster') {
return dimensions.areaSquareMetres <= 2_800_000_000
}
return scale === 'detail'
}
export function splitSelectionBbox(
bbox: VectorSelectionBBox,
maxTileSideMetres = 18_000,