Checkout source code
Apache SIS source code is maintained using Git version control, completed by optional data maintained using Subversion version control. Optional data include in particular the EPSG geodetic dataset, which is subject to licensing terms different than Apache ones. This page describes two ways to checkout Apache SIS source code:
- A basic checkout with only the main repository, the most stable branch, and no configuration requirement.
- A more advanced configuration for active SIS developments, using uncommitted (for now) API and including optional data for more extensive tests.
It is possible to start with the basic checkout and migrate to the advanced configuration later, or to cherry-pick only the interesting parts of the advanced configuration.
Create an empty directory for the Apache SIS project.
ApacheSIS directory name in this page, but that name can be anything.
Replace that name in the shell commands below if another name is used.
The Apache SIS source code can be cloned in that directory as below
(lines starting with
# are comments and can be ignored):
git clone https://gitbox.apache.org/repos/asf/sis
# Alternatively, GitHub mirror can also be used:
# git clone https://github.com/apache/sis
# or Subversion (read-only):
# svn checkout https://github.com/apache/sis/trunk
If JavaFX is available on the local machine,
its JAR files location can be specified as below
/usr/lib/jvm/openjfx path as needed).
The JavaFX application is excluded by default because it depends on
the [JavaFX platform][JavaFX] which is distributed under GPL license
(note that the SIS module stay under Apache 2 licence).
# Syntax for Unix shell
Likewise the EPSG geodetic dataset is excluded by default for licensing reasons.
Then, Apache SIS can be built as below:
gradle publishToMavenLocal # If use with Maven projects is desired.
Outputs will be located in the following sub-directories:
endorsed/build/libs/for the JAR files of the core library and its dependencies.
optional/build/libs/for the JAR files of modules requiring optional dependencies.
incubator/build/libs/for the JAR files of modules that are not yet part of releases.
endorsed/build/bundle/for the OXT add-in for Open/LibreOffice Calc.
optional/build/bundle/for the JavaFX application if optional dependencies were specified.
The remaining of this page describes optional configurations for more advanced developments.
This section assumes that above-described basic checkout has been done. All subsections below are optional, but the “Create data directory” one is recommended because some other subsections depend on it.
Create data directory
Apache SIS needs a directory where to store database, datum shift files and other optional data.
That directory is specified by the
SIS_DATA environment variable and can be located anywhere.
A convenient location is a subdirectory of the
ApacheSIS directory created in the “basic checkout” section.
For example (with
ApacheSIS as the current directory):
# For making that environment variable available in future shell sessions,
# the output of following command can be added to .bash_profile or .bashrc
# file in user home directory.
echo export SIS_DATA=$SIS_DATA
Checkout non-free data
The EPSG geodetic dataset is recommended for operations related to Coordinate Reference Systems.
Without the EPSG database, only a small subset
of coordinate reference systems can be created from EPSG codes.
The EPSG database can be installed in various ways,
but this section describes an alternative way more suitable to Apache SIS development.
Then following command can be executed with
ApacheSIS as the current directory:
svn checkout https://svn.apache.org/repos/asf/sis/data/non-free/
Then copy or link the EPSG scripts in the directory where Apache SIS looks for optional data.
Adjust the relative paths as needed if the
SIS_DATA environment variable
points to another location than the one used in above section:
ln -s ../../../non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/factory/sql/epsg/Data.sql EPSG_Data.sql
ln -s ../../../non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/factory/sql/epsg/FKeys.sql EPSG_FKeys.sql
ln -s ../../../non-free/sis-epsg/src/main/resources/org/apache/sis/referencing/factory/sql/epsg/Tables.sql EPSG_Tables.sql
This is sufficient for allowing Apache SIS to create the geodetic database
without the need for
sis-embedded-data module on the classpath.
This setting is not done automatically because Apache projects cannot introduce
non-free dependencies without explicit action from user.
If this action is not taken, some JUnit tests requiring EPSG data may be skipped.
If any EPSG file is updated, deleting the
is sufficient for causing Apache SIS to recreate the Derby database with new data.
Apache SIS is tested with Derby, HSQL and PostgreSQL databases. Derby and HSQL are tested automatically using temporary databases in memory. But testing on PostgreSQL requires the creation of a dedicated database on the developer platform. The requirements are:
- PostgreSQL server running and listening to
localhoston default port (5432).
- A role with the same name than Unix user name of the developer running tests.
- An empty database named
- Above-cited role can connect to
SpatialMetadataTestdatabase without password.
org.apache.sis.test.extensiveJava property set to
SpatialMetadataTest database should stay empty when not running tests,
because Apache SIS always delete the temporary schema after tests completion,
regardless if the tests were successful or not.
The role and database can be created by connecting to the server:
Then the role and database can be created by the following SQL instructions
my_unix_user_name by your actual user name):
CREATE ROLE my_unix_user_name LOGIN;
CREATE DATABASE "SpatialMetadataTest" WITH OWNER = my_unix_user_name;
COMMENT ON DATABASE "SpatialMetadataTest" IS 'For Apache SIS tests only.';
CREATE EXTENSION postgis;
For opening access to that database without password, it may be necessary
to add following line (ignoring comment lines) in the
Location of this file is system-dependent, it may be
The following lines should be inserted before the lines for user
# TYPE DATABASE USER ADDRESS METHOD
host SpatialMetadataTest my_unix_user_name 127.0.0.1/32 trust
host SpatialMetadataTest my_unix_user_name ::1/128 trust
The last step for allowing Apache SIS to run tests on PostgreSQL is to set the
org.apache.sis.test.extensive Java property to
true (see next section).
This requirement has been added for avoiding undesired interference with host.
Note that this step is likely to change after Apache SIS upgrade to JUnit 5.
Running extensive tests
gradle test execution in the
will build and test Apache SIS with the default set of JUnit tests.
Some tests are skipped by default, either because they would have some effects outside
sis directory (for example writing in
SpatialMetadataTest database on PostgreSQL),
or because those tests take a long time to execute.
For enabling all tests, use the following command:
gradle test --system-prop org.apache.sis.test.extensive=true
Switch to development branch
The source code repository contains
Apache SIS releases are created from
main, which depends on the latest GeoAPI version
released by the Open Geospatial Consortium (OGC), currently GeoAPI 3.0.2.
However daily developments occur on the
geoapi-4.0 branch before to be merged (indirectly) to
Those branches exist in order to experiment early new API and technologies — since they may impact
the library design — while keeping the releases compatible with officially released API.
geoapi-4.0branch implements interfaces defined in GeoAPI 4.0 snapshots.
geoapi-3.1branch implements interfaces defined in GeoAPI 3.1 snapshots.
mainimplements interfaces defined by the GeoAPI 3.0.2 stable release.
geoapi-4.0 branch are merged to
geoapi-3.1 branch, which is then merged to
When commits reach
main they become unmodifiable; the
git push --force command is not allowed on that branch.
Contributors to Apache SIS project should switch to the current development branch before submitting patches:
git checkout geoapi-4.0
Note that those
geoapi-xxx branches may disappear or be replaced by something else
after OGC releases the corresponding GeoAPI versions.
Resources are in the same
src directories than Java source code.
Resources files are kept close to Java source files because they often need to be edited together.
All resource files are copied to the build directory, except those with the following extensions:
log— because they are temporary files.
idl— because they are source files.
md— because they are documentation files.
properties files are handled in a special way.
Localized resources are provided in
*.properties files as specified by the
java.util.PropertyResourceBundle standard class.
However SIS does not use those resources files directly. Instead
*.properties files are transformed into binary files having
the same filename but the
.utf extension. This conversion is done for efficiency, for convenience (the compiler applies the
java.text.MessageFormat doubled single quotes rule itself), and for compile-time safety.
In addition to generating the
*.utf files, the resource compiler may modify the
*.java files having the same name than the
resource files. For example given a set of
Vocabulary*.properties files (one for each supported language), the compiler will
generate the corresponding
Vocabulary*.utf files, then look for a
Vocabulary.java source file. If such source file is found
and contains a public static inner class named
Keys, then the compiler will rewrite the constants declared in that inner class
with the list of keys found in the
Apache SIS uses a plugin in
buildSrc/ for processing resources.
This plugin is used automatically by Gradle.
The build system before Apache SIS 1.4 was Maven.
Migration to Gradle was necessary for partial support of Module Source Hierarchy.
All developments and tags prior Apache SIS 1.0 were done on a Subversion repository
and can be browsed online.
Tags for Apache SIS versions 0.1 to 0.8 should be fetched from the SVN repository.
The development branches on that repository were named