Skip to content

Instantly share code, notes, and snippets.

@leblowl
Created July 14, 2015 19:01
Show Gist options
  • Save leblowl/a7017d8f6b682df6fe5f to your computer and use it in GitHub Desktop.
Save leblowl/a7017d8f6b682df6fe5f to your computer and use it in GitHub Desktop.
# water polygons
#
wget http://data.openstreetmapdata.com/water-polygons-split-3857.zip
unzip water-polygons-split-3857.zip
shp2pgsql -dID -s 900913 -W Windows-1252 -g the_geom water-polygons-split-3857/water_polygons.shp water_polygons | psql "$@"
rm ./water-polygons-split-3857.zip && rm -rf ./water-polygons-split-3857
# land polygons
#
wget http://data.openstreetmapdata.com/land-polygons-split-3857.zip
unzip land-polygons-split-3857.zip
shp2pgsql -dID -s 900913 -W Windows-1252 -g the_geom land-polygons-split-3857/land_polygons.shp land_polygons | psql "$@"
rm ./land-polygons-split-3857.zip && rm -rf ./land-polygons-split-3857
# simplified land polygons
#
wget http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip
unzip simplified-land-polygons-complete-3857.zip
shp2pgsql -dID -s 900913 -W Windows-1252 -g the_geom simplified-land-polygons-complete-3857/simplified_land_polygons.shp simplified_land_polygons | psql "$@"
rm ./simplified-land-polygons-complete-3857.zip && rm -rf ./simplified-land-polygons-complete-3857
@leblowl
Copy link
Author

leblowl commented Jul 14, 2015

Usage: ./add-external-data.sh -U postgres -d osm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment