Skip to content

Instantly share code, notes, and snippets.

@ewg118
Created May 13, 2015 03:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ewg118/0bbf7e3c670f7394665f to your computer and use it in GitHub Desktop.
Spatial SPARQL: hoards found within 50 km of Athens
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX nm: <http://nomisma.org/id/>
PREFIX nmo: <http://nomisma.org/ontology#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX spatial: <http://jena.apache.org/spatial#>
SELECT DISTINCT ?hoard ?label ?lat ?long WHERE {
?loc spatial:nearby (37.974722 23.7225 50 'km') ;
geo:lat ?lat ;
geo:long ?long .
?hoard nmo:hasFindspot ?loc ;
a nmo:Hoard
OPTIONAL { ?hoard dcterms:title ?label }
OPTIONAL { ?hoard skos:prefLabel ?label }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment