Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
Geospatial query answering in Stardog
prefix geof: <>
prefix geo: <>
//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 <>).
// 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