sf (version 0.5-2)

st_split: Return a collection of geometries resulting by splitting a geometry

Description

Return a collection of geometries resulting by splitting a geometry

Usage

st_split(x, y)

Arguments

x

object with geometries to be splitted

y

object split with (blade); if y contains more than one feature geometry, the geometries are st_combined

Value

object of the same class as x

Details

st_split is only available if the package was linked against liblwgeom, which is currently not the case for the binary CRAN distributions; see the package source code repository for instructions how to install liblwgeom. The example below shows how to run-time check the availability of liblwgeom.

Examples

Run this code
# NOT RUN {
l = st_as_sfc('MULTILINESTRING((10 10, 190 190), (15 15, 30 30, 100 90))')
pt = st_sfc(st_point(c(30,30)))
if (!is.na(sf_extSoftVersion()["lwgeom"])) {
  st_split(l, pt)
}
# }

Run the code above in your browser using DataLab