[gdal-dev] gdaldem slope with -s 111120.0 works only at equator for lat/lon?

John Abraham jea at hbaspecto.com
Wed Jan 22 14:14:01 PST 2014

Please help me with something potentially important.  The documentation for gdaldem slope says “If the horizontal unit of the source DEM is degrees (e.g Lat/Long WGS84 projection), you can use scale=111120 if the vertical units are meters” but I don’t think this works very far away from the equator.  I think the algorithm assumes that the north-south units are the same as the east-west units, whereas obviously away from the equator degrees of longitude become a lot shorter.

I’m looking at my attempt at avalanche slope mapping, and seem to see east-west slopes showing up with higher slopes than north-south slopes with identically spaced contour intervals.

Am I right?  Or am I seeing things?

If I’m right, perhaps:

1) Someone should fix the documentation, so that people don’t rely on incorrect slope calculations for something life-critical such as avalanche slope mapping, and

2) Someone could tell me a better solution, I think perhaps the best idea is to just resample the grid into a projection based on meters, before applying gdaldem without any scaling factor.

Thanks for your help. This has been bugging me for sometime, but I finally decided to speak up.

John Abraham
jea at hbaspecto.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140122/81c33018/attachment-0001.html>

More information about the gdal-dev mailing list