View source: R/polygons_clean.R
polygons_clean | R Documentation |
Helper function to process and clean up polygons downloaded from OpenStreetMap.
polygons_clean(
input,
snap_tolerance = 5,
min_area = units::set_units(0, "m^2"),
aggregate_polygons = 15
)
input |
|
snap_tolerance |
numeric. Argument for |
min_area |
numeric. Specify minimum area of each polygon to be retained in the output,
passed to argument |
aggregate_polygons |
numeric. Argument for |
Polygons contained in or overlapping others are removed.
Polygons vertices are then snapped
at a tolerance level based on snap_tolerance
(if specified) to rectify nearly coincident edges,
and polygons covered by others are subsequently removed. Polygons are then aggregated
to multipolygons based on distance set in aggregate_polygons
(if specified).
All spatial relations (italicised) follow the DE-9IM standard.
The processed polygons (sf
object).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.