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.X introduces support for GeoSPARQL.
The GeoSPARQL support is implemented as a GraphDB plugin, which is currently not included by default. To include the plugin follow these steps:
- Locate the plugin zip file in the plugins/geosparql-plugin folder of the GraphDB distribution.
- Unzip the file into your plugins directory (by default root_of_unpacked_web_app/WEB-INF/classes/plugins).
The plugin allows you to configure it through SPARQL-Update queries with embedded control predicates:
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:
- [OWLIMint:File1 |^simple_features_geometries.rdf]
- [OWLIMint:File2 |^geosparql-example.rdf]
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.