Geotk requires Java 6. No extension is required for the referencing and metadata modules. However if the coverage module is also used, then Geotk requires some additional dependencies listed in the _Running modules beyond GeoAPI 3.0_ section below.
While not mandatory, the referencing module works better with a connection to an EPSG database. The database will be created automatically if the geotk-epsg.jar file is available on the classpath, together with one of the following dependencies:
By default, the database is created in a Geotoolkit.org sub-directory in the user application directory. This is always a sub-directory of the user home directory, but the complete path is platform-dependent ("Application Data" on Windows, "Library" on MacOS, the home directory on Linux). The directory can be changed by running the graphical application provided in the geotk-setup module.
The above-cited Setup application can also create the EPSG database on PostgreSQL, using connection parameters which must be explicitly specified.
Geotk for GeoAPI 3.0 is deployed into the Maven Central repository, and consequently does not require any explicit repository declaration. The following example is sufficient for running Geotk referencing services with the optional - but recommended - EPSG database.
<dependencies>
<dependency>
<groupId>org.geotoolkit</groupId>
<artifactId>geotk-referencing</artifactId>
<version>3.19-geoapi-3.0</version>
</dependency>
<dependency>
<groupId>org.geotoolkit</groupId>
<artifactId>geotk-epsg</artifactId>
<version>3.19-geoapi-3.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.8.2.2</version>
<scope>runtime</scope>
</dependency>
</dependencies>If the coverage or display modules are also used, then Geotk requires also the Java Advanced Imaging library (download). Note that this library is pre-installed on MacOS X.
While not mandatory, installation of the Image I/O for JAI library is also recommended (download).
Because modules beyond metadata and referencing are not yet deployed on Maven Central, projects need to declare the Geotk repository in order to use them. The example below uses the Coverage I/O services, together with the same referencing services than the previous example.
<repositories>
<repository>
<id>geotoolkit</id>
<name>Geotoolkit.org repository</name>
<url>http://maven.geotoolkit.org</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.geotoolkit</groupId>
<artifactId>geotk-coverageio</artifactId>
<version>3.19</version>
</dependency>
<dependency>
<groupId>org.geotoolkit</groupId>
<artifactId>geotk-epsg</artifactId>
<version>3.19</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.8.2.2</version>
<scope>runtime</scope>
</dependency>
</dependencies>Note that the version number in the later example is 3.19 rather 3.19-geoapi-3.0 because those Geotk modules depend on GeoAPI version 3.1-SNAPSHOT, which is not yet standardized by OGC.