1

Is it possible to use the "around" service as a filter, for example to search for a place name in a country and limit results to those within a given distance of a known point.

For example, limit results of the following search to those within 50km of

"Point(-98.966111 19.310278)"^^geo:wktLiteral

SELECT distinct ?item ?itemLabel ?countryLabel ?geom

WHERE { 
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

  ?item rdfs:label "Santa Catarina"@en ;
   (wdt:P31/wdt:P279*) ?itemType ;
    wdt:P17 ?country .
    ?country rdfs:label "Mexico"@en .

  # human settlement | archaeological site  
  FILTER (?itemType = wd:Q486972 || ?itemType = wd:Q839954) .

  # coordinate location
  OPTIONAL {?item wdt:P625 ?geom . }
}
3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.