lwgeom (version 0.2-14)

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)

Value

object of the same class as x

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_combine 'd

Examples

Run this code
library(sf)
l = st_as_sfc('MULTILINESTRING((10 10, 190 190), (15 15, 30 30, 100 90))')
pt = st_sfc(st_point(c(30,30)))
st_split(l, pt)

Run the code above in your browser using DataLab