Skip to content

Instantly share code, notes, and snippets.

@ewg118
Last active October 25, 2019 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ewg118/ca06b64fe52e52a16eeeaa40b4502d19 to your computer and use it in GitHub Desktop.
Save ewg118/ca06b64fe52e52a16eeeaa40b4502d19 to your computer and use it in GitHub Desktop.
Querying direct or parent findspot coords
PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/>
PREFIX crmgeo: <http://www.ics.forth.gr/isl/CRMgeo/>
PREFIX crmsci: <http://www.ics.forth.gr/isl/CRMsci/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX kid: <http://kerameikos.org/id/>
PREFIX kon: <http://kerameikos.org/ontology#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?place ?label ?lat ?long WHERE {
?object crmsci:O19i_was_object_found_by ?encounter .
?encounter a crmsci:S19_Encounter_Event .
{?encounter crm:P7_took_place_at ?place .
?place geo:location ?loc .
?loc geo:lat ?lat ;
geo:long ?long}
UNION {?encounter crm:P7_took_place_at/crm:P89_falls_within ?place .
?place geo:location ?loc .
?loc geo:lat ?lat ;
geo:long ?long}
OPTIONAL {?place skos:prefLabel ?label FILTER (langMatches(lang(?label), "en"))}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment