presented by KONA LLC
SPARQL | JenaSpatial (replaced geospatial index for jena)
The GeoSPARQL release 2008 has been retired in September 2021.
The implementation 2008 was based on work by Marco Neumann first published in
"Spatially Navigating the Semantic Web"
First International Workshop on Semantic Web and Databases. VLDB 2003
For further information on the new OGC GeoSPARQL standard see
OGC GeoSPARQL - A Geographic Query Language for RDF Data
PREFIX co: <http://www.geonames.org/countries/#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX spatial: <http://jena.apache.org/spatial#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX gn: <http://www.geonames.org/ontology#> PREFIX foaf:<http://xmlns.com/foaf/0.1/> PREFIX loticoowl:<http://www.lotico.com/ontology/> PREFIX units: <http://www.opengis.net/def/uom/OGC/1.0/> SELECT ?object WHERE { ?object spatial:nearby(2 1 100 units:kilometer). } LIMIT 10
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX spatial: <http://jena.apache.org/spatial#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?object WHERE { ?object geo:lat ?lat. ?object geo:long ?long. FILTER((xsd:double(?lat)>=40.73) && (xsd:double(?long)>=-74) && (xsd:double(?lat)<=41) && (xsd:double(?long)<=-73.98)) } LIMIT 20