Skip to content

Instantly share code, notes, and snippets.

@davidheyman
Last active February 1, 2017 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidheyman/35957c91b7266b6620028ff0904144bf to your computer and use it in GitHub Desktop.
Save davidheyman/35957c91b7266b6620028ff0904144bf to your computer and use it in GitHub Desktop.
MapMaster Data Processing Commands
# Convert shp to topjson and simplify
mapshaper -i /Volumes/Storage/Box\ Sync/MapMaster\ data/World/Physical\ Environment/Vector/005_Water_Resources_Vulnerability/005_Water_Resources_Vulnerability.shp -simplify 5% -o data/world/005_water_resources.json format=topojson
# Load shapefiles in subdirectories into PostGIS
for f in *; do cd $f; for g in *.shp; do shp2pgsql -I -s 4326 $g `basename $g .shp` | psql -d mapmaster; cd ../; done; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment