From 80631607f7897dd503f21d00495bc35505935744 Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 19 Jul 2026 18:27:10 +0200 Subject: [PATCH] fix(map): isolate bounded raster selections --- CHANGELOG.md | 4 ++++ docs/CODEX_EXECUTION_LOG.md | 6 +++++- frontend/src/components/map/mapWorkspaceUtils.test.ts | 4 ++++ frontend/src/components/map/mapWorkspaceUtils.ts | 4 +++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3a8f3c5..1d98da35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,10 @@ - Classified both `Gemeente ...` and release-golden `... municipality` Areas as local scope so a full municipality analysis cannot accidentally invoke regional raster partition assembly. +- Prevented rasters marked `coverage_scope=bounded_selection` from being + reused outside their acquired bbox. A small selection can therefore no + longer masquerade as a full-municipality space, forest, terrain or flood + measurement. - Rebuilt the complete frontend presentation as the Stitch-guided GeoIntel Atlas Workbench. The new shell uses one compact icon navigation rail, one context bar and task-specific work surfaces across Map, Sources, AI diff --git a/docs/CODEX_EXECUTION_LOG.md b/docs/CODEX_EXECUTION_LOG.md index c7310a78..28c68711 100644 --- a/docs/CODEX_EXECUTION_LOG.md +++ b/docs/CODEX_EXECUTION_LOG.md @@ -10927,7 +10927,11 @@ Implemented: to the Map product catalogue; - treated both Dutch municipality names and release-golden `... municipality` Areas as local scope after live verification exposed a - false regional flood-raster partition path. + false regional flood-raster partition path; +- extended the shared bounded-dataset guard to raster + `coverage_scope=bounded_selection` metadata after live full-Mol verification + proved that a previously acquired small raster could otherwise be + misrepresented as municipality-wide evidence. Live evidence: diff --git a/frontend/src/components/map/mapWorkspaceUtils.test.ts b/frontend/src/components/map/mapWorkspaceUtils.test.ts index 207496a7..c1b41e69 100644 --- a/frontend/src/components/map/mapWorkspaceUtils.test.ts +++ b/frontend/src/components/map/mapWorkspaceUtils.test.ts @@ -78,6 +78,10 @@ describe('map workspace selection guards', () => { geometry_clipped_to_selection: true, bbox_epsg4326: [4.55, 50.58, 4.56, 50.59], })).toBe(true) + expect(isSelectionBoundedDataset({ + coverage_scope: 'bounded_selection', + bbox_epsg4326: [5.1, 51.17, 5.11, 51.18], + })).toBe(true) expect(isSelectionBoundedDataset({ geometry_clipped_to_selection: false, bbox_epsg4326: [2.5, 49.5, 6.4, 51.6], diff --git a/frontend/src/components/map/mapWorkspaceUtils.ts b/frontend/src/components/map/mapWorkspaceUtils.ts index fb4214ea..4014ed3c 100644 --- a/frontend/src/components/map/mapWorkspaceUtils.ts +++ b/frontend/src/components/map/mapWorkspaceUtils.ts @@ -43,7 +43,9 @@ export function productCoversZones(productZones: string[], selectedZones: string export function isSelectionBoundedDataset( sourceMetadata: Record | null | undefined, ): boolean { - return sourceMetadata?.['geometry_clipped_to_selection'] === true + const boundedScope = sourceMetadata?.['geometry_clipped_to_selection'] === true + || sourceMetadata?.['coverage_scope'] === 'bounded_selection' + return boundedScope && Array.isArray(sourceMetadata?.['bbox_epsg4326']) && sourceMetadata['bbox_epsg4326'].length === 4 }