From 5dfa7e467634eeebf121f7c2c8a26f1b310a586a Mon Sep 17 00:00:00 2001 From: mirdono Date: Wed, 30 Apr 2025 20:01:45 +0200 Subject: [PATCH] feat: related werkingsgebiededn for municipalities and provinces --- ...en-for-municipalities-and-provinces.sparql | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 config/migrations/2025/20250430130307-chore--cleanup-werkingsgebieden-data/20250430180050-feat--relate-werkingsgebieden-for-municipalities-and-provinces.sparql diff --git a/config/migrations/2025/20250430130307-chore--cleanup-werkingsgebieden-data/20250430180050-feat--relate-werkingsgebieden-for-municipalities-and-provinces.sparql b/config/migrations/2025/20250430130307-chore--cleanup-werkingsgebieden-data/20250430180050-feat--relate-werkingsgebieden-for-municipalities-and-provinces.sparql new file mode 100644 index 0000000..e836bb5 --- /dev/null +++ b/config/migrations/2025/20250430130307-chore--cleanup-werkingsgebieden-data/20250430180050-feat--relate-werkingsgebieden-for-municipalities-and-provinces.sparql @@ -0,0 +1,26 @@ +PREFIX geo: +PREFIX org: +PREFIX besluit: + +INSERT { + GRAPH { + ?municipalityLocation geo:sfWithin ?provinceLocation . + } +} WHERE { + GRAPH { + ?municipality a besluit:Bestuurseenheid ; + org:classification . + ?province a besluit:Bestuurseenheid ; + org:classification . + } + + GRAPH { + ?membership a org:Membership ; + org:member ?municipality ; + org:organization ?province . + + ?municipality besluit:werkingsgebied ?municipalityLocation . + ?province besluit:werkingsgebied ?provinceLocation . + } + +}