From 9304fa7c29dd1614543d3d41f2106a15ca79596c Mon Sep 17 00:00:00 2001 From: Paul Norman Date: Tue, 11 Jun 2013 16:40:15 -0700 Subject: [PATCH 1/2] Change to the new world_boundaries-spherical location --- get-shapefiles.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-shapefiles.sh b/get-shapefiles.sh index 25fa39e229..bd301fb8cc 100755 --- a/get-shapefiles.sh +++ b/get-shapefiles.sh @@ -12,7 +12,7 @@ mkdir -p data/land-polygons-split-3857 # world_boundaries echo "dowloading world_boundaries..." -curl -z data/world_boundaries-spherical.tgz -L -o data/world_boundaries-spherical.tgz http://tile.openstreetmap.org/world_boundaries-spherical.tgz +curl -z "data/world_boundaries-spherical.tgz" -L -o "data/world_boundaries-spherical.tgz" "http://planet.openstreetmap.org/historical-shapefiles/world_boundaries-spherical.tgz" echo "expanding world_boundaries..." tar -xzf data/world_boundaries-spherical.tgz -C data/ From 306307384e282c148b70a74efd010a0e34d56e6c Mon Sep 17 00:00:00 2001 From: Paul Norman Date: Tue, 11 Jun 2013 23:12:07 -0700 Subject: [PATCH 2/2] update unzip commands to update files and decompress missing files --- get-shapefiles.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/get-shapefiles.sh b/get-shapefiles.sh index bd301fb8cc..d3f8c693ab 100755 --- a/get-shapefiles.sh +++ b/get-shapefiles.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e -u +UNZIP_OPTS=-qqu + # create and populate data dir mkdir -p data/ @@ -20,25 +22,25 @@ tar -xzf data/world_boundaries-spherical.tgz -C data/ echo "downloading simplified-land-polygons-complete-3857..." curl -z "data/simplified-land-polygons-complete-3857.zip" -L -o "data/simplified-land-polygons-complete-3857.zip" "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip" echo "simplified-land-polygons-complete-3857..." -unzip -qq data/simplified-land-polygons-complete-3857.zip -d data/ +unzip $UNZIP_OPTS data/simplified-land-polygons-complete-3857.zip simplified-land-polygons-complete-3857/simplified_land_polygons.{shp,shx,prj,dbf,cpg} -d data/ # ne_110m_admin_0_boundary_lines_land echo "dowloading ne_110m_admin_0_boundary_lines_land..." curl -z data/ne_110m_admin_0_boundary_lines_land.zip -L -o data/ne_110m_admin_0_boundary_lines_land.zip http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip echo "expanding ne_110m_admin_0_boundary_lines_land..." -unzip -qq data/ne_110m_admin_0_boundary_lines_land.zip -d data/ne_110m_admin_0_boundary_lines_land/ +unzip $UNZIP_OPTS data/ne_110m_admin_0_boundary_lines_land.zip -d data/ne_110m_admin_0_boundary_lines_land/ # ne_10m_populated_places echo "dowloading ne_10m_populated_places..." curl -z data/ne_10m_populated_places.zip -L -o data/ne_10m_populated_places.zip http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip echo "expanding ne_10m_populated_places..." -unzip -qq data/ne_10m_populated_places.zip -d data/ne_10m_populated_places/ +unzip $UNZIP_OPTS data/ne_10m_populated_places.zip -d data/ne_10m_populated_places/ # land-polygons-split-3857 echo "dowloading land-polygons-split-3857..." curl -z "data/land-polygons-split-3857.zip" -L -o "data/land-polygons-split-3857.zip" "http://data.openstreetmapdata.com/land-polygons-split-3857.zip" echo "expanding land-polygons-split-3857..." -unzip -qq data/land-polygons-split-3857.zip -d data/ +unzip $UNZIP_OPTS data/land-polygons-split-3857.zip -d data/ #process populated places