[gdal-dev] gdaldem slope with -s 111120.0 works only at equator for lat/lon?
even.rouault at mines-paris.org
Thu Jan 23 11:11:57 PST 2014
Le mercredi 22 janvier 2014 23:14:01, John Abraham a écrit :
> 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?
Yes, the -scale 111120 only works for approximate visual rendering, not for
something life critical.
> 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
If you want to provide an update of the doc, its source is in
> 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.
Yes that would probably be certainly more appropriate. For example in the UTM
zone of your data, or potentially some more fitted grid.
> Thanks for your help. This has been bugging me for sometime, but I finally
> decided to speak up.
> John Abraham
> jea at hbaspecto.com
Geospatial professional services
More information about the gdal-dev