Developer’s Corner: Accurate datum shift and full transformation control in GeoServer

Hi all,
in this blog we’re going to introduce the new GeoServer/GeoTools support for high accuracy datum transformation and projection control in general.

Starting with release 2.2-beta2 GeoServer has support for grid based transformations, in particular NTv2 and NADCON grids. The grid allow for centimeter accurate transformations between datums, which is much better than the usual 7 parameters transformation supported so far by GeoServer, which included a few meters error.

The reason for this difference is simple, the 7 parameters transformation is a simple roto-translation in 3D space, plus scaling, whilst the grid is a point to point mapping between position in the source datum to the equivalent position in the destination datum, thus taking into account the finer differences between the two.

See the GeoServer user guide for details on which grid files are recognized by default, and how to install them.

The news do not stop here. GeoServer traditionally relied on the EPSG database contents to determine the best transformation between two EPSG codes. This is not always the best solution, you might need a custom transformation, maybe setup your custom grid file, or you might need to specify your own custom 7 params transformation. For example in Italy there are three official sets, and GeoServer picks by default the one covering the largest area: with a custom transformation setup you can match your local needs exactly.
See again the user guide for details on how to setup your own custom transformation.

Now, you might wonder, how can I check if my customizations are in place and working, or see in detail how the standard GeoServer transforms my coordinates? GeoServer 2.2-beta2 comes with a new demo tool, the Transformation Console, allowing to manually test transformations between two coordinate systems, and check what exact transformation steps are being used:

Most of the work has been carried on mostly by our friend Oscar Fonts on behalf of the Catalan Cartographic Institute, with some help from yours truly to support NADCOND grids, introduce the reprojection console and do general code checks and improvements.

Need more improvements in the datum/projections area? Let us know!

The GeoSolutions team,