Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stopping in the middle of import planet.sh #103

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions import/import_planet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,6 @@ sudo DEBIAN_FRONTEND=noninteractive apt update
sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y -q
sudo DEBIAN_FRONTEND=noninteractive apt install -y -q make g++ git awscli build-essential autoconf libtool pkg-config python-dev python-virtualenv python-pip python-pil libxml2-dev libxslt-dev unzip postgis

# install osm2pgsql from PPA
if [[ ! -x $OSM2PGSQL ]]; then
echo "installing osm2pgsql" > $STATUS
sudo DEBIAN_FRONTEND=noninteractive apt-add-repository -y ppa:tilezen/ppa
sudo DEBIAN_FRONTEND=noninteractive apt update
sudo DEBIAN_FRONTEND=noninteractive apt install -y -q osm2pgsql
fi

# if there's no planet, then download it
if [[ ! -f "planet/${PLANET_FILE}" ]]; then
echo "downloading planet" > $STATUS
Expand Down Expand Up @@ -114,6 +106,17 @@ echo "setting up database extensions" > $STATUS
psql -c "create extension if not exists postgis"
psql -c "create extension if not exists hstore"

echo "stopped so that Travis can try to upgrade os2mpgsql" > $STATUS
exit 1

# install osm2pgsql from PPA
#if [[ ! -x $OSM2PGSQL ]]; then
# echo "installing osm2pgsql" > $STATUS
# sudo DEBIAN_FRONTEND=noninteractive apt-add-repository -y ppa:tilezen/ppa
# sudo DEBIAN_FRONTEND=noninteractive apt update
# sudo DEBIAN_FRONTEND=noninteractive apt install -y -q osm2pgsql
#fi

# check if there's any data already in the database!
echo "checking for existing OSM data in database" > $STATUS
ntuples=`psql -t -c "select sum(n_live_tup) from pg_stat_user_tables where relname = 'planet_osm_polygon'"`
Expand Down