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:
- Locate the plugin zip file in the plugins/geosparql folder of the GraphDB distribution.
- 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.|
The plugin allows you to configure it through SPARQL-Update queries with embedded control predicates:
When the plugin is enabled it will index all existing GeoSPARQL data in the repository and automatically reindex any updates.
When the plugin is disabled it will not index any data or process updates. It will not handle any of the GeoSPARQL predicates either.
Usually this is a configuration option which could be used in cases where your index files
are either corrupted or have been mistakenly deleted.
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
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.