(Ted Harding) wrote:
On 19-Oct-04 Laura Quinn wrote:

Is there a neat way of working out the slope of a flat surface in R?

Given (x,y,z) co-ordinates of the four corners of a square, is there a
function which will allow me to calculate the "mean" slope of the
surface in a given direction?

I had a quick look at the help for r.slope.aspect for the GRASS GIS [1]. To compute the slope of a raster grid it uses 'Horn's Formula' [2] which it says works by taking the 3x3 neighbourhood of the cell in question. If you really want a slope map over a big grid, this might be a better way to do it.



Barry


[1] http://supportweb.cs.bham.ac.uk/documentation/grass5/html/r.slope.aspect.html


[2] Horn, B. K. P. (1981). Hill Shading and the Reflectance Map, Proceedings of the IEEE, 69(1):14-47.

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to