MazamaSpatialUtils (version 0.6.4)

simplify: Simplify SpatialPolygonsDataFrame

Description

Simplify a spatial polygons dataframe. This is a convenience wrapper for rmapshaper::ms_simplify()

Usage

simplify(SPDF, keep = 0.05, ...)

Arguments

SPDF

object of class SpatialPolygonsDataFrame

keep

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

...

arguments passed to rmapshaper::ms_simplify()

Value

A simplified spatial polygons dataframe.

Examples

Run this code
# NOT RUN {
FR <- subset(SimpleCountries, countryCode == 'FR')
par(mfrow = c(3, 3), mar = c(1, 1, 3, 1))
for (i in 9:1) {
  keep <- 0.1 * i
  plot(simplify(FR, keep), main=paste0("keep = ", keep))
}
layout(1)
par(mar = c(5,4,4,2)+.1)
# }

Run the code above in your browser using DataCamp Workspace