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

Description Usage Arguments Value Examples

View source: R/split.R

Description

Return a collection of geometries resulting by splitting a geometry

Usage

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

Value

object of the same class as x

Examples

1
2
3
4
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)

Example output

Linking to liblwgeom 3.0.0beta1 r16016, GEOS 3.8.0, PROJ 6.3.1
Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
Geometry set for 1 feature 
geometry type:  GEOMETRYCOLLECTION
dimension:      XY
bbox:           xmin: 10 ymin: 10 xmax: 190 ymax: 190
CRS:            NA
GEOMETRYCOLLECTION (LINESTRING (10 10, 30 30), ...

lwgeom documentation built on Oct. 6, 2021, 5:12 p.m.

Related to st_split in lwgeom...