Skip to content
Prev 19957 / 29559 Next

Taking elevation into account when calculating distance

Hello!

I had the same problem and took the following approximation:

I had a DEM and calculated the slope in a GIS. Then, I took the 
resulting raster and trigonometric functions:

if your raster resolution / cell size is 20m, then the "surface 
distance" is

20/cos(slope)

Caveat: R ist calculating cosinus in radians, if you have degrees you 
have to convert it:

1 Degree = 0.017453292519943 rad

I read the slope raster into R, calculated this approximation and wrote 
a new raster file with this "surface distance"...

It is an approximation, as the distance is only valid either in strict 
x- or y- direction, but for my use (and raster resolution) this is ok 
and a certain rasterization is given if you use a rester dataset...

Hope this helps!
Albin






Am 06.12.2013 19:56, schrieb Barry Rowlingson: