From 927e370aa68ac594819459cd2564ffe3c1e01f21 Mon Sep 17 00:00:00 2001 From: mirdono Date: Wed, 30 Apr 2025 17:39:05 +0200 Subject: [PATCH] feat: add werkingsgebied for Borsbeek district When the new district of Borsbeek was created, no corresponding werkingsgebied was created. This fixes that. --- CHANGELOG.md | 5 ++-- ...werkingsgbied-for-borsbeek-district.sparql | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 config/migrations/2025/20250430130307-chore--cleanup-werkingsgebieden-data/20250430153558-feat--add-werkingsgbied-for-borsbeek-district.sparql diff --git a/CHANGELOG.md b/CHANGELOG.md index 448c779..c706de0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,9 @@ - datafix: correct date of change event of ckb olen [OP-3594] - datafix: move memberships from shared to administrative unit graph - datafix: cleanup werkingsgbieden data [OP-3566] - + move werkingsgebieden to public graph - + link district werkingsgebieden to Antwerp municipality werkingsgebied + + Move werkingsgebieden to public graph + + Link district werkingsgebieden to Antwerp municipality werkingsgebied + + Add missing werkingsgebied for Borsbeek district ### Deploy Notes ``` drc restart migrations; drc logs -ft --tail=200 migrations diff --git a/config/migrations/2025/20250430130307-chore--cleanup-werkingsgebieden-data/20250430153558-feat--add-werkingsgbied-for-borsbeek-district.sparql b/config/migrations/2025/20250430130307-chore--cleanup-werkingsgebieden-data/20250430153558-feat--add-werkingsgbied-for-borsbeek-district.sparql new file mode 100644 index 0000000..bd48e8b --- /dev/null +++ b/config/migrations/2025/20250430130307-chore--cleanup-werkingsgebieden-data/20250430153558-feat--add-werkingsgbied-for-borsbeek-district.sparql @@ -0,0 +1,24 @@ +PREFIX geo: +PREFIX ext: +PREFIX mu: +PREFIX besluit: + +INSERT { + GRAPH { + ?borsbeekLocation a prov:Location; + mu:uuid ?uuid ; + rdfs:label "Borsbeek" ; + ext:werkingsgebiedNiveau "District" ; + geo:sfWithin ?antwerpLocation . + } + # Also link this new werkingsgbied to the actual district + GRAPH { + ?borsbeekDistrict besluit:werkingsgebied ?borsbeekLocation . + } +} WHERE { + BIND(SHA256(CONCAT("Werkingsgebied for the district of Borsbeek")) AS ?uuid) + BIND(IRI(CONCAT("http://data.lblod.info/id/werkingsgebieden/", STR(?uuid))) AS ?borsbeekLocation) + +BIND ( AS ?antwerpLocation) + BIND ( AS ?borsbeekDistrict) +}