| thinPolys | R Documentation |
Thin a PolySet, where each unique (PID, SID)
describes a polygon.
thinPolys (polys, tol = 1, filter = 3)
polys |
PolySet to thin. |
tol |
tolerance (in kilometres when |
filter |
minimum number of vertices per result polygon. |
This function executes the Douglas-Peuker line simplification
algorithm on each polygon within polys.
PolySet containing the thinned data. The function recalculates
the POS values for each polygon.
Nicholas M. Boers, Staff Software Engineer
Jobber, Edmonton AB
Last modified Rd: 2013-04-10
thickenPolys.
local(envir=.PBSmapEnv,expr={
oldpar = par(no.readonly=TRUE)
#--- load the data (if using R)
if (!is.null(version$language) && (version$language=="R"))
data(nepacLL,envir=.PBSmapEnv)
#--- plot a thinned version of Vancouver Island (3 km tolerance)
plotMap(thinPolys(nepacLL[nepacLL$PID == 33, ], tol = 3))
#--- add the original Vancouver Island in a different line type to
#--- emphasize the difference
addPolys(nepacLL[nepacLL$PID == 33, ], border=2, lty=8, density=0)
par(oldpar)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.