Learn R Programming

stplanr (version 0.0.2)

mapshape: Simplify geometry file of a shapfile.

Description

Simplify geometry file of a shapfile.

Usage

mapshape(dsn, percent)

Arguments

dsn
A character string providing the absolute path to the shapefile to simplify.
percent
A number between 0 and 100 stating how aggressively to simplify the object Percentage of removable points to retain. So percent = 1 is a very aggressive simplication, saving a huge amount of hard-disk space.

Details

This is a wrapper funtion for the open source JavaScript command-line GIS application mapshaper: https://github.com/mbloch/mapshaper . mapshaper which must be installed locally for mapshaper to work. Writes mapshape writes new file to disk. Thanks to Richard and Adrian Ellison for demonstrating this in R.

Examples

Run this code
mapshape("~/geodata/myShapefile.shp", 5)

Run the code above in your browser using DataLab