Skip to contents

Given two LineStrings compare thier similarity by calculating the Fréchet distance.

Usage

frechet_distance(x, y)

Arguments

x

an object of class rs_LINESTRING

y

an object of class rs_LINESTRING

Value

A numeric vector

Examples

x <- geom_linestring(1:10, runif(10, -1, 1))
y <- geom_linestring(1:10, runif(10, -3, 3))
frechet_distance(x, y)
#> [1] 2.5964