diff --git a/generate.sh b/generate.sh index 4f0f621..1407203 100755 --- a/generate.sh +++ b/generate.sh @@ -189,6 +189,8 @@ if [ -z "${bounding_box}" ] && echo ${input_file} | grep "merge"; then error_and_usage "Using a merged file (_merge) without bounding box is not possible." fi +mkdir -p $(dirname ${output_file}) + # Uncomment this or set the variable before starting the script if # you want to generate file for huge map (change 26g to whatever is # relevant for your system) diff --git a/init.sh b/init.sh index 25d760b..0966dff 100755 --- a/init.sh +++ b/init.sh @@ -64,7 +64,7 @@ function download_shapefile() { echo "Downloading land polygons..." rm -rf "inputs/land-polygons-split-4326" rm -f "inputs/land-polygons-split-4326.zip" - wget -v -N -P "inputs" http://data.openstreetmapdata.com/land-polygons-split-4326.zip || exit 1 + wget -v -N -P "inputs" https://osmdata.openstreetmap.de/download/land-polygons-split-4326.zip || exit 1 unzip -o "inputs/land-polygons-split-4326.zip" -d "inputs" rm -f "inputs/land-polygons-split-4326.zip" fi diff --git a/inputs/coastline-fix.sh b/inputs/coastline-fix.sh index 47d99e2..36c1f95 100755 --- a/inputs/coastline-fix.sh +++ b/inputs/coastline-fix.sh @@ -66,6 +66,11 @@ LON=${CENTER[1]} # Land ogr2ogr -overwrite -progress -skipfailures -clipsrc $LEFT $BOTTOM $RIGHT $TOP "${region_dir}/${region_name}_land.shp" "$INPUTS/land-polygons-split-4326/land_polygons.shp" +if [ $? -ne 0 ]; then + exit $? +fi + + python shape2osm.py -l "${region_dir}/${region_name}_land" "${region_dir}/${region_name}_land.shp" # Sea