Minor fixes.

This commit is contained in:
Mikaël Capelle 2020-07-15 17:31:28 +02:00
parent 1b71531b5e
commit 68a82ccbc8
3 changed files with 8 additions and 1 deletions

View File

@ -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)

View File

@ -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

View File

@ -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