I discovered the following in r.watershed/ram/slope_len.c where the slope length is calculated given two cell positions in the raster.

if (r == dr)
    res = window.ns_res;
else if (c == dc)
    res = window.ew_res;
else
    res = diag;

Here we are dealing with a cell given by coordinates (r,c) which flows into another cell (dr,dc). So the code reads to me that if the two cells are on the same row, add to the slope the map's North-South resolution. Should it not be West-East since the slope is horizontal rather than vertical and vice versa for the columns?

This seems like a bug to me and the code is taken from the latest snapshot.

Johan Sten


_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to