Thursday, March 15, 2012

PROJ 4.8.0 Released

Early this week I announced the release of PROJ 4.8.0.  It turns out the last release (4.7.0) was in 2009 so it has been quite some time coming. 

PROJ.4 is a C library implementation transformations between a wide variety of geospatial coordinate systems.  It features include support for many projection methods (ie. Transverse Mercator) as well as support for converting between geodetic datums.  As a library it is used by many of the C/C++ open source geospatial applications, and a few proprietary ones including GDAL/OGR, PostGIS, GRASS, MapServer and QGIS (some of my favorites).  It also includes commandline utilities mostly used for testing and a dictionary of coordinate system definitions based on the EPSG coordinate system from OGP.

The announcement lists the major new features, but there is a subset I would like to call out here because I think they are quite significant.

  1. A great deal of work went into making the library threadsafe.  The main previous hole in threadsafe operation was the use of the global pj_errno for errors.  This has been worked around by introduction of an "execution context" object (projCtx) which can be passed in when creating projection objects (projPJ).  The execution context also now provides a mechanism to manage error and debug message output. See use of projCtx in proj_api.h for an idea of how this would be used.  The execution context also means that more than one part of a process can use PROJ.4 with less risk of stepping on each other (imagine MapServer and GDAL/OGR for instance). 
  2. Preliminary support has been added for vertical datums using the +geoidgrids= directive.  The geoidgrids are assumed to provide a transformation from geoid elevations to ellipsoidal elevations and they are discussed a bit in the VerticalDatums topic on the web site.
  3. I have introduced yet another supported horizontal grid shift file format which I call CTable2.  It is really the same as the venerable binary format produced by nad2bin, but with the header regularized and the byte order fixed so that the format is binary compatible across all platforms.  This means it is no longer to worry about having distinct copies of the grid shift files for environments like 32bit vs. 64bit linux, or windows vs. linux.  I had originally intended to just migrate to using NTv2 but it turns out to take twice as much space because of the presence of rarely used error estimate bands. 
  4. The addition of the +axis= switch to control axis orientation.  This makes it possible to handle coordinate systems where "X" is north and "Y" is east as well as various other combinations.  
On the one hand there is relatively new in the coordinate of geospatial coordinate systems as far as "discovers" go.  But in practice it is becoming expected that quality geospatial software will support the full suite of EPSG coordinate systems which requires better handling of units, axes, datum shifts, prime meridians and vertical coordinate systems.  I think PROJ.4, a core piece of technology in the FOSS4G stack, has made substantial progress over the last couple of years. 

I would also be negligent if I failed to call out the important funding support of the US Army Corp of Engineers in these developments via Howard Butler and Liblas / PDAL.

1 comment:

  1. Hi Frank,
    I am keen to know if the Engsager Extended Transverse Mercator (etmerc) is now built into proj?
    The topographical maps in Greenland is produced in UTM Zone 24 GR96/WGS84 in scale 1:100K, but detailed town maps in the respective zones 19 to 24, so need to reproject accurately between the zones, which is not possible using the available proj4 until now.

    Karl Zinglersen, Greenland Survey Asiaq