st_union_intersection: Union intersecting geometries in x

Description Usage Arguments Value See Also Examples

View source: R/spatial.r

Description

Union intersecting geometries in x

Usage

1

Arguments

x

An simple features object (sf, sfg, or sfg)

Value

The union of intersecting geometries Specifically, union all of the intersecting groups in x https://gis.stackexchange.com/a/323067

See Also

sf::st_union()

Examples

1
2
3
4
5
6
7
8
library(sf)
sq = function(pt, sz = 1) {
 st_polygon(list(rbind(c(pt - sz), c(pt[1] + sz, pt[2] - sz), c(pt + sz),
   c(pt[1] - sz, pt[2] + sz), c(pt - sz))))
}
x = st_sf(box = 1:6, st_sfc(sq(c(4.2,4.2)), sq(c(0,0)), sq(c(1, -0.8)),
  sq(c(0.5, 1.7)), sq(c(3,3)), sq(c(-3, -3))))
st_union_intersection(x)

karldw/kdw.junk documentation built on Sept. 8, 2021, 9:30 p.m.