Introduction

GeoSPARQL is a standard for representation and querying of geospatial linked data for the Semantic Web from the Open Geospatial Consortium (OGC). It provides:

On top of the standard GeoSPARQL functions, AllegroGraph also implemented a few useful extentions, including Geohash indexing as well as proximity queries.

There is a tutorial demonstrating how to use GeoSPARQL in AllegroGraph using AllegroGraph's Python APIs. This tutorial can be found at https://github.com/franzinc/agraph-examples/blob/master/geosparql/geosparql-tutorial.ipynb.

We implement much the functionality specified by the Consortium. Here is a discussion of the implementation followed by a list of what is implemented.

GeoSPARQL contains a small spatial domain OWL ontology that allow literal representations of geometries to be associated with spatial features and for features to be associated with other features using spatial relations. GeoSPARQL also contains SPARQL extension function definitions that can be used to calculate relations between spatial objects. Several other supporting assets are also contained within GeoSPARQL such as vocabularies of Simple Feature types and data validators. The namespace for the GeoSPARQL ontology is

<http://www.opengis.net/ont/geosparql#> 

The suggested prefix for this namespace is geo. The namespace for the GeoSPARQL functions is

<http://www.opengis.net/def/function/geosparql/> 

The suggested prefix for this namespace is geof. That is, queries should have these prefixes defined:

PREFIX geo: <http://www.opengis.net/ont/geosparql#>  
PREFIX geof: <http://www.opengis.net/def/function/geosparql/> 

See the Namespaces and query options for information on defining namespaces to the system so PREFIXes need not be added to every query.

Here are the implemented features. Each (except the AllegroGraph-specific extensions) is described in detail in the OGC GeoSPARQL - A Geographic Query Language for RDF Data document (search for the name without the prefix).

Serialization format (recognized in AllgroGraph):

Simple Features Relation Family provided as magic properties

Simple Features Relation Family provided as SPARQL functions

Egenhofer Relation Family provided as SPARQL functions

RCC8 Relation Family provided as SPARQL functions

Non-topological Query Functions

**Franz's extentions (provided as magic properties. The geoext namespace expands to http://franz.com/ns/allegrograph/3ns-allegrograph-3.0-geosparql-ext.html.0/geosparql/ext#)