Skip to contents

Curvature: profile, plan and total curvature (Zevenbergen and Thorne 1987). Viewshed: straight line-of-sight visibility from observer (row, column), no earth curvature (Franklin and Ray 1994).

Usage

Curvature(dem, res = 1)

Viewshed(dem, observer, res = 1, observer_height = 1.7, target_height = 0)

Arguments

dem

Elevation matrix.

res

Cell size.

observer

Row and column (1-based).

observer_height, target_height

Heights above ground.

Value

List of matrices or a 0/1 matrix.

References

Zevenbergen, L. W. and Thorne, C. R. (1987). Quantitative analysis of land surface topography. Earth Surface Processes and Landforms 12, 47-56.

Examples

Curvature(rbind(c(2, 1, 2), c(1, 0, 1), c(2, 1, 2)))$total
#>      [,1] [,2] [,3]
#> [1,]  NaN  NaN  NaN
#> [2,]  NaN   -4  NaN
#> [3,]  NaN  NaN  NaN
Viewshed(rbind(c(0, 0, 0, 0), c(0, 0, 9, 0)), c(1, 1))
#>      [,1] [,2] [,3] [,4]
#> [1,]    1    1    1    1
#> [2,]    1    1    1    0