Examples for 'maptools::thinnedSpatialPoly'


Douglas-Peuker line generalization for Spatial Polygons

Aliases: thinnedSpatialPoly

Keywords: spatial

### ** Examples

xx <- readShapeSpatial(system.file("shapes/sids.shp", package="maptools")[1],
      IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
Warning: readShapeSpatial is deprecated; use rgdal::readOGR or sf::st_read
Warning: readShapePoly is deprecated; use rgdal::readOGR or sf::st_read
object.size(as(xx, "SpatialPolygons"))
349704 bytes
xxx <- thinnedSpatialPoly(xx, tolerance=0.05, minarea=0.001)
object.size(as(xxx, "SpatialPolygons"))
373640 bytes
par(mfrow=c(2,1))
plot(xx)
plot(xxx)
plot of chunk example-maptools-thinnedSpatialPoly-1
par(mfrow=c(1,1))

[Package maptools version 1.1-4 Index]