Search code examples
sparqlrdfopenstreetmap

rdfs:label does not match in SPARQL. Divergence between the public interface and SPARQL dataset


I am trying this query at LinkedGeoData endpoint:

SELECT distinct * where {
?var rdfs:label "Arabian Courtyard Hotel & Spa".
?var geo:lat ?lat.
?var geo:long ?lon.
}

I know this object exists, but this query returns null. I can access the object with the URI: http://linkedgeodata.org/page/triplify/node315528887

The rdfs:label is an exact match, but the query returns an empty result set.

However, If I modify the query second line I can obtain the object:

SELECT distinct * where {
?var rdfs:label "Arabian Courtyard".
?var geo:lat ?lat.
?var geo:long ?lon.
}

Is this issue related to '&' character? Can I fix this?


Solution

  • The difference is in the source of the data:

    1. The data in the SPARQL endpoint is based on an RDF dump which is more than one year old.

    2. The data that will be shown when you open the resource in the browser is provided by the SPARQL-SQL rewriter Sparqlify based on an periodically synchronized SQL dump, thus, the data is up-to-date with the OpenStreetMap SQL dataset. This data can also be queried via SPARQL using either the SPARQL service or the Web Interface.