Last active
August 29, 2015 14:24
-
-
Save kendall/b699db38ec4c0034eba2 to your computer and use it in GitHub Desktop.
Geospatial query answering in Stardog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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