{"id":686,"date":"2022-01-27T15:48:57","date_gmt":"2022-01-27T14:48:57","guid":{"rendered":"https:\/\/sigeo.cerege.fr\/?p=686"},"modified":"2026-08-19T17:55:14","modified_gmt":"2026-08-19T15:55:14","slug":"convert-raster-from-ellispoidal-height-to-orthometric-altitude","status":"publish","type":"post","link":"https:\/\/sigeo.cerege.fr\/?p=686","title":{"rendered":"Convert raster from ellispoidal height to orthometric altitude"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Differences between ellipsoidal height and orthometric altitude (or geoid height) are explained here <a href=\"https:\/\/spatialthoughts.com\/2019\/10\/26\/convert-between-orthometric-and-ellipsoidal-elevations-using-gdal\/\">https:\/\/spatialthoughts.com\/2019\/10\/26\/convert-between-orthometric-and-ellipsoidal-elevations-using-gdal\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Geoid files format used to be GTX but switched to TIFF.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We use GDAL function gdalwarp to proceed :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gdalwarp -s_srs EPSG:XXXX -t_srs EPSG:XXXX Input_DEM.tif Output_DEM.tif<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The spatial reference (SRS) can be set as EPSG  code, or  PROJ4 string. Prefer EPSG for simplicity. See  <a href=\"https:\/\/spatialreference.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/spatialreference.org\/<\/a> for list of SRS in EPSG code or other formats<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">if you want to use local geoid file, it must be downloaded to :<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/<code>usr\/share\/proj<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">to download a known geoid file, you can use projsync (ex. RAF20) :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>projsync --source-id fr_ign --file fr_ign_RAF20.tif<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or alternatively use wget from CDN<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/cdn.proj.org\/fr_ign_RAF20.tif -O \/usr\/share\/proj\/fr_ign_RAF20.tif<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Examples<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>from Lambert93 planimetric and NGF-IGN69 (with RAF20) to WGS84 ellipsoidal heights<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>gdalwarp -s_srs EPSG:2154+5720 -t_srs EPSG:4979 \\\n  MNT_LidarHD_5m_2154.tif MNT_LidarHD_5m_4326_He.tif<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>EPSG:2154+5720<\/code> = RGF93 Lambert-93 (horizontal) + NGF-IGN69 height (orthometric, gravity-related)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>EPSG:4979<\/code> = WGS84 3D geographic (ellipsoidal height).<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>From UTM33N-WGS84 ellipsoidal height to UTM33N-EGM96 geoid height<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><code>gdalwarp -s_srs \"+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs\" -t_srs \"+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs +geoidgrids=egm96_15.gtx\" input.tif output.tif<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note the add of the geoid file with <em>+geoidgrids=egm96_15.gtx<\/em> in the command.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>from altitude to ellipsoidal height (change srs and geoid grid if needed):<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><code>gdalwarp -s_srs \"+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs <code>+geoidgrids=egm96_15.gtx\"<\/code> -t_srs \"+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs\" input.tif output.tif<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Examples of proj4 strings definitions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">WGS84 ellipsoid with EGM96 elevation<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>+proj=longlat +datum=WGS84 +no_defs +geoidgrids=egm96_15.gtx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">WGS84 ellipsoid with WGS84 elevation<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>+proj=longlat +datum=WGS84 +no_def<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">RGF93\/Lambert 93 with NGF-IGN69 elevation<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>\"+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +units=m +no_defs +type=crs +geoidgrids=fr_ign_RAF20.tif\"<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Differences between ellipsoidal height and orthometric altitude (or geoid height) are explained here https:\/\/spatialthoughts.com\/2019\/10\/26\/convert-between-orthometric-and-ellipsoidal-elevations-using-gdal\/ Note: Geoid files format used to be GTX but switched to TIFF. We use GDAL function gdalwarp to proceed : The spatial reference (SRS) can be set as EPSG code, or PROJ4 string. Prefer EPSG for simplicity. See https:\/\/spatialreference.org\/ for list &hellip; <a href=\"https:\/\/sigeo.cerege.fr\/?p=686\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Convert raster from ellispoidal height to orthometric altitude&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,7,1],"tags":[],"class_list":["post-686","post","type-post","status-publish","format-standard","hentry","category-gdal-ogr","category-geo-traitements","category-sigeo"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/posts\/686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=686"}],"version-history":[{"count":12,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/posts\/686\/revisions"}],"predecessor-version":[{"id":1014,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=\/wp\/v2\/posts\/686\/revisions\/1014"}],"wp:attachment":[{"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sigeo.cerege.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}