slope_gc: Calculate slope gradient and curvature, and hills

Description Usage Arguments Details Examples

View source: R/flow_05_slope_gc.R

Description

Computes row (east/west) and column (north/south) slope gradients and curvatures. Also calculates hill slopes as points when slope gradients switch directions

Usage

1
slope_gc(db, grid = 1)

Arguments

db

Dataframe dem

grid

Numeric. Grid size for the original dem

Details

Assume the following cells, and the calculations on elevation for focal point 5:

c7 c8 c9

c4 c5 c6

c1 c2 c3

Slope gradients and curvature

Where missing neighbours, assume same elevation as central point (i.e. assume an extension of the field).

Zero values replaced with arbitrarily small value, 0.00001

For gradients, zero values replaced with arbitrarily small value (0.00001) but with the sign of the previous point (i.e. to left (n4, west) if row; to bottom (n2, south) if column). If that previous point is missing, look to next point (i.e. n6 or n8). If cannot resolve by working through points, assign to positive.

Hill slopes

Directions:

N (1) -> E (2) -> S (3) -> W (4)

Examples

1
2
3
4
5
d <- slope_gc(test_dem)

library(ggplot2)
flow_plot(d, type = "elevation") +
  geom_point(aes(colour = factor(hill_r_n)))

steffilazerte/LITAP documentation built on Feb. 9, 2022, 8:11 a.m.