This repository contains the Dockerfile to build Jena GeoSPARQL Fuseki HTTP server. GeoSPARQL Fuseki uses the embedded server Fuseki and provides additional command line parameters for spatial dataset loading. The original implimentation can be found in the galbiston/geosparql-fuseki repository and was merged into the main Jena tree as of Jena release 3.12.0. This build of Jena Fuseki with GeoSPARQL support is somewhat "Experimental" and is NOT suitable for production release without modification.
Some of the container options are based off of the blankdots(docker-SemanticWebApps)[https://github.com/blankdots/docker-SemanticWebApps] build configuration for apache-fuseki. This includes the use of gosu to manage container permissions. By default, GeoSPARQL-Fuseki starts on port 3030.
The Dockerfile is constructed as a mult-stage build to keep the final container size smaller than if it had the entire Jena source tree contained within its file system. To build the container:
docker build --rm -f "Dockerfile" -t charlesvardeman/geosparql-fuseki:latest "."
To construct the "build image", you can specify the target build stage in the Docker build command line.
docker build --target builder -t charlesvardeman/geosparql-fuseki:latest "."
To remove the intermediate build images:
docker image prune --filter label=stage=builder
Prebuilt containers for the Jena github master snapshot (cvardman/fuseki-geosparql:latest) and Jena releases (for example cvardman/fuseki-geosparql:jena-3.13.1) are available in dockerhub.
The docker image is provisioned by default with the test GeoSPARQL dataset which is loaded by default when the container starts.
Command line arguments are set via environment variables in the "docker-entrypoint.sh" script. See this script for the latest options.
Boolean options that have false defaults only require "--option" to make true in release v1.0.7 or later. Release v1.0.6 and earlier use the form "--option true".
--port, -p
env PORT=(port number)
The port number of the server. Default: 3030
--dataset, -d
The name of the dataset used in the URL. Default: ds
--loopback, -l
The server only accepts local host loopback requests. Default: true
--update, -u
The server accepts updates to modify the dataset. Inferencing and spatial indexing will not be applied until the server is restarted. Default: false
--tdb, -t
An existing or new TDB folder used for the dataset. Default set to memory dataset.
If accessing a dataset for the first time with GeoSPARQL then consider the --inference
, --default_geometry
and --validate
options. These operations may add additional statements to the dataset.
--rdf_file, -rf
Comma separated list of [RDF file path#graph name&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. test.rdf#test&xml,test2.rdf
will load test.rdf file into test graph as RDF/XML and test2.rdf into default graph as TTL.
Consider the --inference
, --default_geometry
and --validate
options. These operations may add additional statements to the dataset.
--tabular_file, -tf
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 ':', '^' and '|'. Keywords TAB, SPACE and COMMA are also supported.
e.g. test.rdf#test|TAB,test2.rdf
will load test.rdf file into test graph as TAB delimited and test2.rdf into default graph as COMMA delimited.
See RDF Tables project (https://github.com/galbiston/rdf-tables) for more details on tabular format.
Consider the --inference
, --default_geometry
and --validate
options. These operations may add additional statements to the dataset.
--inference, -i
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
--default_geometry, -dg
Apply hasDefaultGeometry to single Feature hasGeometry Geometry statements. Additional properties will be added to the dataset. Default: false
--validate, -v
Validate that the Geometry Literals in the dataset are valid. Default: false
--convert_geo, -c
Convert Geo predicates in the data to Geometry with WKT WGS84 Point GeometryLiteral. Default: false
--remove_geo, -rg
Remove Geo predicates in the data after combining to Geometry.
--rewrite, -r
Enable query rewrite extension of GeoSPARQL standard to simplify queries, which relies upon the 'hasDefaultGeometry' property. The 'default_geometry' may be useful for adding the 'hasDefaultGeometry' to a dataset. Default: true
--index, -x
Enable caching of re-usable data to improve query performance. Default: true See GeoSPARQL Jena project (https://github.com/galbiston/geosparql-jena) for more details.
--index_sizes, -xs
List of Index item sizes: [Geometry Literal, Geometry Transform, Query Rewrite]. Unlimited: -1, Off: 0 Unlimited: -1, Off: 0, Default: -1,-1,-1
--index_expiry, -xe
List of Index item expiry in milliseconds: [Geometry Literal, Geometry Transform, Query Rewrite]. Off: 0, Minimum: 1001, Default: 5000,5000,5000
--spatial_index, -si
File to load or store the spatial index. Default to "spatial.index" in TDB folder if using TDB and not set. Otherwise spatial index is not stored.