MazamaSpatialUtils (version 0.6.4)

dissolve: Aggregate shapes in a SpatialPolygonsDataFrame

Description

Aggregate shapes in a spatial polygons dataframe. This is a convenience wrapper for rmapshaper::ms_dissolve()

Usage

dissolve(SPDF, field = NULL, sum_fields = NULL, copy_fields = NULL,
  ...)

Arguments

SPDF

object of class SpatialPolygonsDataFrame

field

proportion of points to retain (0-1; default 0.05)

sum_fields

fields to sum

copy_fields

fields to copy. The first instance of each field will be copied to the aggregated feature

...

arguments passed to rmapshaper::ms_dissolve()

Value

A spatial polygons dataframe with aggregated shapes.

Examples

Run this code
# NOT RUN {
regions <- dissolve(SimpleCountries, field = "UN_region", sum_fields = "area")
plot(regions)
regions@data
# }

Run the code above in your browser using DataLab