Skip to content

LD Views

Om technisch tot een invulling te komen van een Knowledge Graph bovenop onze registratieve Linked Data, maken wij gebruik van zgn. LD Views. LD Views zijn geautomatiseerde afbeeldingen van registratieve datasets naar een geïntegreerde kennisgraaf. Met deze aanpak transformeren we de registratieve laag naar een additionele laag dat gebruik maakt van bovengenoemd datamodel.

Figuur 1. Architectuur overzicht van de werking van LD Views.

In deze architectuur zijn een aantal zaken van belang. We beginnen met brondata (paarse laag) zoals eerder beschreven in Brondata. Deze zetten we middels GraphQL en de Enhancer om naar registratieve Linked Data (de oranje laag).

Vanuit daar creeëren we één of meerdere Views (afhankelijk van gebruik) op deze data, welke laag we dan ook de Knowledge Graph noemen. Governance technisch zal een business architect moeten bepalen welke data er in deze laag moet zitten - en waar deze data vandaan moet komen. Het unieke hier is dat de data op zichzelf vaak al bevraagbaar is (middels uitgebreide en complexe SPARQL queries op de registratieve Linked Data), maar dat deze voor gemakkelijk gebruik persistent wordt opgeslagen. Voor verschillende doeleinden kunnen verschillende LD Views ontstaan in de toekomst.

We geloven heel erg in het statement One size fits none. Immers, er valt niet één datamodel, één dataset of één manier van ontsluiting te bedenken waar alle gebruikers baat bij hebben. Door dit wel na te streven lopen we het risico een oplossing te creeëren die voor niemand echt de perfect aansluiting geeft. Daarom houden we de brondata grotendeels intact en staan we toe op basis van verschillende use cases één of meerdere Knowledge Graphs beschikbaar te stellen.

Technische Implementatie

Voor de technische implementatie van LD Views wordt gebruik gemaakt van de open standaarden SPARQL construct en SHACL Rules.

SPARQL construct
Wordt gebruikt om inhoudelijke transformaties in uit te drukken. Deze transformaties corresponderen met LD View tabellen zoals Tabel 1 en 2. De met Tabel 2 corresponderende bevraging is hieronder opgenomen.
SHACL Rules
worden gebruikt om de SPARQL construct queries op te slaan als linked data. Deze worden ook gebruikt om de volgorde waarin de transformaties moeten worden uitgevoerd vast te leggen.

Technische Implementatie Panden

BAG Pand

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bag: <https://bag2.basisregistraties.overheid.nl/bag/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix status: <https://bag2.basisregistraties.overheid.nl/bag/id/status/>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>

construct {
  ?administrativeArea sdo:containsPlace ?place.
  ?geoCoordinates
    a sdo:GeoCoordinates;
    prov:wasDerivedFrom ?verblijfsobjectRegistratie;
    sdo:latitude ?latitude;
    sdo:longitude ?longitude;
    sdo:name 'BAG puntgeometrie'.
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?pandRegistratie;
    sdo:name 'BAG vlakgeometrie';
    sdo:polygon ?polygon.
  ?place
    a sdo:Place;
    prov:wasDerivedFrom
      ?pandRegistratie,
      ?verblijfsobjectRegistratie;
    sdo:additionalType
      bag:Pand,
      ?gebruiksdoel;
    sdo:address ?postalAddress;
    sdo:containedInPlace ?administrativeArea;
    sdo:dateCreated ?dateCreated;
    sdo:floorSize ?oppervlakte;
    sdo:geo
      ?geoCoordinates,
      ?geoShape;
    sdo:name ?placeName.
  ?postalAddress
    a sdo:PostalAddress;
    prov:wasDerivedFrom ?nummeraanduidingRegistratie;
    sdo:addressCountry 'Nederland';
    sdo:addressLocality ?woonplaatsNaam;
    sdo:name ?postalAddressName;
    sdo:postalCode ?postcode;
    sdo:streetAddress ?streetAddress.
}

from named <https://bag2.basisregistraties.overheid.nl/bag/graphs/instanties>

where {
  # BAG nummeraanduiding: identity
  ?nummeraanduidingRegistratie bag:postcode ?postcode.
  filter not exists { ?nummeraanduidingRegistratie prov:invalidatedAtTime []. }
  ?nummeraanduidingRegistratie bag:status ?nummeraanduidingStatus.
  filter(?nummeraanduidingStatus not in (status:naamgevingIngetrokken))
  # BAG nummeraanduiding: connections
  ?nummeraanduidingRegistratie
    bag:ligtAan ?openbareRuimte;
    foaf:primaryTopic ?nummeraanduiding.
  # BAG nummeraanduiding: the rest
  ?nummeraanduiding nen3610:identificatie/nen3610:lokaalID ?postalAddressId.
  ?nummeraanduidingRegistratie bag:huisnummer ?huisnummer.
  optional { ?nummeraanduidingRegistratie bag:huisletter ?huisletter. }
  optional { ?nummeraanduidingRegistratie bag:huisnummertoevoeging ?huisnummertoevoeging. }

  # BAG openbare ruimte: identity
  ?openbareRuimteRegistratie foaf:primaryTopic ?openbareRuimte.
  filter not exists { ?openbareRuimteRegistratie prov:invalidatedAtTime []. }
  ?openbareRuimteRegistratie bag:status ?openbareRuimteStatus.
  filter(?openbareRuimteStatus not in (status:naamgevingIngetrokken))
  # BAG openbare ruimte: connections
  ?openbareRuimteRegistratie bag:ligtIn ?woonplaats.
  # BAG openbare ruimte: the rest
  ?openbareRuimteRegistratie skos:prefLabel ?openbareRuimteNaam.

  # BAG verblijfsobject: identity
  ?verblijfsobjectRegistratie bag:hoofdadres ?nummeraanduiding.
  filter not exists { ?verblijfsobjectRegistratie prov:invalidatedAtTime []. }
  ?verblijfsobjectRegistratie bag:status ?verblijfsobjectStatus.
  filter(?verblijfsobjectStatus not in (status:nietGerealiseerdVerblijfsobject,
                                        status:verblijfsobjectIngetrokken,
                                        status:verblijfsobjectTenOnrechteOpgevoerd))
  # BAG verblijfsobject: connections
  ?verblijfsobjectRegistratie
    bag:maaktDeelUitVan ?pand;
    foaf:primaryTopic ?verblijfsobject.
  # BAG verblijfsobject: the rest
  ?verblijfsobject nen3610:identificatie/nen3610:lokaalID ?verblijfsobjectId.
  ?verblijfsobjectRegistratie
    bag:gebruiksdoel ?gebruiksdoel;
    bag:geometrie ?puntRd;
    bag:oppervlakte ?oppervlakte.

  # BAG pand: identity
  ?pandRegistratie foaf:primaryTopic ?pand.
  filter not exists { ?pandRegistratie prov:invalidatedAtTime []. }
  ?pandRegistratie bag:status ?pandStatus.
  filter(?pandStatus not in (status:nietGerealiseerdPand,
                             status:pandGesloopt,
                             status:pandTenOnrechteOpgevoerd))
  # BAG pand: the rest
  ?pand nen3610:identificatie/nen3610:lokaalID ?pandId.
  ?pandRegistratie
    bag:bouwjaar ?bouwjaar;
    bag:geometrie ?vlakRd.

  # BAG woonplaats: identity
  ?woonplaatsRegistratie foaf:primaryTopic ?woonplaats.
  filter not exists { ?woonplaatsRegistratie prov:invalidatedAtTime []. }
  ?woonplaatsRegistratie bag:status ?woonplaatsStatus.
  filter(?woonplaatsStatus not in (status:woonplaatsIngetrokken))
  # BAG woonplaats: the rest
  ?woonplaats nen3610:identificatie/nen3610:lokaalID ?administrativeAreaId.
  ?woonplaatsRegistratie skos:prefLabel ?woonplaatsNaam.

  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?administrativeAreaId)) as ?administrativeArea)
  bind(xsd:integer(str(?bouwjaar)) as ?dateCreated)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-coordinates/bag-',
                  ?verblijfsobjectId)) as ?geoCoordinates)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/bag-',
                  ?pandId)) as ?geoShape)
  bind(xsd:double(tfg:latitude(?punt)) as ?latitude)
  bind(xsd:double(tfg:longitude(?punt)) as ?longitude)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?verblijfsobjectId)) as ?place)
  bind(tfg:project(tfg:2d(?vlakRd)) as ?polygon)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/postal-address/',
                  ?postalAddressId)) as ?postalAddress)
  bind(tfg:project(?puntRd) as ?punt)

  bind(if(bound(?placeName),
          concat('Adres van ',?placeName),
          '') as ?postalAddressName)
  bind(if(bound(?streetAddress),
          concat(?streetAddress,', ',?postcode,' ',?woonplaatsNaam),
          '') as ?placeName)
  bind(concat(?openbareRuimteNaam,' ',str(?huisnummer),
              if(bound(?huisletter),?huisletter,''),
              if(bound(?huisnummertoevoeging),
                 concat('-',?huisnummertoevoeging),
                 '')) as ?streetAddress)
}

BGT Panden

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bag: <https://bag2.basisregistraties.overheid.nl/bag/def/>
prefix bgt: <https://bgt.basisregistraties.overheid.nl/bgt/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?bgtPandRegistratie;
    sdo:name 'BGT maaiveld geometrie';
    sdo:polygon ?polygon.
  ?place
    a sdo:Place;
    sdo:additionalType bgt:Pand;
    sdo:geo ?geoShape.
}

from named <https://bag2.basisregistraties.overheid.nl/bag/graphs/instanties>
from named <https://bgt.basisregistraties.overheid.nl/bgt/id/graph/instanties>

where {
  # identity
  ?bgtPandRegistratie bgt:bagPand ?bagPand0.
  filter not exists { ?bgtPandRegistratie prov:invalidatedAtTime []. }
  # the rest
  ?bgtPandRegistratie foaf:primaryTopic/bgt:identificatie/nen3610:lokaalID ?bgtPandId.
  optional { ?bgtPandRegistratie bgt:geometrie ?vlakRd. }
  # connections
  optional {
    [ bag:maaktDeelUitVan ?bagPand;
      foaf:primaryTopic/nen3610:identificatie/nen3610:lokaalID ?verblijfsobjectId ].
  }

  bind(iri(concat('https://bag2.basisregistraties.overheid.nl/bag/id/object/NL.IMBAG.Pand.',
                  strafter(str(?bagPand0),
                           'https://bag2.basisregistraties.overheid.nl/bag/id/pand/NL.IMBAG.Pand.'))) as ?bagPand)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/bgt-',
                  ?bgtPandId)) as ?geoShape)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?verblijfsobjectId)) as ?place)
  bind(tfg:project(?vlakRd) as ?polygon)
}

BRT Gebouw

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bag: <https://bag2.basisregistraties.overheid.nl/bag/def/>
prefix brt: <https://brt.basisregistraties.overheid.nl/brt/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
#prefix geo: <http://www.opengis.net/ont/geosparql#>
prefix geo: <https://www.opengis.net/ont/geosparql#>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?gebouwRegistratie;
    sdo:name 'BRT geometrie';
    sdo:polygon ?polygon.
  ?place
    a sdo:Place;
    prov:wasDerivedFrom ?gebouwRegistratie;
    sdo:additionalType
      brt:Gebouw,
      ?type;
    sdo:geo ?geoShape;
    sdo:name ?name.
}

from named <https://bag2.basisregistraties.overheid.nl/bag/graphs/instanties>
from named <https://brt.basisregistraties.overheid.nl/brt/id/graph/instanties>
from named <https://brt.basisregistraties.overheid.nl/brt/id/graph/brt-2-bag>

where {
  # identity
  ?pandRegistratie geo:sfWithin ?gebouw.
  # connections
  ?gebouwRegistratie foaf:primaryTopic ?gebouw.
  ?pandRegistratie foaf:primaryTopic ?pand.
  [ bag:maaktDeelUitVan ?pand;
    foaf:primaryTopic ?verblijfsobject ].
  # the rest
  ?gebouwRegistratie
    brt:geometriePunt|brt:geometrieVlak ?vlakRd;
    brt:typeGebouw ?type.
  ?gebouw nen3610:identificatie/nen3610:lokaalID ?gebouwId.
  ?verblijfsobject nen3610:identificatie/nen3610:lokaalID ?verblijfsobjectId.
  optional { ?gebouwRegistratie skos:prefLabel ?name. }

  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/brt-',
                  ?gebouwId)) as ?geoShape)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?verblijfsobjectId)) as ?place)
  bind(tfg:project(?vlakRd) as ?polygon)
}

Technische Implementatie Gebieden

BAG Woonplaats

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bag: <https://bag2.basisregistraties.overheid.nl/bag/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix status: <https://bag2.basisregistraties.overheid.nl/bag/id/status/>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?administrativeArea
    a sdo:AdministrativeArea;
    prov:wasDerivedFrom ?woonplaatsRegistratie;
    sdo:additionalType bag:Woonplaats;
    sdo:geo ?geoShape;
    sdo:name ?naam.
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?woonplaatsRegistratie;
    sdo:name 'BAG vlakgeometrie';
    sdo:polygon ?polygon.
}

from named <https://bag2.basisregistraties.overheid.nl/bag/graphs/instanties>

where {
  # identity
  ?woonplaatsRegistratie a bag:WoonplaatsRegistratie.
  filter not exists { ?woonplaatsRegistratie prov:invalidatedAtTime []. }
  ?woonplaatsRegistratie bag:status ?woonplaatsStatus.
  filter(?woonplaatsStatus not in (status:woonplaatsIngetrokken))
  # the rest
  ?woonplaatsRegistratie
    bag:geometrie ?vlakRd;
    foaf:primaryTopic ?woonplaats;
    skos:prefLabel ?naam.
  ?woonplaats nen3610:identificatie/nen3610:lokaalID ?id.

  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?id)) as ?administrativeArea)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/bag-',
                  ?id)) as ?geoShape)
  bind(tfg:simplify(tfg:project(?vlakRd),1.0e-4) as ?polygon)
}

Administrative Area gebaseerd op BGT Gebieden

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bgt: <https://bgt.basisregistraties.overheid.nl/bgt/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?registratie;
    sdo:name 'BGT geometrie';
    sdo:polygon ?polygon.
  ?place
    a sdo:AdministrativeArea;
    prov:wasDerivedFrom ?registratie;
    sdo:additionalType
      ?class,
      ?functie,
      ?fysiekVoorkomen,
      ?plusFunctie,
      ?plusFysiekVoorkomen,
      ?plusType,
      ?type;
    sdo:geo ?geoShape;
    sdo:name ?placeName.
}

from named <https://bgt.basisregistraties.overheid.nl/bgt/def/>
from named <https://bgt.basisregistraties.overheid.nl/bgt/id/graph/instanties>

where {
  # identity
  values ?class {
    bgt:BuurtRegistratie
    bgt:OpenbareRuimteRegistratie
    bgt:StadsdeelRegistratie
    bgt:WaterschapRegistratie
    bgt:WijkRegistratie
  }
  ?registratie a ?class.
  filter not exists { ?registratie prov:invalidatedAtTime []. }
  # the rest
  ?registratie
    bgt:bronhouder/skos:prefLabel ?bronhouderNaam;
    bgt:geometrie ?vlakRd;
    foaf:primaryTopic ?object.
  ?object
    a/skos:prefLabel ?classLabel;
    bgt:identificatie/nen3610:lokaalID ?id.
  optional { ?registratie bgt:bgt_fysiekVoorkomen ?fysiekVoorkomen0. }
  optional { ?registratie bgt:functie ?functie. }
  optional { ?registratie bgt:naam ?naam. }
  optional { ?registratie bgt:plusFunctie ?plusFunctie. }
  optional { ?registratie bgt:plus_fysiekVoorkomen ?plusFysiekVoorkomen0. }
  optional { ?registratie bgt:plusType ?plusType. }
  optional { ?registratie bgt:type ?type. }

  bind(iri(concat('https://bgt.basisregistraties.overheid.nl/bgt/id/fysiek-voorkomen/',
                  ?fysiekVoorkomen0)) as ?fysiekVoorkomen)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/bgt-',
                  ?id)) as ?geoShape)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?id)) as ?place)
  bind(if(bound(?naam),
          ?naam,
          concat('Een ',
                 lcase(?classLabel),
                 ' van bronhouder ',
                 ?bronhouderNaam)) as ?placeName)
  bind(iri(concat('https://bgt.basisregistraties.overheid.nl/bgt/id/fysiek-voorkomen/',
                  ?plusFysiekVoorkomen0)) as ?plusFysiekVoorkomen)
  bind(tfg:project(?vlakRd) as ?polygon)
}

BAG en BGT Openbare Ruimte

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bag: <https://bag2.basisregistraties.overheid.nl/bag/def/>
prefix bgt: <https://bgt.basisregistraties.overheid.nl/bgt/def/>
prefix dct: <http://purl.org/dc/terms/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?administrativeArea sdo:containsPlace ?place.
  ?geoCoordinates
    a sdo:GeoCoordinates;
    prov:wasDerivedFrom ?openbareRuimteLabelRegistratie;
    sdo:latitude ?latitude;
    sdo:longitude ?longitude;
    sdo:name 'BGT puntgeometrie'.
  ?place
    a sdo:Place;
    prov:wasDerivedFrom
      ?openbareRuimteRegistratie,
      ?openbareRuimteLabelRegistratie;
    sdo:additionalType ?type;
    sdo:dateCreated ?dateCreated;
    sdo:geo ?geoCoordinates.
}

from named <https://bag2.basisregistraties.overheid.nl/bag/graphs/instanties>
from named <https://bgt.basisregistraties.overheid.nl/bgt/id/graph/instanties>

where {
  # Openbare ruimte label ↔ openbare ruimte: identity
  ?openbareRuimteLabelRegistratie bgt:bagOpenbareRuimte ?openbareRuimte0.
  filter not exists { ?openbareRuimteLabelRegistratie prov:invalidatedAtTime []. }
  bind(iri(concat('https://bag2.basisregistraties.overheid.nl/bag/id/object/NL.IMBAG.Openbareruimte.',
                  strafter(str(?openbareRuimte0),
                           'https://bag2.basisregistraties.overheid.nl/bag/id/openbare-ruimte/'))) as ?openbareRuimte)
  ?openbareRuimteRegistratie foaf:primaryTopic ?openbareRuimte.
  filter not exists { ?openbareRuimteRegistratie prov:invalidatedAtTime []. }
  # Openbare ruimte: connections
  ?openbareRuimteRegistratie bag:ligtIn ?woonplaats.
  # Openbare ruimte: the rest
  ?openbareRuimteRegistratie
    bag:type ?type;
    dct:created ?dateCreated;
    skos:prefLabel ?openbareRuimteNaam.
  ?openbareRuimte nen3610:identificatie/nen3610:lokaalID ?openbareRuimteId.
  # Openbare ruimte label: the rest
  ?openbareRuimteLabelRegistratie
    bgt:geometrie ?puntRd;
    foaf:primaryTopic/bgt:identificatie/nen3610:lokaalID ?openbareRuimteLabelId.
  # Woonplaats: the rest
  ?woonplaats nen3610:identificatie/nen3610:lokaalID ?woonplaatsId.

  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?woonplaatsId)) as ?administrativeArea)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-coordinates/bgt-',
                  ?openbareRuimteLabelId)) as ?geoCoordinates)
  bind(str(tfg:latitude(?punt)) as ?latitude)
  bind(str(tfg:longitude(?punt)) as ?longitude)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?openbareRuimteId)) as ?place)
  bind(tfg:project(?puntRd) as ?punt)
}

Wijken en Buurten

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix geo: <http://www.opengis.net/ont/geosparql#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix sdo: <https://schema.org/>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>
prefix wbk: <https://data.labs.kadaster.nl/cbs/wbk/vocab/>

construct {
  ?geo
    a sdo:GeoShape;
    prov:wasDerivedFrom ?buurt;
    sdo:name "CBS geometrie";
    sdo:polygon ?polygon.
  ?administrativeArea
    prov:wasDerivedFrom ?buurt;
    sdo:additionalType wbk:Buurt;
    sdo:geo ?geo;
    sdo:identifier ?id;
    sdo:name ?name.
}

from named <https://data.labs.kadaster.nl/cbs/wbk/graphs/geo>

where {
  ?buurt
    a wbk:Buurt;
    geo:hasGeometry/geo:asWKT ?shape;
    rdfs:label ?label.

  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?id)) as ?administrativeArea)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/wbk-',
                  ?id)) as ?geo)
  bind(strafter(str(?buurt),
                'https://data.labs.kadaster.nl/cbs/wbk/id/buurt/') as ?id)
  bind(str(?label) as ?name)
  bind(tfg:simplify(?shape,1.0e-4) as ?polygon)
}

Wijken en Buurten Linkset met BAG

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bag: <https://bag2.basisregistraties.overheid.nl/bag/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix geo: <http://www.opengis.net/ont/geosparql#>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>

construct {
  ?administrativeArea
    a sdo:AdministrativeArea;
    prov:wasDerivedFrom ?buurt;
    sdo:containsPlace ?place.
}

from named <https://bag2.basisregistraties.overheid.nl/bag/graphs/instanties>
from named <https://data.labs.kadaster.nl/cbs/wbk-2-bag/graphs/links>

where {
  # identity
  ?buurt geo:sfContains ?pandRegistratie.
  # connections
  ?pandRegistratie foaf:primaryTopic ?pand.
  [ bag:maaktDeelUitVan ?pand;
    foaf:primaryTopic/nen3610:identificatie/nen3610:lokaalID ?verblijfsobjectId ].

  bind(strafter(str(?buurt),
                'https://data.labs.kadaster.nl/cbs/wbk/id/buurt/') as ?buurtId)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?buurtId)) as ?administrativeArea)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?verblijfsobjectId)) as ?place)
}

Technische Implementatie Terreindelen

BGT Begroeid Terreindeel

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bgt: <https://bgt.basisregistraties.overheid.nl/bgt/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?registratie;
    sdo:name 'BGT geometrie';
    sdo:polygon ?polygon.
  ?place
    a sdo:Place;
    prov:wasDerivedFrom ?registratie;
    sdo:additionalType
      bgt:BegroeidTerreindeel,
      ?additionalClass,
      ?functie,
      ?fysiekVoorkomen,
      ?plusFunctie,
      ?plusFysiekVoorkomen,
      ?plusType,
      ?type;
    sdo:geo ?geoShape;
    sdo:name ?placeName.
}

from named <https://bgt.basisregistraties.overheid.nl/bgt/def/>
from named <https://bgt.basisregistraties.overheid.nl/bgt/id/graph/instanties>

where {
  # identity
  ?registratie a bgt:BegroeidTerreindeelRegistratie.
  filter not exists { ?registratie prov:invalidatedAtTime []. }
  # the rest
  ?registratie
    bgt:bronhouder/skos:prefLabel ?bronhouderNaam;
    bgt:geometrie ?vlakRd;
    foaf:primaryTopic/bgt:identificatie/nen3610:lokaalID ?id.
  optional { ?registratie bgt:bgt_fysiekVoorkomen ?fysiekVoorkomen0. }
  optional { ?registratie bgt:functie ?functie. }
  optional { ?registratie bgt:naam ?naam. }
  optional { ?registratie bgt:plusFunctie ?plusFunctie. }
  optional { ?registratie bgt:plus_fysiekVoorkomen ?plusFysiekVoorkomen0. }
  optional { ?registratie bgt:plusType ?plusType. }
  optional { ?registratie bgt:type ?type. }

  bind(iri(concat('https://bgt.basisregistraties.overheid.nl/bgt/id/fysiek-voorkomen/',
                  ?fysiekVoorkomen0)) as ?fysiekVoorkomen)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/bgt-',
                  ?id)) as ?geoShape)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?id)) as ?place)
  bind(if(bound(?naam),
          ?naam,
          concat('Een begroeid terreindeel van bronhouder ',
                 ?bronhouderNaam)) as ?placeName)
  bind(iri(concat('https://bgt.basisregistraties.overheid.nl/bgt/id/fysiek-voorkomen/',
                  ?plusFysiekVoorkomen0)) as ?plusFysiekVoorkomen)
  bind(tfg:project(?vlakRd) as ?polygon)
}

Onbegroeid Terreindeel

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bgt: <https://bgt.basisregistraties.overheid.nl/bgt/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?registratie;
    sdo:name 'BGT geometrie';
    sdo:polygon ?polygon.
  ?place
    a sdo:Place;
    prov:wasDerivedFrom ?registratie;
    sdo:additionalType
      bgt:OnbegroeidTerreindeel,
      ?fysiekVoorkomen,
      ?plusFysiekVoorkomen;
    sdo:geo ?geoShape;
    sdo:name ?placeName.
}

from named <https://bgt.basisregistraties.overheid.nl/bgt/def/>
from named <https://bgt.basisregistraties.overheid.nl/bgt/id/graph/instanties>

where {
  # identity
  ?registratie a bgt:OnbegroeidTerreindeelRegistratie.
  filter not exists { ?registratie prov:invalidatedAtTime []. }
  # the rest
  ?registratie
    bgt:bgt_fysiekVoorkomen ?fysiekVoorkomen0;
    bgt:bronhouder/skos:prefLabel ?bronhouderNaam;
    bgt:geometrie ?vlakRd;
    foaf:primaryTopic/bgt:identificatie/nen3610:lokaalID ?id.
  optional { ?registratie bgt:plus_fysiekVoorkomen ?plusFysiekVoorkomen0. }

  bind(iri(concat('https://bgt.basisregistraties.overheid.nl/bgt/id/fysiek-voorkomen/',
                  ?fysiekVoorkomen0)) as ?fysiekVoorkomen)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/bgt-',
                  ?id)) as ?geoShape)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?id)) as ?place)
  bind(if(bound(?naam),
          ?naam,
          concat('Een onbegroeid terreindeel van bronhouder ',
                 ?bronhouderNaam)) as ?placeName)
  bind(iri(concat('https://bgt.basisregistraties.overheid.nl/bgt/id/fysiek-voorkomen/',
                  ?plusFysiekVoorkomen0)) as ?plusFysiekVoorkomen)
  bind(tfg:project(?vlakRd) as ?polygon)
}

BRT Terrein

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bag: <https://bag2.basisregistraties.overheid.nl/bag/def/>
prefix brt: <https://brt.basisregistraties.overheid.nl/brt/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
#prefix geo: <http://www.opengis.net/ont/geosparql#>
prefix geo: <https://www.opengis.net/ont/geosparql#>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?registratie;
    sdo:name 'BRT geometrie';
    sdo:polygon ?polygon.
  ?place
    a sdo:Place;
    prov:wasDerivedFrom ?registratie;
    sdo:additionalType
      brt:Terrein,
      ?fysiekVoorkomen_TE,
      ?type,
      ?voorkomen;
    sdo:geo ?geoShape;
    sdo:name ?name.
}

from named <https://brt.basisregistraties.overheid.nl/brt/id/graph/instanties>

where {
  # identity
  ?object a brt:Terrein.
  # connections
  ?registratie foaf:primaryTopic ?object.
  # the rest
  ?object nen3610:identificatie/nen3610:lokaalID ?id.
  ?registratie
    brt:geometrieVlak ?vlakRd;
    brt:typeLandgebruik ?type.
  optional { ?registratie brt:fysiekVoorkomen_TE ?fysiekVoorkomen_TE. }
  optional { ?registratie brt:voorkomen_TE ?voorkomen. }
  optional { ?registratie skos:altLabel|skos:prefLabel ?name. }

  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/brt-',
                  ?id)) as ?geoShape)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?id)) as ?place)
  bind(tfg:project(?vlakRd) as ?polygon)
}

Technische Implementatie Waterdelen

BGT Waterdeel

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bgt: <https://bgt.basisregistraties.overheid.nl/bgt/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?geo
    a sdo:GeoShape;
    prov:wasDerivedFrom ?registratie;
    sdo:name 'BGT geometrie';
    sdo:polygon ?polygon.
  ?place
    a sdo:Place;
    prov:wasDerivedFrom ?registratie;
    sdo:additionalType
      bgt:Waterdeel,
      ?plusType,
      ?type;
    sdo:geo ?geo;
    sdo:name ?placeName.
}

from named <https://bgt.basisregistraties.overheid.nl/bgt/def/>
from named <https://bgt.basisregistraties.overheid.nl/bgt/id/graph/instanties>

where {
  # identity
  ?registratie a bgt:WaterdeelRegistratie.
  filter not exists { ?registratie prov:invalidatedAtTime []. }
  # the rest
  ?registratie
    bgt:bronhouder/skos:prefLabel ?bronhouderNaam;
    bgt:geometrie ?vlakRd;
    bgt:type ?type;
    foaf:primaryTopic/bgt:identificatie/nen3610:lokaalID ?id.
  optional { ?registratie bgt:plusType ?plusType. }

  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/bgt-',
                  ?id)) as ?geo)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?id)) as ?place)
  bind(if(bound(?naam),
          ?naam,
          concat('Een waterdeel van bronhouder ',
                 ?bronhouderNaam)) as ?placeName)
  bind(tfg:project(?vlakRd) as ?polygon)
}

BRT Waterdeel

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix brt: <https://brt.basisregistraties.overheid.nl/brt/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?geoCoordinates
    a sdo:GeoCoordinates;
    prov:wasDerivedFrom ?registratie;
    sdo:latitude ?latitude;
    sdo:longitude ?longitude;
    sdo:name 'BRT geometrie'.
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?registratie;
    sdo:name 'BRT geometrie';
    sdo:polygon ?polygon.
  ?place
    a sdo:Place;
    prov:wasDerivedFrom ?registratie;
    sdo:additionalType
      brt:Waterdeel,
      ?functie,
      ?type;
    sdo:geo
      ?geoCoordinates,
      ?geoShape;
    sdo:name ?name.
}

from named <https://brt.basisregistraties.overheid.nl/brt/id/graph/instanties>

where {
  # identity
  ?object a brt:Waterdeel.
  # connections
  ?registratie foaf:primaryTopic ?object.
  # the rest
  ?object nen3610:identificatie/nen3610:lokaalID ?id.
  ?registratie
    brt:functie_WA ?functie;
    brt:typeWater ?type.
  optional { ?registratie skos:altLabel|skos:prefLabel ?name. }
  {
    ?registratie brt:geometriePunt ?puntRd.
    bind(tfg:project(?puntRd) as ?punt)
    bind(str(tfg:latitude(?punt)) as ?latitude)
    bind(str(tfg:longitude(?punt)) as ?longitude)
    bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-coordinates/brt-',
                    ?id)) as ?geoCoordinates)
  } union {
    ?registratie brt:geometrieLijn|brt:geometrieVlak ?vormRd.
    bind(tfg:project(?vormRd) as ?polygon)
    bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/brt-',
                    ?id)) as ?geoShape)
  }

  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?id)) as ?place)
}

Technische Implementatie Wegdelen

BGT Wegdeel

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bgt: <https://bgt.basisregistraties.overheid.nl/bgt/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?registratie;
    sdo:name 'BGT geometrie';
    sdo:polygon ?polygon.
  ?place
    a sdo:Place;
    prov:wasDerivedFrom ?registratie;
    sdo:additionalType
      bgt:Wegdeel,
      ?functie,
      ?fysiekVoorkomen,
      ?plusFunctie,
      ?plusFysiekVoorkomen;
    sdo:geo ?geoShape;
    sdo:name ?placeName.
}

from named <https://bgt.basisregistraties.overheid.nl/bgt/def/>
from named <https://bgt.basisregistraties.overheid.nl/bgt/id/graph/instanties>

where {
  # identity
  ?registratie a bgt:WegdeelRegistratie.
  filter not exists { ?registratie prov:invalidatedAtTime []. }
  # the rest
  ?registratie
    bgt:bgt_fysiekVoorkomen ?fysiekVoorkomen0;
    bgt:bronhouder/skos:prefLabel ?bronhouderNaam;
    bgt:functie ?functie;
    bgt:geometrie ?vlakRd;
    foaf:primaryTopic/bgt:identificatie/nen3610:lokaalID ?id.
  optional { ?registratie bgt:plusFunctie ?plusFunctie. }
  optional { ?registratie bgt:plus_fysiekVoorkomen ?plusFysiekVoorkomen0. }

  bind(iri(concat('https://bgt.basisregistraties.overheid.nl/bgt/id/fysiek-voorkomen/',
                  ?fysiekVoorkomen0)) as ?fysiekVoorkomen)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/bgt-',
                  ?id)) as ?geoShape)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?id)) as ?place)
  bind(if(bound(?naam),
          ?naam,
          concat('Een wegdeel van bronhouder ',?bronhouderNaam)) as ?placeName)
  bind(iri(concat('https://bgt.basisregistraties.overheid.nl/bgt/id/fysiek-voorkomen/',
                  ?plusFysiekVoorkomen0)) as ?plusFysiekVoorkomen)
  bind(tfg:project(?vlakRd) as ?polygon)
}

BRT Wegdeel

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix brt: <https://brt.basisregistraties.overheid.nl/brt/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?geoCoordinates
    a sdo:GeoCoordinates;
    prov:wasDerivedFrom ?registratie;
    sdo:latitude ?latitude;
    sdo:longitude ?longitude;
    sdo:name 'BRT geometrie'.
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?registratie;
    sdo:name 'BRT geometrie';
    sdo:polygon ?polygon.
  ?place
    a sdo:Place;
    prov:wasDerivedFrom ?registratie;
    sdo:additionalType
      brt:Wegdeel,
      ?fysiekVoorkomen,
      ?hoofdverkeersgebruik,
      ?typeInfrastructuur,
      ?typeWeg,
      ?verhardingstype;
    sdo:geo
      ?geoCoordinates,
      ?geoShape;
    sdo:name ?name.
}

Technische Implementatie Overig

BGT Brug

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix bgt: <https://bgt.basisregistraties.overheid.nl/bgt/def/>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix nen3610: <http://definities.geostandaarden.nl/def/nen3610#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix tfg: <https://triplydb.com/Triply/functions/geo/>

construct {
  ?bridge
    a sdo:Bridge;
    prov:wasDerivedFrom ?registratie;
    sdo:additionalType ?type;
    sdo:geo ?geoShape;
    sdo:name ?name.
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?registratie;
    sdo:name 'BGT geometrie';
    sdo:polygon ?polygon.
}

from named <https://bgt.basisregistraties.overheid.nl/bgt/def/>
from named <https://bgt.basisregistraties.overheid.nl/bgt/id/graph/instanties>

where {
  # Brug: identity
  ?registratie bgt:hoortBijTypeOverbrugging bgt:Brug.
  filter not exists { ?registratie prov:invalidatedAtTime []. }
  # Brug: the rest
  ?registratie
    bgt:bronhouder/skos:prefLabel ?bronhouderNaam;
    bgt:geometrie ?vlakRd;
    bgt:typeOverbruggingsdeel ?type;
    foaf:primaryTopic/bgt:identificatie/nen3610:lokaalID ?id.

  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  ?id)) as ?bridge)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/bgt-',
                  ?id)) as ?geoShape)
  bind(concat('Een brugdeel van bronhouder ',?bronhouderNaam) as ?name)
  bind(tfg:project(?vlakRd) as ?polygon)
}

RCE Monumenten

De bijbehorende tabel vindt u hier en de bijbehorende Weaver model vindt u hier.

prefix ceo: <https://linkeddata.cultureelerfgoed.nl/def/ceo#>
prefix geo: <http://www.opengis.net/ont/geosparql#>
prefix prov: <http://www.w3.org/ns/prov#>
prefix sdo: <https://schema.org/>

construct {
  ?place
    a sdo:Place;
    prov:wasDerivedFrom ?rijksmonument;
    sdo:additionalType ceo:Rijksmonument;
    sdo:geo ?geoShape;
    sdo:name ?name.
  ?geoShape
    a sdo:GeoShape;
    prov:wasDerivedFrom ?geometrie;
    sdo:name 'RCE geometrie';
    sdo:polygon ?polygon.
}

from named <https://linkeddata.cultureelerfgoed.nl/id/ceo/>

where {
  ?rijksmonument
    a ceo:Rijksmonument;
    ceo:heeftGeometrie ?geometrie;
    ceo:rijksmonumentnummer ?nummer.
  optional { ?rijksmonument ceo:heeftNaam/ceo:naam ?name. }
  ?geometrie geo:asWKT ?polygon.
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/place/',
                  str(?nummer))) as ?place)
  bind(iri(concat('https://data.labs.kadaster.nl/kadaster/kg/id/geo-shape/rce-',
                  str(?nummer))) as ?geoShape)
}