Apply a mapshaper command string to a geojson object
apply_mapshaper_commands(data, command, force_FC, sys = FALSE)
geojson object or path to geojson file. If a file path, sys
must be true
valid mapshaper command string
should the output be forced to be a FeatureCollection (or
Spatial*DataFrame) even if there are no attributes? Default TRUE
.
FeatureCollections are more compatible with rgdal::readOGR and
geojsonio::geojson_sp. If FALSE and there are no attributes associated with
the geometries, a GeometryCollection (or Spatial object with no dataframe)
will be output.
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.
geojson