powered by
Explodes multipart features into single part
explode(x, sp = FALSE)
sp or sf multipart (MULTIPOLYGON, MULTIPOINT, MULTILINE) object
(FALSE/TRUE) output as sp class object, else is sf class
A single part sp or sf object (polygons or points)
# NOT RUN { library(sf) library(sp) dim( p.sf <- st_read(system.file("shapes/sids.shp", package = "spData")[1]) ) dim( p.sf <- explode(p.sf) ) # } # NOT RUN { # }
Run the code above in your browser using DataLab