Skip to contents

Calculates the steepness and direction of river curves. It uses the coordinates of three consecutive hectometer points (sf.hectometer) along the rivers axis (sf.axis) and determines the inner angle of the resulting triangle adjacent to the middle point (b). The direction is derived as described in getCurve.

Figure: getAngle.png

Usage

getAngle(x)

Arguments

x

must be a single integer indexing one hectometer polygon of sf.afe_csa along the River Elbe. x must be element of seq(from = 1, to = length(sf.afe_csa), by = 1).

Value

list with items value (numeric)and txt (character) indicating the direction c("left", "right").

Examples

   getAngle(3900)
#> Warning: attribute variables are assumed to be spatially constant throughout all geometries
#> $value
#> [1] 1.557835
#> 
#> $txt
#> [1] "right"
#> 
   getAngle(3963)
#> Warning: attribute variables are assumed to be spatially constant throughout all geometries
#> $value
#> [1] 1.006967
#> 
#> $txt
#> [1] "right"
#>