GeoSPARQL support

Skip to end of metadata
Go to start of metadata
This documentation is NOT for the latest version of GraphDB.

Latest version - GraphDB 7.1

GraphDB Documentation

Next versions

GraphDB 6.6
GraphDB 7.0
GraphDB 7.1

Previous versions

GraphDB 6.4
GraphDB 6.3
GraphDB 6.2
GraphDB 6.0 & 6.1

[OWLIM 5.4]
[OWLIM 5.2]
[OWLIM 5.1]
[OWLIM 5.0]
[OWLIM 4.4]
[OWLIM 4.3]
[OWLIM 4.2]
[OWLIM 4.1]
[OWLIM 4.0]


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

  • a small topological ontology in RDFS/OWL for representation using Geography Markup Language (GML) and Well-Known Text (WKT) literals
  • Simple Features, RCC8, and DE-9IM (a.k.a. Egenhofer) topological relationship vocabularies and ontologies for qualitative reasoning
  • a SPARQL query interface using a set of topological SPARQL extension functions for quantitative reasoning

A simplified diagram of some geometry classes and properties:

GraphDB 6.5 introduces support for GeoSPARQL.


The GeoSPARQL support is implemented as a GraphDB plugin, which is currently not installed by default. To install the plugin follow these steps:

  1. Locate the plugin zip file in the plugins/geosparql folder of the GraphDB distribution.
  2. Unzip the file into your plugins directory (by default root_of_unpacked_web_app/WEB-INF/classes/plugins).
Note that you still have to enable the plugin after you install it. See Enable plugin for more information.


Plugin control predicates

The plugin allows you to configure it through SPARQL-Update queries with embedded control predicates:

Enable plugin

When the plugin is enabled it will index all existing GeoSPARQL data in the repository and automatically reindex any updates.

Disable plugin

When the plugin is disabled it will not index any data or process updates. It will not handle any of the GeoSPARQL predicates either.

Force reindex GeoSPARQL geometry data

Usually this is a configuration option which could be used in cases where your index files
are either corrupted or have been mistakenly deleted.

GeoSPARQL Predicates

Some examples of select queries on geographic data. For demo purposes just import the following files:

and run the following queries queries on them:

  • Example 1
  • Example 2
  • Example 3
  • Example 4
  • Example 5
  • Example 6
Using geometry literals in the object position is a GraphDB extension and not part of the GeoSPARQL specification.

For more information regarding GeoSPARQL predicates and functions please look at the current official spec : OGC 11-052r4, Version: 1.0, Approval Date: 2012-04-27, Publication Date: 2012-09-10.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.