Improve documentation
* Improve documentation about BRouter usage and the provided scripts (misc/scripts). * Document how to use BRouter with third-party apps on Android (Locus / OSMAnd). * Improved process_planet_pbf.sh map creation script to make use of osmupdate if available and avoid downloading the planet file if not needed.
This commit is contained in:
parent
6faaa6ec23
commit
6ed1850518
9 changed files with 274 additions and 27 deletions
|
|
@ -1,6 +1,19 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
wget -N http://planet.openstreetmap.org/pbf/planet-latest.osm.pbf
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Fetch OSM planet dump if no planet file is specified
|
||||
if [ -z "$PLANET_FILE" ]; then
|
||||
if [ -x "$(command -v osmupdate)" ] && [[ -f "./planet-latest.osm.pbf" ]]; then
|
||||
# Prefer running osmupdate to update the planet file if available
|
||||
mv "./planet-latest.osm.pbf" "./planet-latest.old.osm.pbf"
|
||||
osmupdate "planet-latest.old.osm.pbf" "./planet-latest.osm.pbf"
|
||||
rm "./planet-latest.old.osm.pbf"
|
||||
else
|
||||
# Otherwise, download it again
|
||||
wget -N http://planet.openstreetmap.org/pbf/planet-latest.osm.pbf
|
||||
fi
|
||||
fi
|
||||
|
||||
if test lastmaprun.date -nt planet-latest.osm.pbf; then
|
||||
echo "no osm update, exiting"
|
||||
|
|
@ -20,7 +33,7 @@ OSMOSIS_JAR=$(realpath "../../pbfparser/osmosis.jar")
|
|||
PROTOBUF_JAR=$(realpath "../../pbfparser/protobuf.jar")
|
||||
PBFPARSER_JAR=$(realpath "../../pbfparser/pbfparser.jar")
|
||||
|
||||
PLANET_FILE=$(realpath "./planet-latest.osm.pbf")
|
||||
PLANET_FILE=${PLANET_FILE:-$(realpath "./planet-latest.osm.pbf")}
|
||||
# Download SRTM zip files from
|
||||
# https://cgiarcsi.community/data/srtm-90m-digital-elevation-database-v4-1/
|
||||
# (use the "ArcInfo ASCII" version) and put the ZIP files directly in this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue