View Source

{toc}

h1. Overview

h1. Installation

The GeoSPARQL support is implemented as a GraphDB plugin, which is currently not enabled by default. To enable 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}