Sophox / sophox

A collection of services exposing OSM data, metadata, and other microservices
Apache License 2.0
31 stars 5 forks source link

wikidata on sophox ? #12

Open nlehuby opened 5 years ago

nlehuby commented 5 years ago

Does Sophox still contains wikidata data ? I can't get any query working

For instance, I don't get any matches for this one :

SELECT * WHERE {
  ?osmId osmt:place ?place.
  ?osmId osmt:wikidata ?wd.
  ?wd wdt:P31 ?type.
}
LIMIT 10

https://tinyurl.com/y5so7hnh

camelCaseNick commented 4 years ago

RDF Linked Data for SPARQL queries aren't meant to be copied, but rather queried from all sources inside one query with a federated query.

While the sophox endpoint https://sophox.org/sparql doesn't contain any wikidata entries anymore, the wikidata endpoint https://query.wikidata.org/sparql does.

The following query to the sophox endpoint is equivalent to the original one with directly fetching from wikidata:

select * where {
  ?osm osmt:place ?place;
       osmt:wikidata ?wd.
  service <https://query.wikidata.org/sparql> {
    ?wd wdt:P31 ?type.
  }
}
limit 10
nlehuby commented 4 years ago

Thanks for your answer. I found this request on Sophox documentation, under the "Hello (OSM SPARQL) World" paragraph so it may need an update.

matkoniecz commented 2 years ago

Does Sophox still contains wikidata data ?

per https://wiki.openstreetmap.org/wiki/Sophox

Sophox no longer contains a copy of the Wikidata data due to space and performance limitations. Use federated query to call out into Wikidata's sparql endpoint.