Conformance tests

The conformance tests create various geodetic objects from EPSG codes or explicit parameters and verify that they are well formed. Some coordinate operations are executed and their results are verified. The GeoAPI conformance tests are currently written in Java as JUnit tests, but future version will open to more languages. GeoAPI tests provide two kinds of Java classes:

GeoAPI conformance tests are extended by the GIGS runner through GeoAPI, which allows to run Geospatial Integrity of Geoscience Software (GIGS) tests on arbitrary GeoAPI implementations.

Download as Maven dependency

GeoAPI Conformance tests are deployed on the Maven Central Repository and can be used in a Maven project with the following declaration in the pom.xml file:


Writing custom tests

Implementers can either write their own JUnit tests, or extend some of the existing implementations. With the latter approach, implementers can override the existing test methods for finer control on the tests being executed. In every cases, implementers can use the static methods for testing their implementation consistency. For example an implementer can test the validity of his Coordinate Reference System objects and related objects in a test suite like below:

Java code example

package org.myproject;

import org.junit.*;
import static org.opengis.test.Validators.*;

public class MyTests {
    public void testMyCRS() {
        CoordinateReferenceSystem crs = ...

        MathTransform transform = ...

Validators are thread-safe except for the configuration phase (which is optional and usually executed only once before the tests begin). Validators test the logical consistency of their argument. For example if given a chain of concatenated transforms, validate(object) will ensure that the source dimension of a transformation step is equal to the target dimension of the previous step. Dependencies are traversed recursively, for example validating a CoordinateReferenceSystem object implies validating its CoordinateSystem and Datum attributes.