Skip to contents

Determine whether the river is bend within a specific area and calculate a numeric value for the strength and direction of this bend, i. e. how small the curve radius is and whether it is a turn right (value > 1) or a turn left (value < 1). This is achieved by placing a buffer of 50 m sf.afe_sides_buffered_axis around sf.axis and afterwards comparing the overall area of this buffer on the left and right hand side of the river axis within the specified area.

Figure: getCurve.png

Usage

getCurve(x, b, bu = b)

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).

b

must be a single numeric specifying a buffersize to be included for the axis length computations around the indexed hectometer in m.

bu

is an optional single numeric specifying a separate upstream buffersize to be included for the axis length computations around the indexed hectometer in m (default = b).

Value

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

Examples

   getCurve(3900, 200)
#> Warning: attribute variables are assumed to be spatially constant throughout all geometries
#> $value
#> [1] 1.002558
#> 
#> $txt
#> [1] "left"
#> 
   getCurve(3963, 200)
#> Warning: attribute variables are assumed to be spatially constant throughout all geometries
#> $value
#> [1] 0.9863707
#> 
#> $txt
#> [1] "right"
#>