Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have DEM data stored as RGF93 (Lambert-93) for lat/lon and NGF-IGN69 for altitude. I'm trying to change the reference ellipsoid for the elevation data (ultimately to NTF, but WGS84 would be fine to understand). I achieved to reproject the file using QGis or GDAL, but I can't find a way to change the altitude values. Shouldn't gdalwarp do the trick ?

Here's an example of a command I used :

gdalwarp
-s_srs "+proj=lcc +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=46.500000000 +lon_0=3.000000000 +lat_1=44.000000000 +lat_2=49.000000000 +x_0=700000.000 +y_0=6600000.000 +units=m +no_defs"
-t_srs "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0 +unit=m"
input.tif output

What did I miss ?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

No, GDAL doesn't change the values of a dataset when it warps (except to interpolate them of course), it merely stretches the 2D bounds; this is because it can't know that the data you're feeding it is height data, it could equally be rainfall, temperature, or the likelihood of finding the Higgs Boson at that point.

If your area is fairly small, you could find the vertical shift between the two ellipsoids at a point within the bounds of your dataset using gdaltransform, and then add that on to the data with QGIS's raster calculator. Not elegant, I admit, but it'd get you close. You could go one step further and programmatically generate a raster of the vertical shifts covering the same area and at the same resolution, then use the raster calculator to add the two together.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.