[MetaCRS] Testing framework available to any GeoAPI implementation

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Mon Aug 15 09:36:08 EDT 2011


On a related topic with my previous email, there is some news on the "testing" 
front (a while ago we talked on this mailing list about a shared database for 
test points).

The GeoAPI project provides a "geoapi-conformance" module which executes many 
JUnit tests on arbitrary implementations of the GeoAPI interfaces. I tried to 
make the test as implementation-independent as possible. For example the current 
implementation uses only the points provided in the "Example" sections of EPSG 
guidance notice, or the example points provided by some authoritative sources 
like the French National Mapping Agency (IGN) - they are not points calculated 
by a particular implementation.

The tests are extensively documented, as you can see from here:

  * http://www.geoapi.org/geoapi-conformance/apidocs/org/opengis/test/referencing/MathTransformTest.html#testMercator1SP%28%29


The tests are also customizable. If your implementation does not support the 
calculation of projection derivatives, and if you need to relax the tolerance 
threshold value, just override the test method as below:

@Override
public void testMercator1SP() throws FactoryException, TransformException {
     isDerivativeSupported = false;  // MathTransform.derivative(...) not supported by our implementation.
     tolerance = 0.1;                // Relax the tolerance threshold value from 1 cm to 10 cm.
     super.testMercator1SP();
}


By creating GeoAPI wrappers for Proj.4 (see my previous post), Proj.4 win a new 
tests suite for free :-) (or maybe to be more realist, I should said that the 
tests suite win a validation from a well etablished library).

     Regards,

         Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/metacrs/attachments/20110815/0caab9ae/attachment.html


More information about the MetaCRS mailing list