thin {quickPlot} | R Documentation |
Thin a polygon using fastshp::thin
Description
For visualizing, it is sometimes useful to remove points in Spatial*
objects.
This will change the geometry, so it is not recommended for computation.
This is similar to sf::st_simplify
,
but faster (see examples) for large shapefiles, particularly if
returnDataFrame
is TRUE
.
thin
will not attempt to preserve topology.
It is strictly for making smaller polygons for the (likely) purpose of visualizing more quickly.
Usage
thin(
x,
tolerance,
returnDataFrame,
minCoordsToThin,
...,
verbose = getOption("quickPlot.verbose")
)
thnSpatialPolygons(
x,
tolerance = NULL,
returnDataFrame = FALSE,
minCoordsToThin = 1e+05,
maxNumPolygons = getOption("quickPlot.maxNumPolygons", 3000),
...,
verbose = getOption("quickPlot.verbose")
)
## Default S3 method:
thin(
x,
tolerance,
returnDataFrame,
minCoordsToThin,
maxNumPolygons,
...,
verbose = getOption("quickPlot.verbose")
)
Arguments
x |
A |
tolerance |
Maximum allowable distance for a point to be removed. |
returnDataFrame |
If |
minCoordsToThin |
If the number of coordinates is smaller than this number,
then thin will just pass through, though it will take the time required to
calculate how many points there are (which is not |
... |
Passed to methods (e.g., |
verbose |
Numeric or logical. If |
maxNumPolygons |
For speed, |