rmapshaper | R Documentation |
Edit and simplify 'geojson', 'Spatial', and 'sf' objects. This is wrapper around the 'mapshaper' 'javascript' library by Matthew Bloch https://github.com/mbloch/mapshaper/ to perform topologically-aware polygon simplification, as well as other operations such as clipping, erasing, dissolving, and converting 'multi-part' to 'single-part' geometries.
All functions
ms_simplify
- simplify polygons or lines
ms_clip
- clip an area out of a layer using a polygon layer or a bounding box. Works on polygons, lines, and points
ms_erase
- erase an area from a layer using a polygon layer or a bounding box. Works on polygons, lines, and points
ms_dissolve
- aggregate polygon features, optionally specifying a field to aggregate on. If no field is specified, will merge all polygons into one.
ms_explode
- convert multipart shapes to single part. Works with polygons, lines, and points in geojson format, but currently only with polygons and lines in the Spatial
classes (not SpatialMultiPoints
and SpatialMultiPointsDataFrame
).
ms_lines
- convert polygons to topological boundaries (lines)
ms_innerlines
- convert polygons to shared inner boundaries (lines)
ms_points
- create points from a polygon layer
ms_filter_fields
- Remove fields from the attributes
ms_filter_islands
- Remove small detached polygons
Andy Teucher andy.teucher@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.