line_segmentize: Segments a LineString into n equal length LineStrings
Description
Given a LineString, segment it into n equal length LineStrings.
The n LineStrings are provided as a MultiLineString which can
be expanded using expand_geoms() and consequently flattened
using flatten_geoms() if desired.
Usage
line_segmentize(x, n)
line_segmentize_haversine(x, n)
Value
A vector of class rs_MULTILINESTRING
Arguments
x
and object of class rs_LINESTRING
n
an integer vector determining the number of equal length LineStrings to create
Details
line_segmentize() will segment a LineString using a Euclidean length
calculation. line_segmentize_haversine() will use a Haversine length
calculation instead. If you have geometries in a geographic cooridnate
system such as EPSG:4326 use the Haversine variant. Otherwise, prefer
the euclidean variant.