[Proj] GeographicLib geoid calculations

Paul Kelly paul-grass at stjohnspoint.co.uk
Wed Oct 17 05:29:35 EST 2012

Charles Karney wrote:
> GeographicLib uses 2 bytes per grid point to store the data (vs 4 bytes
> per grid point for most other implementation) and, by default, does not
> read the entire table into memory.

While not as polished as the very impressive GeographicLib, I thought it 
was worth pointing out that an implementation I wrote a couple of years 
ago in C has similar properties (2 bytes per grid point, and 
user-specifiable how much of the grid to load into memory). It uses the 
cubic convolution interpolation method proposed by Keys in 1981. Some 
details here:

(look at the egm96_* functions) and source code as well as binary grid 
file available here:


The software may be distributed under the LGPL license, although I have 
to admit this isn't at all clear from the above links...

> (Incidentally, GeographlicLib lets you work directly with the spherical
> harmonic expansions of the geoid models using the Gravity class.  So you
> can construct grids for any of EGM84, EGM96, or EGM2008 at any
> resolution.)

Again, not so elegant (requires manual pre-processing with no nice API, 
but maybe still useful for an embedded application) - grids of any size 
at various resolutions may be created using the software here (slightly 
modified version of C code by D. Ineiv from 2006):


Just in case it is useful to anybody!

Best regards,


More information about the Proj mailing list