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

C227 osm #13

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cache
import_done
import_queue
settings/*.pbf
docker-imposm3/*.pbf
BACKUP-STYLES.sql
settings/last.state.txt
settings/timestamp.txt
Expand Down
30 changes: 7 additions & 23 deletions docker-imposm3/countries.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
#!/bin/bash

if [ $# -ge 0 ]
then
echo "found $# parameters to download"
for ct in "$@"
do
IFS=':'
read -ra ADDR <<< "$ct"
if [ ${#ADDR[@]} -eq 1 ]
then
continent=$(echo ${ADDR[0]} | tr '[:upper:]' '[:lower:]' )
curl -LO https://download.geofabrik.de/$continent-latest.osm.pbf
elif [ ${#ADDR[@]} -eq 2 ]
then
continent=$(echo ${ADDR[0]} | tr '[:upper:]' '[:lower:]' )
country=$(echo ${ADDR[1]} | tr '[:upper:]' '[:lower:]' )
curl -LO https://download.geofabrik.de/$continent/$country-latest.osm.pbf
else
echo "Please pass parameter as continent:country e.g. Asia:India"
fi
done
else
echo "Please pass at least continent name ( europe, africa, antarctica, asia, australia-oceania, central-america, north-america, south-america )"
fi
# Can be an array, e.g.: COUNTRIES=('great-britain' 'italy')
COUNTRIES=('great-britain')

for country in "${COUNTRIES[@]}"
do
curl -LO http://download.geofabrik.de/europe/${country}-latest.osm.pbf
done