16.19. dem_geoid

This program takes as input a DEM whose height values are relative to the datum ellipsoid, and adjusts those values to be relative to the equipotential surface of the planet (geoid on Earth, areoid on Mars, etc.).

This entails subtracting from a DEM height relative to an ellipsoid a correction value. The program corrects, if need be, for differences between the DEM and geoid correction datum ellipsoids. Bicubic interpolation is used.

This program can also perform the reverse adjustment.

16.19.1. Supported geoids

Three geoids and one areoid are supported (also custom geoids). The Earth geoids are EGM96 and EGM2008, relative to the WGS84 datum ellipsoid (see the NGA Office of Geomatics), and NAVD88, which is relative to the NAD83 ellipsoid.

The Mars areoid is MOLA MEGDR. When importing it into ASP, we adjusted the areoid height values to be relative to the IAU reference spheroid for Mars of radius 3,396,190 m. The areoid at that source was relative to the Mars radius of 3,396,000 m. Yet dem_geoid can adjust correctly Mars DEMs created in respect to either spheroid.

16.19.2. Custom geoids

The dem_geoid program can work with a provided geoid correction GeoTiff file, with the option --geoid-path (Section 16.19.4).

As an example, this Moon geoid correction has been adapted from [GSW+20] to work with this program.

The dem_geoid program employs bicubic interpolation into the geoid correction file. The gdalwarp program (Section 16.25) can resample any such file to a fine-enough resolution and with the desired interpolation method before passing it to this program.

16.19.3. Examples

Go from a DEM in respect to the WGS84 datum to one in respect to the EGM2008 geoid:

dem_geoid input-DEM.tif --geoid egm2008

The corrected DEM will be saved with the suffix -adj.tif.

16.19.4. Command-line options for dem_geoid

--nodata-value <float(default: -32768)>

The value of no-data pixels, unless specified in the DEM.

--geoid <string (default: EGM96)>

Specify the geoid to use for the given datum. For WGS84 use EGM96 or EGM2008. For Mars use MOLA or leave blank. For NAD83 use NAVD88 or leave blank. When not specified it will be auto-detected. See also --geoid-path.

--geoid-path <string (default = “”)>

Specify the path to a custom GeoTiff file having the geoid correction, in units of meter. Values from this file will be subtracted from the DEM values in order to convert from ellipsoid to geoid heights. See Section 16.19.2.

-o, --output-prefix <name>

Specify the output file prefix.

--double

Output using double precision (64 bit) instead of float (32 bit).

--reverse-adjustment

Go from DEM relative to the geoid/areoid to DEM relative to the datum ellipsoid.

--threads <integer (default: 0)>

Select the number of threads to use for each process. If 0, use the value in ~/.vwrc.

--cache-size-mb <integer (default = 1024)>

Set the system cache size, in MB.

--tile-size <integer (default: 256 256)>

Image tile size used for multi-threaded processing.

--no-bigtiff

Tell GDAL to not create BigTiff files.

--tif-compress <None|LZW|Deflate|Packbits (default: LZW)>

TIFF compression method.

-v, --version

Display the version of software.

-h, --help

Display this help message.