Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BAG #695

Open
ddeboer opened this issue Jun 27, 2022 · 6 comments
Open

Add BAG #695

ddeboer opened this issue Jun 27, 2022 · 6 comments
Labels
catalog Issues about the catalog of terminology sources discuss enhancement New feature or request

Comments

@ddeboer
Copy link
Member

ddeboer commented Jun 27, 2022

@ddeboer ddeboer added enhancement New feature or request catalog Issues about the catalog of terminology sources discuss labels Jun 27, 2022
@ddeboer ddeboer mentioned this issue Aug 19, 2022
@ddeboer
Copy link
Member Author

ddeboer commented Feb 15, 2024

The idea is that we want to search street, number and place name.

@rschalkrce has produced a pure SPARQL query that unfortunately is not performance enough. Can you paste your query here?

I think we need a fulltext search index here.

@pmaria Do you happen to know if Kadaster offers such an index?

@rschalkrce
Copy link
Contributor

rschalkrce commented Feb 15, 2024

The query is something like below. It works well if you exclude the ?huisnummer from ?searchfield but that is not a viable search strategy for addresses.

PREFIX nen3610: <https://data.kkg.kadaster.nl/nen3610/model/def/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix kad: <https://data.kkg.kadaster.nl/kad/model/def/>
prefix sor: <https://data.kkg.kadaster.nl/sor/model/def/>
prefix bag: <http://bag.basisregistraties.overheid.nl/def/bag#>

CONSTRUCT {

  ?verblijfsobject
    a skos:Concept ;
    skos:prefLabel ?label ;
    skos:altLabel ?gebouwId .
}

WHERE {
    ?ruimte
        a sor:OpenbareRuimte ;
        skos:prefLabel ?straat_label .
    ?ruimte
    sor:ligtIn/skos:prefLabel ?plaats_label .
      
  ?nummeraanduiding
    sor:ligtAan ?ruimte ;
    ^sor:hoofdadres ?verblijfsobject ;
    sor:postcode ?postcode ;
    sor:huisnummer ?huisnummer .
  optional { ?nummeraanduiding sor:huisnummertoevoeging ?huisnummer_toevoeging }

  ?verblijfsobject
    sor:maaktDeelUitVan ?gebouw .

  FILTER(CONTAINS(LCASE(str(?searchfield)), LCASE(str("engweg 6 bunnik")))) # string vervangen door zoekquery gebruiker Termennetwerk
  BIND(LCASE(CONCAT(STR(?straat_label)," ",STR(?huisnummer), " ", STR(?plaats_label))) as ?searchfield)
  
  BIND(strafter(str(?gebouw), "gebouw/") as ?gebouwId)
  BIND(CONCAT(STR(?straat_label), " ", STR(?huisnummer),IF(BOUND(?huisnummer_toevoeging), ?huisnummer_toevoeging, ""), " ", STR(?postcode), " ", STR(?plaats_label)) as ?label)

} LIMIT 1000

@pmaria
Copy link

pmaria commented Feb 15, 2024

You could perhaps use the PDOK locatieserver: https://www.pdok.nl/pdok-locatieserver

Could you elaborate a bit more on the use case?

@rschalkrce
Copy link
Contributor

rschalkrce commented Feb 16, 2024

@pmaria the use case is the add Kadaster addresses (?verblijfsobject) to the Network of Terms, so that these URI's can be used to geolocate/identify objects in digital heritage collections. The Network of Terms can only retrieve URI's by accessing endpoints like the Kadaster through SPARQL queries, so I think your proposed solution will not work.

Do you perhaps know if the Kadaster SPARQL endpoint supports text indexing?

@ddeboer
Copy link
Member Author

ddeboer commented Feb 16, 2024

The Kadaster SPARQL endpoint runs on Triply (Speedy).

@rschalkrce
Copy link
Contributor

I am aware of that, but perhaps there was some built-in indexing we were not aware of ;) I have been in contact with Kadaster and they will reach out to Triply about this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
catalog Issues about the catalog of terminology sources discuss enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants