ericjarvies
2/10/2017 - 12:27 AM

MapShaper

MapShaper

mapshaper

http://www.mapshaper.org
http://geojson.io/#map=2/20.0/0.0
http://geojsonlint.com
https://github.com/mbloch/mapshaper/wiki/Introduction-to-the-Command-Line-Tool
https://github.com/mbloch/mapshaper/wiki/Command-Reference

Convert shapefiles to GeoJSON files;

mapshaper *.shp -o format=geojson

Split into individual json files, use pid column cell data for file names;

mapshaper SHAUGHNESSY-PROPERTIES-2839.shp name='' -split filename -o format=geojson prettify extension=geojson

Split into individual json files;

mapshaper SHAUGHNESSY-PROPERTIES-2839.shp name='' -o format=geojson prettify

Output attributes without geometries and split into individual json files;

mapshaper SHAUGHNESSY-PROPERTIES-2839.shp cut-table name='' -split pid -o format=json prettify

Merge multiple files into single file;

mapshaper *.json combine-files -merge-layers -o merged.geojson

Simplify features using Ramer-Douglas-Peucker;

mapshaper -i SHAUGHNESSY-PROPERTIES-2839.shp -simplify rdp 30% -o format=geojson rdp.geojson

Simplify features using using Visvalingam;

mapshaper -i SHAUGHNESSY-PROPERTIES-2839.shp -simplify visvalingam 30% -o format=geojson visvalingam.geojson
id-field=
force
bbox-index
bbox
delimiter=|  (| , - ; whatever)
precision=0.001
drop-table (like cut-table, but does not create json file for it)

-o extension=json -o extension=geojson -o extension=topojson

GDAL

Convert a geojson file into a tif;

gdal_rasterize -burn 255 -burn 0 -burn 0 -ts 4950 4090 source.geojson target.tif