line_segmentize {rsgeo} | R Documentation |
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)
Arguments
x |
and object of class |
n |
an integer vector determining the number of equal length LineStrings to create |
Value
A vector of class rs_MULTILINESTRING
Examples
x <- geom_linestring(1:10, runif(10, -1, 1))
segs <- line_segmentize(x, 3)
flatten_geoms(
expand_geoms(segs)
)
[Package rsgeo version 0.1.6 Index]