get_sinuosity() is a function that computes the ratio of curvilinear
length to Euclidean length for a streamline object, with a value of
1 indicating a perfectly straight streamline and larger values indicating
greater curviness.
Arguments
- x
A streamline object.
Examples
pts <- matrix(runif(30), ncol = 3)
colnames(pts) <- c("X", "Y", "Z")
sl <- streamline(points = pts)
get_sinuosity(sl)
#> [1] 6.914767