blob: ae209832b12d4d9fbb228744c8deecd36faac915 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<title>Apache Jena - GeoSPARQL Fuseki</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="/css/bootstrap-icons.css" rel="stylesheet" media="screen"><link rel="stylesheet" type="text/css" href="https://jena.apache.org/sass/jena.1b17c39a117e22b46db4c66f6395dc27c134a60377d87d2d5745b8600eb69722.css" integrity="sha256-GxfDmhF&#43;IrRttMZvY5XcJ8E0pgN32H0tV0W4YA62lyI=">
<link rel="shortcut icon" href="/images/favicon.ico" />
</head>
<body>
<nav class="navbar navbar-expand-lg bg-body-tertiary" role="navigation">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="/index.html">
<img class="logo-menu" src="/images/jena-logo/jena-logo-notext-small.png" alt="jena logo">Apache Jena</a>
</div>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li id="homepage" class="nav-item"><a class="nav-link" href="/index.html"><span class="bi-house"></span> Home</a></li>
<li id="download" class="nav-item"><a class="nav-link" href="/download/index.cgi"><span class="bi-download"></span> Download</a></li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false"><span class="bi-journal"></span> Learn <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-header">Tutorials</li>
<li><a class="dropdown-item" href="/tutorials/index.html">Overview</a></li>
<li><a class="dropdown-item" href="/documentation/fuseki2/index.html">Fuseki Triplestore</a></li>
<li><a class="dropdown-item" href="/documentation/notes/index.html">How-To's</a></li>
<li><a class="dropdown-item" href="/documentation/query/manipulating_sparql_using_arq.html">Manipulating SPARQL using ARQ</a></li>
<li><a class="dropdown-item" href="/tutorials/rdf_api.html">RDF core API tutorial</a></li>
<li><a class="dropdown-item" href="/tutorials/sparql.html">SPARQL tutorial</a></li>
<li><a class="dropdown-item" href="/tutorials/using_jena_with_eclipse.html">Using Jena with Eclipse</a></li>
<li class="dropdown-divider"></li>
<li class="dropdown-header">References</li>
<li><a class="dropdown-item" href="/documentation/index.html">Overview</a></li>
<li><a class="dropdown-item" href="/documentation/query/index.html">ARQ (SPARQL)</a></li>
<li><a class="dropdown-item" href="/documentation/io/">RDF I/O</a></li>
<li><a class="dropdown-item" href="/documentation/assembler/index.html">Assembler</a></li>
<li><a class="dropdown-item" href="/documentation/tools/index.html">Command-line tools</a></li>
<li><a class="dropdown-item" href="/documentation/rdfs/">Data with RDFS Inferencing</a></li>
<li><a class="dropdown-item" href="/documentation/geosparql/index.html">GeoSPARQL</a></li>
<li><a class="dropdown-item" href="/documentation/inference/index.html">Inference API</a></li>
<li><a class="dropdown-item" href="/documentation/ontology/">Ontology API</a></li>
<li><a class="dropdown-item" href="/documentation/permissions/index.html">Permissions</a></li>
<li><a class="dropdown-item" href="/documentation/extras/querybuilder/index.html">Query Builder</a></li>
<li><a class="dropdown-item" href="/documentation/rdf/index.html">RDF API</a></li>
<li><a class="dropdown-item" href="/documentation/rdfconnection/">RDF Connection - SPARQL API</a></li>
<li><a class="dropdown-item" href="/documentation/rdfstar/index.html">RDF-star</a></li>
<li><a class="dropdown-item" href="/documentation/shacl/index.html">SHACL</a></li>
<li><a class="dropdown-item" href="/documentation/shex/index.html">ShEx</a></li>
<li><a class="dropdown-item" href="/documentation/tdb/index.html">TDB</a></li>
<li><a class="dropdown-item" href="/documentation/tdb2/index.html">TDB2</a></li>
<li><a class="dropdown-item" href="/documentation/query/text-query.html">Text Search</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false"><span class="bi-journal-code"></span> Javadoc <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/documentation/javadoc.html">All Javadoc</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/arq/">ARQ</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/fuseki2/">Fuseki</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/geosparql/">GeoSPARQL</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/jena/">Jena Core</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/permissions/">Permissions</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/extras/querybuilder/">Query Builder</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/shacl/">SHACL</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/tdb/">TDB</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/text/">Text Search</a></li>
</ul>
</li>
</ul>
<form class="d-flex" role="search" action="/search" method="GET">
<div class="input-group">
<input class="form-control border-end-0 border m-0" type="search" name="q" id="search-query" placeholder="Search...." aria-label="Search" style="width: 10rem;">
<button class="btn btn-outline-secondary border-start-0 border" type="submit">
<i class="bi-search"></i>
</button>
</div>
</form>
<ul class="navbar-nav">
<li id="ask" class="nav-item"><a class="nav-link" href="/help_and_support/index.html" title="Ask"><span class="bi-patch-question"></span><span class="text-body d-none d-xxl-inline"> Ask</span></a></li>
<li class="nav-item dropdown">
<a href="#" title="Get involved" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false"><span class="bi-megaphone"></span><span class="text-body d-none d-xxl-inline"> Get involved </span><b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/getting_involved/index.html">Contribute</a></li>
<li><a class="dropdown-item" href="/help_and_support/bugs_and_suggestions.html">Report a bug</a></li>
<li class="dropdown-divider"></li>
<li class="dropdown-header">Project</li>
<li><a class="dropdown-item" href="/about_jena/about.html">About Jena</a></li>
<li><a class="dropdown-item" href="/about_jena/architecture.html">Architecture</a></li>
<li><a class="dropdown-item" href="/about_jena/citing.html">Citing</a></li>
<li><a class="dropdown-item" href="/about_jena/team.html">Project team</a></li>
<li><a class="dropdown-item" href="/about_jena/contributions.html">Related projects</a></li>
<li><a class="dropdown-item" href="/about_jena/roadmap.html">Roadmap</a></li>
<li><a class="dropdown-item" href="/about_jena/security-advisories.html">Security Advisories</a></li>
<li class="dropdown-divider"></li>
<li class="dropdown-header">ASF</li>
<li><a class="dropdown-item" href="https://www.apache.org/">Apache Software Foundation</a></li>
<li><a class="dropdown-item" href="https://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
<li><a class="dropdown-item" href="https://www.apache.org/licenses/LICENSE-2.0">License</a></li>
<li><a class="dropdown-item" href="https://www.apache.org/security/">Security</a></li>
<li><a class="dropdown-item" href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
</ul>
</li>
<li class="nav-item" id="edit"><a class="nav-link" href="https://github.com/apache/jena-site/edit/main/source/documentation/geosparql/geosparql-fuseki.md" title="Edit this page on GitHub"><span class="bi-pencil-square"></span><span class="text-body d-none d-xxl-inline"> Edit this page</span></a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-md-12">
<div id="breadcrumbs">
<ol class="breadcrumb mt-4 p-2 bg-body-tertiary">
<li class="breadcrumb-item"><a href='/documentation'>DOCUMENTATION</a></li>
<li class="breadcrumb-item"><a href='/documentation/geosparql'>GEOSPARQL</a></li>
<li class="breadcrumb-item active">GEOSPARQL FUSEKI</li>
</ol>
</div>
<h1 class="title">GeoSPARQL Fuseki</h1>
<main class="d-flex flex-xl-row flex-column">
<aside class="text-muted align-self-start mb-3 p-0 d-xl-none d-block">
<h2 class="h6 sticky-top m-0 p-2 bg-body-tertiary">On this page</h2>
<nav id="TableOfContents">
<ul>
<li><a href="#jena-fuseki-geosparql"><code>jena-fuseki-geosparql</code></a></li>
<li><a href="#clarifications-on-geosparql">Clarifications on GeoSPARQL</a>
<ul>
<li><a href="#geographic-markup-language-gml">Geographic Markup Language (GML)</a></li>
<li><a href="#geo-predicates-latlon">Geo Predicates Lat/Lon</a></li>
<li><a href="#command-line">Command Line</a>
<ul>
<li><a href="#examples">Examples</a></li>
</ul>
</li>
<li><a href="#embedded-server">Embedded Server</a></li>
</ul>
</li>
<li><a href="#sparql-query-example">SPARQL Query Example</a></li>
<li><a href="#sis_data-environment-variable">SIS_DATA Environment Variable</a></li>
<li><a href="#command-line-arguments">Command Line Arguments</a>
<ul>
<li><a href="#1-port">1) Port</a></li>
<li><a href="#2-dataset-name">2) Dataset name</a></li>
<li><a href="#3-loopback-only">3) Loopback only</a></li>
<li><a href="#4-sparql-update-allowed">4) SPARQL update allowed</a></li>
<li><a href="#5-tdb-folder">5) TDB folder</a></li>
<li><a href="#6-load-rdf-file-into-dataset">6) Load RDF file into dataset</a></li>
<li><a href="#7-load-tabular-file-into-dataset">7) Load Tabular file into dataset</a></li>
<li><a href="#8-geosparql-rdfs-inference">8) GeoSPARQL RDFS inference</a></li>
<li><a href="#9-apply-hasdefaultgeometry">9) Apply hasDefaultGeometry</a></li>
<li><a href="#10-validate-geometry-literals">10) Validate Geometry Literals</a></li>
<li><a href="#11-convert-geo-predicates">11) Convert Geo predicates</a></li>
<li><a href="#12--remove-geo-predicates">12) Remove Geo predicates</a></li>
<li><a href="#13-query-rewrite-enabled">13) Query Rewrite enabled</a></li>
<li><a href="#14-indexing-enabled">14) Indexing enabled</a></li>
<li><a href="#15-index-sizes">15) Index sizes</a></li>
<li><a href="#16-index-expiries">16) Index expiries</a></li>
<li><a href="#17-spatial-index-file">17) Spatial Index file</a></li>
<li><a href="#18-properties-file">18) Properties File</a></li>
</ul>
</li>
<li><a href="#future-work">Future Work</a></li>
</ul>
</nav>
</aside>
<article class="flex-column me-lg-4">
<p>This application provides a HTTP server compliant with the GeoSPARQL standard.</p>
<p>GeoSPARQL can also be integrated with Fuseki using the
<a href="#fuseki-assembler">GeoSPARQL assembler</a> with a general Fuseki server.</p>
<h2 id="jena-fuseki-geosparql"><code>jena-fuseki-geosparql</code></h2>
<p>GeoSPARQL Fuseki can be accessed as an embedded server using Maven etc. from Maven Central or run from the command line.
SPARQL queries directly on Jena Datasets and Models can be done using
the <a href="index.html">GeoSPARQL Jena module</a>.</p>
<pre><code>&lt;dependency&gt;
&lt;groupId&gt;org.apache.jena&lt;/groupId&gt;
&lt;artifactId&gt;jena-fuseki-geosparql&lt;/artifactId&gt;
&lt;version&gt;...&lt;/version&gt;
&lt;/dependency&gt;
</code></pre>
<p>or download the binary from the
<a href="https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-geosparql/">Maven central repository org/apache/jena/jena-fuseki-geosparql</a></p>
<p>This uses the embedded server Fuseki and provides additional parameters for dataset loading.</p>
<p>The project uses the GeoSPARQL implementation from the <a href="index.html">GeoSPARQL Jena module</a>, which includes a range of functions in addition to those from the GeoSPARQL standard.</p>
<p>Currently, there is no GUI interface as provided with this server.</p>
<p>The intended usage is to specify a TDB folder (either TDB1 or TDB2, created if
required) for persistent storage of the dataset. File loading, inferencing and
data conversion operations can also be specified to load and manipulate data
into the dataset. When the server is restarted these conversion operations are
not required again (as they have been stored in the dataset) unless there are
relevant changes. The TDB dataset can also be prepared and manipulated
programatically using the Jena API.</p>
<p>Updates can be made to the dataset while the Fuseki server is running. However,
these changes will not be applied to inferencing and spatial indexes until the
server restarts (any default or specified spatial index file must not exists to
trigger building). This is due to the current implementation of RDFS inferencing
in Jena (and is required in any Fuseki server with inferencing) and the selected
spatial index.</p>
<p>A subset of the EPSG spatial/coordinate reference systems are included by
default from the Apache SIS project (<a href="http://sis.apache.org">http://sis.apache.org</a>). The full EPSG
dataset is not distributed due to the EPSG terms of use being incompatible with
the Apache Licence. Several options are available to include the EPSG dataset
by setting the <code>SIS_DATA</code> environment variable
(<a href="http://sis.apache.org/epsg.html)">http://sis.apache.org/epsg.html)</a>.</p>
<p>It is expected that at least one Geometry Literal or Geo Predicate is present in
a dataset (otherwise a standard Fuseki server can be used). A spatial index is
created and new data cannot be added to the index once built. The spatial index
can optionally be stored for future usage and needs to removed from a TDB folder
if the index is to rebuilt.</p>
<h2 id="clarifications-on-geosparql">Clarifications on GeoSPARQL</h2>
<h3 id="geographic-markup-language-gml">Geographic Markup Language (GML)</h3>
<p>GeoSPARQL refers to the Geographic Markup Language (GML) as one format for
<code>GeometryLiterals</code>. This does not mean that GML is part of the GeoSPARQL
standard. Instead a subset of geometry encodings from the GML standards are
permitted (specifically the <code>GML 2.0 Simple Features Profile (10-100r3)</code> is
supported by GeoSPARQL Jena). The expected encoding of data is in RDF triples
and can be loaded from any RDF file format supported by Apache Jena. Conversion
of GML to RDF is out of scope of the GeoSPARQL standard and Apache Jena.</p>
<h3 id="geo-predicates-latlon">Geo Predicates Lat/Lon</h3>
<p>Historically, geospatial data has frequently been encoded as Latitude/Longitude
coordinates in the WGS84 coordinate reference system. The GeoSPARQL standard
specifically chooses not to adopt this approach and instead uses the more
versatile <code>GeometryLiteral</code>, which permits multiple encoding formats that support
multiple coordinate reference systems and geometry shapes. Therefore, Lat/Lon
Geo Predicates are not part of the GeoSPARQL standard. However, GeoSPARQL Jena
provides two methods to support users with geo predicates in their geospatial
data.</p>
<ol>
<li>Conversion of Geo Predicates to the GeoSPARQL data structure (encoding the Lat/Lon as a Point geometry).</li>
<li>Spatial extension which provides property and filter functions accepting Lat/Lon arguments.</li>
</ol>
<p>The Spatial extension functions (documented in the <a href="index">GeoSPARQL Jena module</a>) support triples in either GeoSPARQL data structure or Geo Predicates. Therefore, converting a dataset to GeoSPARQL will not lose functionality. By converting to the GeoSPARQL data structure, datasets can include a broader range of geospatial data.</p>
<h3 id="command-line">Command Line</h3>
<p>Run from the command line and send queries over HTTP.</p>
<p><code>java -jar jena-fuseki-geosparql-VER.jar ARGS</code></p>
<p>written <code>geosparql-fuseki</code> below.</p>
<h4 id="examples">Examples</h4>
<p><code>java -jar jena-fuseki-geosparql-VER.jar -rf &quot;geosparql_test.rdf&quot; -i</code></p>
<p>The example file <code>geosparql_test.rdf</code> in the GitHub repository contains several geometries in geodectic WGS84 (EPSG:4326).
The example file <code>geosparql_test_27700.rdf</code> is identical but in the projected OSGB36 (EPSG:27770) used in the United Kingdom.
Both will return the same results as GeoSPARQL treats all SRS as being projected.
RDFS inferencing is applied using the GeoSPARQL schema to infer additional relationships (which aren&rsquo;t asserted in the example files) that are used in the spatial operations and data retrieval.</p>
<p>Examples:</p>
<ul>
<li>
<p>Load RDF file (XML format) into memory and run server: <code>geosparql-fuseki -rf &quot;test.rdf&quot;</code></p>
</li>
<li>
<p>Load RDF file (TTL format: default) into memory, apply GeoSPARQL schema with RDFS inferencing and run server: <code>geosparql-fuseki -rf &quot;test.rdf&quot; -i</code></p>
</li>
<li>
<p>Load RDF file into memory, write spatial index to file and run server: <code>geosparql-fuseki -rf &quot;test.rdf&quot; -si &quot;spatial.index&quot;</code></p>
</li>
<li>
<p>Load RDF file into persistent TDB and run server: <code>geosparql-fuseki -rf &quot;test.rdf&quot; -t &quot;TestTDB&quot;</code></p>
</li>
<li>
<p>Load from persistent TDB and run server: <code>geosparql-fuseki -t &quot;TestTDB&quot;</code></p>
</li>
<li>
<p>Load from persistent TDB, change port and run server: <code>geosparql-fuseki -t &quot;TestTDB&quot; -p 3030</code></p>
</li>
</ul>
<p>See <a href="https://github.com/galbiston/rdf-tables">rdf-tables</a> in <em>Output Formats/Serialisations</em> for supported RDF format keywords.</p>
<p><strong>N.B.</strong> Windows Powershell will strip quotation pairs from arguments and so triple quotation pairs may be required, e.g. &ldquo;&ldquo;&ldquo;test.rdf&rdquo;&rdquo;&rdquo;. Otherwise, logging output will be sent to a file called &ldquo;xml&rdquo;. Also, &ldquo;The input line is too long&rdquo; error can mean the path to the exceeds the character limit and needs shortening.</p>
<h3 id="embedded-server">Embedded Server</h3>
<p>Run within a Java application to provide GeoSPARQL support over HTTP to other applications:</p>
<pre><code>FusekiLogging.setLogging();
GeosparqlServer server =
new GeosparqlServer(portNumber, datasetName, isLoopbackOnly, dataset, isUpdate);
</code></pre>
<h2 id="sparql-query-example">SPARQL Query Example</h2>
<p>Once the default server is running it can be queried using Jena as follows:</p>
<pre><code>String service = &quot;http://localhost:3030/ds&quot;;
String query = ....;
try (QueryExecution qe = QueryExecution.service(service).query(query).build()) {
ResultSet rs = qe.execSelect();
ResultSetFormatter.outputAsTSV(rs);
}
</code></pre>
<p>The server will respond to any valid SPARQL HTTP so an alternative SPARQL framework can be used.
More information on SPARQL querying using Jena can be found on their website (<a href="https://jena.apache.org/tutorials/sparql.html)">https://jena.apache.org/tutorials/sparql.html)</a>.</p>
<h2 id="sis_data-environment-variable">SIS_DATA Environment Variable</h2>
<p>The Apache SIS library is used to support the recognition and transformation of Coordinate/Spatial Reference Systems.
These Reference Systems are published as the EPSG dataset.
The full EPSG dataset is not distributed due to the EPSG terms of use being incompatible with the Apache Licence.
A subset of the EPSG spatial/coordinate reference systems are included by default but the wider dataset may be required.
Several options are available to include the EPSG dataset by setting the <code>SIS_DATA</code> environment variable (<a href="http://sis.apache.org/epsg.html)">http://sis.apache.org/epsg.html)</a>.</p>
<p>An embedded EPSG dataset can be included in an application by adding the following dependency:</p>
<ul>
<li>
<p>Gradle dependency in <code>build.gradle</code></p>
<p>ext.sisVersion = &ldquo;0.8&rdquo;
implementation &ldquo;org.apache.sis.non-free:sis-embedded-data:$sisVersion&rdquo;</p>
</li>
<li>
<p>Maven dependency in <code>pom.xml</code></p>
<dependency>
<groupId>org.apache.sis.non-free</groupId>
<artifactId>sis-embedded-data</artifactId>
<version>0.8</version>
</dependency>
</li>
</ul>
<h2 id="command-line-arguments">Command Line Arguments</h2>
<p>Boolean options that have false defaults only require &ldquo;&ndash;option&rdquo; to make true in release v1.0.7 or later.
Release v1.0.6 and earlier use the form &ldquo;&ndash;option true&rdquo;.</p>
<h3 id="1-port">1) Port</h3>
<pre><code>--port, -p
</code></pre>
<p>The port number of the server. Default: 3030</p>
<h3 id="2-dataset-name">2) Dataset name</h3>
<pre><code>--dataset, -d
</code></pre>
<p>The name of the dataset used in the URL. Default: ds</p>
<h3 id="3-loopback-only">3) Loopback only</h3>
<pre><code>--loopback, -l
</code></pre>
<p>The server only accepts local host loopback requests. Default: true</p>
<h3 id="4-sparql-update-allowed">4) SPARQL update allowed</h3>
<pre><code>--update, -u
</code></pre>
<p>The server accepts updates to modify the dataset. Default: false</p>
<h3 id="5-tdb-folder">5) TDB folder</h3>
<pre><code>--tdb, -t
</code></pre>
<p>An existing or new TDB folder used to persist the dataset. Default set to memory dataset.
If accessing a dataset for the first time with GeoSPARQL then consider the <code>--inference</code>, <code>--default_geometry</code> and <code>--validate</code> options. These operations may add additional statements to the dataset. TDB1 Dataset will be used by default, use <code>-t &lt;folder_path&gt; -t2</code> options for TDB2 Dataset.</p>
<h3 id="6-load-rdf-file-into-dataset">6) Load RDF file into dataset</h3>
<pre><code>--rdf_file, -rf
</code></pre>
<p>Comma separated list of [RDF file path#graph name&amp;RDF format] to load into dataset. Graph name is optional and will use default graph. RDF format is optional (default: ttl) or select from one of the following: json-ld, json-rdf, nt, nq, thrift, trig, trix, ttl, ttl-pretty, xml, xml-plain, xml-pretty.
e.g. <code>test.rdf#test&amp;xml,test2.rdf</code> will load <em>test.rdf</em> file into <em>test</em> graph as <em>RDF/XML</em> and <em>test2.rdf</em> into <em>default</em> graph as <em>TTL</em>.</p>
<p>Consider the <code>--inference</code>, <code>--default_geometry</code> and <code>--validate</code> options. These operations may add additional statements to the dataset.</p>
<p>The combination of specifying <code>-t</code> TDB folder and <code>-rf</code> loading RDF file will store the triples in the persistent TDB dataset. Therefore, loading the RDF file would only be required once.</p>
<h3 id="7-load-tabular-file-into-dataset">7) Load Tabular file into dataset</h3>
<pre><code>--tabular_file, -tf
</code></pre>
<p>Comma separated list of [Tabular file path#graph name|delimiter] to load into dataset. See RDF Tables for table formatting. Graph name is optional and will use default graph. Column delimiter is optional and will default to COMMA. Any character except &lsquo;:&rsquo;, &lsquo;^&rsquo; and &lsquo;|&rsquo;. Keywords TAB, SPACE and COMMA are also supported.
e.g. <code>test.rdf#test|TAB,test2.rdf</code> will load <em>test.rdf</em> file into <em>test</em> graph as <em>TAB</em> delimited and <em>test2.rdf</em> into <em>default</em> graph as <em>COMMA</em> delimited.</p>
<p>See RDF Tables project (<a href="https://github.com/galbiston/rdf-tables">https://github.com/galbiston/rdf-tables</a>) for more details on tabular format.</p>
<p>Consider the <code>--inference</code>, <code>--default_geometry</code> and <code>--validate</code> options. These operations may add additional statements to the dataset.</p>
<p>The combination of specifying <code>-t</code> TDB folder and <code>-tf</code> loading tabular file will store the triples in the persistent TDB dataset. Therefore, loading the tabular file would only be required once.</p>
<h3 id="8-geosparql-rdfs-inference">8) GeoSPARQL RDFS inference</h3>
<pre><code>--inference, -i
</code></pre>
<p>Enable GeoSPARQL RDFS schema and inferencing (class and property hierarchy). Inferences will be applied to the dataset. Updates to dataset may require server restart. Default: false</p>
<p>The combination of specifying <code>-t</code> TDB folder and <code>-i</code> GeoSPARQL RDFS inference will store the triples in the persistent TDB dataset. Therefore, the GeoSPARL RDFS inference option would only be required when there is a change to the dataset.</p>
<h3 id="9-apply-hasdefaultgeometry">9) Apply hasDefaultGeometry</h3>
<pre><code>--default_geometry, -dg
</code></pre>
<p>Apply hasDefaultGeometry to single Feature hasGeometry Geometry statements. Additional properties will be added to the dataset. Default: false</p>
<p>The combination of specifying <code>-t</code> TDB folder and <code>-dg</code> apply hasDefaultGeometry will modify the triples in the persistent TDB dataset. Therefore, applying hasDefaultGeometry would only be required when there is a change to the dataset.</p>
<h3 id="10-validate-geometry-literals">10) Validate Geometry Literals</h3>
<pre><code>--validate, -v
</code></pre>
<p>Validate that the Geometry Literals in the dataset are valid. Default: false</p>
<h3 id="11-convert-geo-predicates">11) Convert Geo predicates</h3>
<pre><code>--convert_geo, -c
</code></pre>
<p>Convert Geo predicates in the data to Geometry with WKT WGS84 Point GeometryLiteral. Default: false</p>
<p>The combination of specifying <code>-t</code> TDB folder and <code>-c</code> convert Geo predicates will modify the triples in the persistent TDB dataset. Therefore, converting the Geo predicates would only be required once.</p>
<h3 id="12--remove-geo-predicates">12) Remove Geo predicates</h3>
<pre><code>--remove_geo, -rg
</code></pre>
<p>Remove Geo predicates in the data after combining to Geometry. Default: false</p>
<p>The combination of specifying <code>-t</code> TDB folder and <code>-rg</code> remove Geo predicates will modify the triples in the persistent TDB dataset. Therefore, removing the Geo predicates would only be required once.</p>
<h3 id="13-query-rewrite-enabled">13) Query Rewrite enabled</h3>
<pre><code>--rewrite, -r
</code></pre>
<p>Enable query rewrite extension of GeoSPARQL standard to simplify queries, which relies upon the &lsquo;hasDefaultGeometry&rsquo; property. The &lsquo;default_geometry&rsquo; may be useful for adding the &lsquo;hasDefaultGeometry&rsquo; to a dataset. Default: true</p>
<h3 id="14-indexing-enabled">14) Indexing enabled</h3>
<pre><code>--index, -x
</code></pre>
<p>Enable caching of re-usable data to improve query performance. Default: true
See <a href="index">GeoSPARQL Jena project</a> for more details.</p>
<h3 id="15-index-sizes">15) Index sizes</h3>
<pre><code>--index_sizes, -xs
</code></pre>
<p>List of Index item sizes: [Geometry Literal, Geometry Transform, Query Rewrite]. Unlimited: -1, Off: 0 Unlimited: -1, Off: 0, Default: -1,-1,-1</p>
<h3 id="16-index-expiries">16) Index expiries</h3>
<pre><code>--index_expiry, -xe
</code></pre>
<p>List of Index item expiry in milliseconds: [Geometry Literal, Geometry Transform, Query Rewrite]. Off: 0, Minimum: 1001, Default: 5000,5000,500</p>
<h3 id="17-spatial-index-file">17) Spatial Index file</h3>
<pre><code>--spatial_index, -si
</code></pre>
<p>File to load or store the spatial index. Default to &ldquo;spatial.index&rdquo; in TDB folder if using TDB option and this option is not set. Otherwise spatial index is not stored and rebuilt at start up. The spatial index file must not exist for the index to be built (e.g. following changes to the dataset).</p>
<h3 id="18-properties-file">18) Properties File</h3>
<p>Supply the above parameters as a file:</p>
<pre><code>$ java Main @/tmp/parameters
</code></pre>
<h2 id="future-work">Future Work</h2>
<ul>
<li>GUI to assist users when querying a dataset.</li>
</ul>
</article>
<aside class="text-muted align-self-start mb-3 mb-xl-5 p-0 d-none d-xl-flex flex-column sticky-top">
<h2 class="h6 sticky-top m-0 p-2 bg-body-tertiary">On this page</h2>
<nav id="TableOfContents">
<ul>
<li><a href="#jena-fuseki-geosparql"><code>jena-fuseki-geosparql</code></a></li>
<li><a href="#clarifications-on-geosparql">Clarifications on GeoSPARQL</a>
<ul>
<li><a href="#geographic-markup-language-gml">Geographic Markup Language (GML)</a></li>
<li><a href="#geo-predicates-latlon">Geo Predicates Lat/Lon</a></li>
<li><a href="#command-line">Command Line</a>
<ul>
<li><a href="#examples">Examples</a></li>
</ul>
</li>
<li><a href="#embedded-server">Embedded Server</a></li>
</ul>
</li>
<li><a href="#sparql-query-example">SPARQL Query Example</a></li>
<li><a href="#sis_data-environment-variable">SIS_DATA Environment Variable</a></li>
<li><a href="#command-line-arguments">Command Line Arguments</a>
<ul>
<li><a href="#1-port">1) Port</a></li>
<li><a href="#2-dataset-name">2) Dataset name</a></li>
<li><a href="#3-loopback-only">3) Loopback only</a></li>
<li><a href="#4-sparql-update-allowed">4) SPARQL update allowed</a></li>
<li><a href="#5-tdb-folder">5) TDB folder</a></li>
<li><a href="#6-load-rdf-file-into-dataset">6) Load RDF file into dataset</a></li>
<li><a href="#7-load-tabular-file-into-dataset">7) Load Tabular file into dataset</a></li>
<li><a href="#8-geosparql-rdfs-inference">8) GeoSPARQL RDFS inference</a></li>
<li><a href="#9-apply-hasdefaultgeometry">9) Apply hasDefaultGeometry</a></li>
<li><a href="#10-validate-geometry-literals">10) Validate Geometry Literals</a></li>
<li><a href="#11-convert-geo-predicates">11) Convert Geo predicates</a></li>
<li><a href="#12--remove-geo-predicates">12) Remove Geo predicates</a></li>
<li><a href="#13-query-rewrite-enabled">13) Query Rewrite enabled</a></li>
<li><a href="#14-indexing-enabled">14) Indexing enabled</a></li>
<li><a href="#15-index-sizes">15) Index sizes</a></li>
<li><a href="#16-index-expiries">16) Index expiries</a></li>
<li><a href="#17-spatial-index-file">17) Spatial Index file</a></li>
<li><a href="#18-properties-file">18) Properties File</a></li>
</ul>
</li>
<li><a href="#future-work">Future Work</a></li>
</ul>
</nav>
</aside>
</main>
</div>
</div>
</div>
<footer class="bd-footer py-4 py-md-5 mt-4 mt-lg-5 bg-body-tertiary">
<div class="container" style="font-size:80%" >
<p>
Copyright &copy; 2011&ndash;2024 The Apache Software Foundation, Licensed under the
<a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
</p>
<p>
Apache Jena, Jena, the Apache Jena project logo, Apache and the Apache feather logos are trademarks of
The Apache Software Foundation.
<br/>
<a href="https://privacy.apache.org/policies/privacy-policy-public.html"
>Apache Software Foundation Privacy Policy</a>.
</p>
</div>
</footer>
<script src="/js/popper.min.js.js" type="text/javascript"></script>
<script src="/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/js/improve.js" type="text/javascript"></script>
<script type="text/javascript">
(function() {
'use strict'
const links = document.querySelectorAll(`a[href="${window.location.pathname}"]`)
if (links !== undefined && links !== null) {
for (const link of links) {
link.classList.add('active')
let parentElement = link.parentElement
let count = 0
const levelsLimit = 4
while (['UL', 'LI'].includes(parentElement.tagName) && count <= levelsLimit) {
if (parentElement.tagName === 'LI') {
parentElement.querySelector('a:first-child').classList.add('active')
}
parentElement = parentElement.parentElement
count++
}
}
}
})()
</script>
</body>
</html>