Explodes multipart features
Explodes multipart features into single part
explode(x, sp = FALSE)
x |
sp or sf multipart (MULTIPOLYGON, MULTIPOINT, MULTILINE) object |
sp |
(FALSE/TRUE) output as sp class object, else is sf class |
A single part sp or sf object (polygons or points)
Multipart geometries are a data structure where a single attribute shares multiple features (polygons, points, lines). This function dissaggregates the data into a one-to-one match.
Jeffrey S. Evans <jeffrey_evans@tnc.org>
library(sf) library(sp) dim( p.sf <- st_read(system.file("shapes/sids.shp", package = "spData")[1]) ) dim( p.sf <- explode(p.sf) )
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.