Skip to content

Commit a10fcd1

Browse files
committed
feat: added SIS_DATA variable
1 parent 0482d98 commit a10fcd1

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
lines changed

Dockerfile

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ FROM eclipse-temurin:21-jre-alpine AS base
77
ARG JENA_VERSION=5.4.0
88
ENV JENA_VERSION=${JENA_VERSION}
99

10-
# jq needed for tdb2.xloader, wget for downloading files
11-
RUN apk add --update bash ca-certificates coreutils findutils jq pwgen ruby wget && rm -rf /var/cache/apk/*
10+
# jq needed for tdb2.xloader, wget for downloading files, unzip for SIS datasets
11+
RUN apk add --update bash ca-certificates coreutils findutils jq pwgen ruby wget unzip && rm -rf /var/cache/apk/*
1212

1313
# Config and data
1414
ENV FUSEKI_BASE=/fuseki-base
@@ -36,6 +36,22 @@ RUN echo "Downloading GeoSPARQL extension ${JENA_VERSION}..." && \
3636
"https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-geosparql/${JENA_VERSION}/jena-fuseki-geosparql-${JENA_VERSION}.jar" && \
3737
echo "GeoSPARQL extension downloaded"
3838

39+
# Download and install Apache SIS binary distribution
40+
ENV SIS_HOME=/apache-sis
41+
RUN echo "Downloading Apache SIS binary distribution ${SIS_VERSION}..." && \
42+
wget -O /tmp/apache-sis-${SIS_VERSION}-bin.zip \
43+
"https://dlcdn.apache.org/sis/${SIS_VERSION}/apache-sis-${SIS_VERSION}-bin.zip" && \
44+
echo "Extracting Apache SIS..." && \
45+
cd /tmp && \
46+
unzip -q apache-sis-${SIS_VERSION}-bin.zip && \
47+
mv apache-sis-${SIS_VERSION} $SIS_HOME && \
48+
rm apache-sis-${SIS_VERSION}-bin.zip && \
49+
echo "Apache SIS binary distribution installed"
50+
51+
# Set SIS_DATA environment variable for coordinate reference system support
52+
ENV SIS_DATA=$FUSEKI_BASE/SIS_DATA
53+
ENV PATH=$PATH:$SIS_HOME/bin
54+
3955
# Download, extract and install Jena tools
4056
RUN echo "Downloading Apache Jena ${JENA_VERSION}..." && \
4157
wget -O jena.tar.gz "https://dlcdn.apache.org/jena/binaries/apache-jena-${JENA_VERSION}.tar.gz" && \
@@ -70,7 +86,10 @@ RUN mkdir -p $FUSEKI_BASE/databases
7086

7187
# Set permissions to allow fuseki to run as an arbitrary user
7288
RUN chgrp -R 0 $FUSEKI_BASE \
73-
&& chmod -R g+rwX $FUSEKI_BASE
89+
&& chmod -R g+rwX $FUSEKI_BASE \
90+
&& chgrp -R 0 $SIS_HOME \
91+
&& chmod -R g+rX $SIS_HOME \
92+
&& chmod -R g+rwX $SIS_HOME/log
7493

7594
# Tools for loading data
7695
ENV JAVA_CMD='java -cp "$FUSEKI_HOME/fuseki-server.jar:/javalibs/*"'

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ This Docker container provides Apache Jena Fuseki with built-in GeoSPARQL suppor
1717
### Features
1818

1919
- 🌍 **Spatial Queries**: GeoSPARQL 1.0 support for geometric and topological operations
20-
- 🔍 **Text Search**: Integrated Lucene indexing for SKOS labels and RDF literals
20+
- �️ **Coordinate Systems**: Apache SIS tools for downloading EPSG datasets
21+
- �🔍 **Text Search**: Integrated Lucene indexing for SKOS labels and RDF literals
2122
- 📊 **High Performance**: TDB storage with optimized configurations
2223
- 🔐 **Secure**: Built-in authentication with configurable admin password
2324
- 🐳 **Docker Ready**: Production-ready container with proper security settings
@@ -26,7 +27,7 @@ This Docker container provides Apache Jena Fuseki with built-in GeoSPARQL suppor
2627

2728
More information about the GeoSPARQL implementation of Apache Jena Fuseki can be found in the [official documentation](https://jena.apache.org/documentation/geosparql/).
2829

29-
Limitation: coordinate transformations are currently an issue. Distance calculation seems to be related to this. This probably has something to do with SIS_DATA.
30+
**Note**: This container includes Apache SIS command line tools to enable download of EPSG datasets. The SIS_DATA environment variable is configured to a directory inside /fuseki-base (recommended to as docker volume). It seems that this is insufficient for Jena Fuseki to properly transform coordinates or calculate metric distances for WGS84 coordinates.
3031

3132
## Usage
3233

@@ -192,6 +193,14 @@ The container uses several configuration files in the `config/` directory:
192193
- `shiro.ini` - Security and authentication configuration
193194
- `docker-entrypoint.sh` - Container initialization script
194195

196+
### Apache SIS Configuration
197+
198+
The container includes Apache SIS EPSG datasets for coordinate reference system support:
199+
200+
- **SIS_DATA Path**: `/fuseki-base/SIS_DATA`
201+
- **EPSG Database**: Provides access to thousands of coordinate reference systems
202+
- **Automatic Detection**: SIS automatically detects and uses the EPSG database for transformations
203+
195204
You can override these by mounting your own configuration files:
196205

197206
```bash

0 commit comments

Comments
 (0)