Fix coastline-fix.sh
This commit is contained in:
parent
1619287e51
commit
627364f104
@ -3,20 +3,33 @@
|
||||
# Mapsforge map creation (with coastlines) - Modified by Mikael
|
||||
|
||||
# Osmosis folder
|
||||
OSMOSIS=/opt/osmosis/bin/osmosis
|
||||
OSMOSIS=$(pwd)/../bin/osmosis
|
||||
|
||||
# Input folder
|
||||
INPUTS=/opt/osmosis/inputs
|
||||
INPUTS=$(pwd)
|
||||
|
||||
# Change to desired region
|
||||
REGION=bretagne
|
||||
REGION=$1
|
||||
|
||||
# Use existing files, but if necessary can download...
|
||||
# echo "Downloading $1..."
|
||||
# wget -nv -N -P "$WORK_PATH" http://download.geofabrik.de/$1-latest.osm.pbf || exit 1
|
||||
# wget -nv -N -P "$WORK_PATH" http://download.geofabrik.de/$1-latest.osm.pbf.md5 || exit 1
|
||||
# (cd "$WORK_PATH" && exec md5sum -c "$NAME-latest.osm.pbf.md5") || exit 1
|
||||
# wget -nv -N -P "$WORK_PATH" http://download.geofabrik.de/$1.poly || exit 1
|
||||
if [ -z "${REGION}" ]; then
|
||||
echo "Usage: $0: REGION_NAME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e "${REGION}/${REGION}-latest.osm.pbf" ]; then
|
||||
echo "${REGION}/${REGION}-latest.pbf does not exist, you may want to download it from https://download.geofabrik.de/index.html."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e "${REGION}/${REGION}.poly" ]; then
|
||||
echo "${REGION}/${REGION}.poly does not exist, you may want to download it from https://download.geofabrik.de/index.html."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e "$INPUTS/land-polygons-split-4326/land_polygons.shp" ]; then
|
||||
echo "Land polygons shapefile does not exist, did you forget to run init.sh?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Bounds
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user