{toc}
h1. Overview
*_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) | https://en.wikipedia.org/wiki/Geography_Markup_Language] and [Well-Known Text (WKT) | https://en.wikipedia.org/wiki/Well-known_text] 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
GraphDB 6.X introduces support for GeoSPARQL.
h1. Installation
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{*}}}).
h1. Usage examples
h3. Plugin control predicates
The plugin allows you to configure it through SPARQL-Update queries with embedded control predicates:
h4. Enable plugin
{code}
PREFIX : <http://www.ontotext.com/plugins/geosparql#>
INSERT DATA {
_:s :enabled "true" .
}
{code}
NOTE: The object literal can be written also as an _xsd boolean_ type by including a _xsd_ prefix:
{code}
PREFIX : <http://www.ontotext.com/plugins/geosparql#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
INSERT DATA {
_:s :enabled "true"^^xsd:boolean .
}
{code}
h4. Disable plugin
{code}
PREFIX : <http://www.ontotext.com/plugins/geosparql#>
INSERT DATA {
_:s :enabled "false" .
}
{code}
NOTE: The object literal can be written also as an _xsd boolean_ type by including a _xsd_ prefix:
{code}
PREFIX : <http://www.ontotext.com/plugins/geosparql#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
INSERT DATA {
_:s :enabled "false"^^xsd:boolean .
}
{code}
h4. 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.
{code}
PREFIX : <http://www.ontotext.com/plugins/geosparql#>
INSERT DATA {
_:s :forceReindex ""
}
{code}
h3. GeoSPARQL Predicates
h1. Overview
*_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) | https://en.wikipedia.org/wiki/Geography_Markup_Language] and [Well-Known Text (WKT) | https://en.wikipedia.org/wiki/Well-known_text] 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
GraphDB 6.X introduces support for GeoSPARQL.
h1. Installation
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{*}}}).
h1. Usage examples
h3. Plugin control predicates
The plugin allows you to configure it through SPARQL-Update queries with embedded control predicates:
h4. Enable plugin
{code}
PREFIX : <http://www.ontotext.com/plugins/geosparql#>
INSERT DATA {
_:s :enabled "true" .
}
{code}
NOTE: The object literal can be written also as an _xsd boolean_ type by including a _xsd_ prefix:
{code}
PREFIX : <http://www.ontotext.com/plugins/geosparql#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
INSERT DATA {
_:s :enabled "true"^^xsd:boolean .
}
{code}
h4. Disable plugin
{code}
PREFIX : <http://www.ontotext.com/plugins/geosparql#>
INSERT DATA {
_:s :enabled "false" .
}
{code}
NOTE: The object literal can be written also as an _xsd boolean_ type by including a _xsd_ prefix:
{code}
PREFIX : <http://www.ontotext.com/plugins/geosparql#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
INSERT DATA {
_:s :enabled "false"^^xsd:boolean .
}
{code}
h4. 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.
{code}
PREFIX : <http://www.ontotext.com/plugins/geosparql#>
INSERT DATA {
_:s :forceReindex ""
}
{code}
h3. GeoSPARQL Predicates