Implementation of GeoAPI 3.0 interfaces as wrappers around the GeoTools library. GeoAPI is a set of implementation-neutral interfaces standardized by the Open Geospatial Consortium (OGC). Projects using GeoAPI interfaces for their metadata and referencing services have more flexibility for changing implementation according their needs. It also makes possible to use GeoTools with projects designed for GeoAPI. For example, it makes possible to run the GIGS tests against GeoTools.
All wrappers in this project are bidirectional: GeoTools objects can be viewed as GeoAPI objects, or conversely. The latter should, in theory, allow the use of alternative referencing library such as Apache SIS or PROJ inside GeoTools. However, as of Mars 2025, it has not been tested.
For more details, see the Javadoc.
This artifact can be used in a Maven project as below:
<dependencies>
<dependency>
<groupId>com.geomatys</groupId>
<artifactId>geoapi-geotools</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>geotoolkit.org</id>
<name>Geotoolkit.org repository</name>
<url>https://maven.geotoolkit.org</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
This project provides only two public classes: Wrappers
and Services
.
For viewing a GeoTools object as a GeoAPI object, simply invoke the following:
var geotools = CRS.decode("EPSG:4326");
var geoapi = Wrappers.geoapi(geotools);
The geoapi
method is overloaded with all types of objects supported by this project.
Conversely, a GeoAPI object can be unwrapped or viewed as a GeoTools object like below:
var geotools = Wrappers.geotools(geoapi);
The following methods of GeoTools are reproduced in Services
with the same signature,
but returning the GeoTools factory wrapped in a GeoAPI factory:
CRS.getAuthorityFactory(longitudeFirst)
CRS.getCoordinateOperationFactory(lenient)
Simply run mvn install
in a local clone of this repository.
A better home for this project would be the OSGeo foundation, which is where GeoTools is hosted. Deployment on the OSGeo Maven repository would be convenient since it would be the same repository as for GeoTools. Having this project hosted by OSGeo has been proposed in the end of 2024, but OSGeo declined. If another volunteer has some evidence of a user base and is willing to ask again to OSGeo, we would be happy to donate this project, including a transfer of copyright to OSGeo if desired.