Distance calculations

geos_distance(geom1, geom2)

geos_prepared_distance(geom1, geom2)

geos_distance_indexed(geom1, geom2)

geos_distance_hausdorff(geom1, geom2, densify = NULL)

geos_distance_frechet(geom1, geom2, densify = NULL)

geos_is_within_distance(geom1, geom2, distance)

geos_prepared_is_within_distance(geom1, geom2, distance)

Arguments

geom1, geom2

GEOS geometry vectors, recycled to a common length.

densify

A fraction between 0 and 1 denoting the degree to which edges should be subdivided (smaller value means more subdivisions). Use NULL to calculate the distance as-is.

distance

A threshold distance, below which geos_is_within_distance() and geos_prepared_is_within_distance() will return TRUE.

Value

A numeric vector along the recycled length of geom1 and geom2