View source: R/future_simplify.R
future_simplify | R Documentation |
rmapshaper::ms_simplify
simply splits up an sf and runs the simplify algorithm on each chunk. Uses mapshaper to simplify polygons. Currently only supports sf objects.
future_simplify(
x,
keep = 0.05,
method = NULL,
weighting = 0.7,
keep_shapes = FALSE,
no_repair = FALSE,
snap = TRUE,
explode = FALSE,
drop_null_geometries = TRUE,
snap_interval = NULL,
nchunks = 1,
.progress = FALSE
)
x |
spatial object to simplify. One of:
|
keep |
proportion of points to retain (0-1; default 0.05) |
method |
simplification method to use: |
weighting |
Coefficient for weighting Visvalingam simplification (default is 0.7). Higher values produce smoother output. weighting=0 is equivalent to unweighted Visvalingam simplification. |
keep_shapes |
Prevent small polygon features from disappearing at high
simplification (default |
no_repair |
disable intersection repair after simplification (default
|
snap |
Snap together vertices within a small distance threshold to fix
small coordinate misalignment in adjacent polygons. Default |
explode |
Should multipart polygons be converted to singlepart polygons?
This prevents small shapes from disappearing during simplification if
|
drop_null_geometries |
should Features with null geometries be dropped?
Ignored for |
snap_interval |
Specify snapping distance in source units, must be a
numeric. Default |
nchunks |
The number of chunks to run on each core. Default is 1. Can improve or worsen performance depending on dataset size and number of cores |
.progress |
Show progress bar. Only useful when nchunks > 1. default is FALSE |
a simplified representation of the geometry in the same class as the input
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.