Skip to content

Instantly share code, notes, and snippets.

@kendall kendall/geo.sparql
Last active Aug 29, 2015

Embed
What would you like to do?
Geospatial query answering in Stardog
prefix geof: <http://www.opengis.net/def/function/geosparql/>
prefix geo: <http://www.opengis.net/ont/geosparql#>
//get locations within 2km of Complexible HQ
select ?name where {
?loc rdfs:label ?name .
?loc geo:hasGeometry ?feature .
?hq geo:hasGeometry ?hqGeo ; rdfs:label "Complexible Headquarters" .
?feature geof:nearby (?hqGeo 2 <http://www.qudt.org/qudt/owl/1.0.0/unit/Instances.html#Kilometer>).
}
// results: `Complexible Headquarters`, `White House`, and `Smithsonian Museum of Natural History`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.