target: the target layer from which to remove portions. One of:
geo_json or character points, lines, or polygons;
SpatialPolygons, SpatialLines, SpatialPoints;
sf or sfc points, lines, or polygons object
clip: the clipping layer (polygon). One of:
geo_json or character polygons;
SpatialPolygons*;
sf or sfc polygons object
bbox: supply a bounding box instead of a clipping layer to extract from the target layer. Supply as a numeric vector: c(minX, minY, maxX, maxY).
remove_slivers: Remove tiny sliver polygons created by clipping. (Default FALSE)
...: Arguments passed on to apply_mapshaper_commands
force_FC: should the output be forced to be a FeatureCollection (or sf object or Spatial*DataFrame) even if there are no attributes? Default TRUE. If FALSE and there are no attributes associated with the geometries, a GeometryCollection (or Spatial object with no dataframe, or sfc) will be output.
sys: Should the system mapshaper be used instead of the bundled mapshaper? Gives better performance on large files. Requires the mapshaper node package to be installed and on the PATH.
sys_mem: How much memory (in GB) should be allocated if using the system mapshaper (sys = TRUE)? Default 8. Ignored if sys = FALSE. This can also be set globally with the option "mapshaper.sys_mem"
quiet: If sys = TRUE, should the mapshaper messages be silenced? Default FALSE. This can also be set globally with the option "mapshaper.sys_quiet"
Returns
clipped target in the same class as the input target