explode

0th

Percentile

Explodes multipart features

Explodes multipart features into single part

Usage
explode(x, sp = FALSE)
Arguments
x

sp or sf multipart (MULTIPOLYGON, MULTIPOINT, MULTILINE) object

sp

(FALSE/TRUE) output as sp class object, else is sf class

Value

A single part sp or sf object (polygons or points)

Note

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.

Aliases
  • explode
Examples
# 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 {
# }
Documentation reproduced from package spatialEco, version 1.3-2, License: GPL-3

Community examples

Looks like there are no examples yet.