Expand BWK nature data across Kempen
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 00:20:45 +02:00
parent 9db0ac7811
commit 6cb880c76e
16 changed files with 988 additions and 5 deletions
+10
View File
@@ -529,3 +529,13 @@ integral as current, permanent or concurrent water volume.
- `docs/40-build-launch/SPRINT_1_SCOPE_FREEZE.md`
- `docs/API_CONTRACTS.md`
- `docs/REPOSITORY_CONVENTIONS.md`
## Area-aware map layer selection
Map themes can have both a complete regional Dataset and a smaller exact-Area
snapshot from the same official source. The workbench prefers the Dataset whose
`area_id` exactly matches the selected Area; when no exact snapshot exists, the
regional Dataset remains available and the backend clips metrics and map output
to the selected municipality or drawn rectangle. The Sources workspace reports
overlapping BWK area snapshots as separate coverages and does not sum their
feature counts as if they were disjoint observations.
@@ -117,6 +117,10 @@ export function SourceCatalogPanel({ datasets }: SourceCatalogPanelProps): JSX.E
String(dataset.source_metadata?.['product_key'] ?? 'most_recent') !== 'most_recent',
)
const bwkDatasets = ready.filter((dataset) => dataset.source_name === 'inbo_bwk_natura2000')
const largestBwkSnapshot = bwkDatasets.reduce<DatasetCreateResponse | null>(
(largest, dataset) => !largest || (dataset.feature_count ?? 0) > (largest.feature_count ?? 0) ? dataset : largest,
null,
)
const agricultureDatasets = ready.filter((dataset) => dataset.source_name === 'agentschap_landbouw_zeevisserij_agricultural_parcels')
const buildingsRegisterDatasets = ready.filter(
(dataset) => dataset.source_name === 'digitaal_vlaanderen_buildings_addresses_register',
@@ -214,7 +218,10 @@ export function SourceCatalogPanel({ datasets }: SourceCatalogPanelProps): JSX.E
{bwkDatasets.length > 0 ? (
<article>
<strong>BWK / Natura 2000</strong>
<span>Toestand 2025 · {bwkDatasets.reduce((total, dataset) => total + (dataset.feature_count ?? 0), 0).toLocaleString('nl-BE')} kaartvlakken</span>
<span>
Toestand 2025 · {bwkDatasets.length} gebiedsdekking{bwkDatasets.length === 1 ? '' : 'en'} ·{' '}
{(largestBwkSnapshot?.feature_count ?? 0).toLocaleString('nl-BE')} kaartvlakken in de grootste dekking
</span>
<p>Biologische waardering en habitataandelen blijven afzonderlijke, brongetrouwe metingen met herkomstinformatie.</p>
</article>
) : null}
@@ -178,6 +178,7 @@ function pickThemeDataset(
)
candidates.sort((left, right) => {
const score = (dataset: DatasetCreateResponse) =>
(dataset.area_id && dataset.area_id === selectedAreaId ? 10_000_000 : 0) +
(dataset.reference_layer_name && theme.tokens.includes(dataset.reference_layer_name.toLowerCase()) ? 1_000_000 : 0) +
(dataset.source_name === 'grb' ? 100_000 : 0) +
(dataset.source_name === 'department_omgeving_land_use' ? 90_000 : 0) +