I am trying to write a SPARQL query on dbpedia.com to find cultural and historical locations nearby given coordinates. I found this example which finds things within 20 km of New York.
SELECT DISTINCT ?resource ?label ?location
WHERE
{
<http://dbpedia.org/resource/New_York_City> geo:geometry ?sourcegeo .
?resource geo:geometry ?location ;
rdfs:label ?label .
FILTER( bif:st_intersects( ?location, ?sourcegeo, 20 ) ) .
FILTER( lang( ?label ) = "en" )
}
I would like to write a query that will list all the cultural and historical places based on distance I write in query, in this example 20km. How am I suppose to do this?