Skip to content

Instantly share code, notes, and snippets.

@zeitiger
Created March 9, 2016 08:21
Show Gist options
  • Save zeitiger/a57ead8904ee9a6ec4c3 to your computer and use it in GitHub Desktop.
Save zeitiger/a57ead8904ee9a6ec4c3 to your computer and use it in GitHub Desktop.
How to convert shp to geojson under Mac OS X
#install gdal
brew install gdal
#convert 1:1
ogr2ogr -f "GeoJSON" file.geojson file.shp
#convert loose, higher tolerance in simplify reduce files size and lost data precision
ogr2ogr -simplify 0.000001 -f "GeoJSON" file.geojson file.shp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment