Adapt scripts & documentation

This commit is contained in:
Manuel Fuhr 2023-05-17 20:04:56 +02:00
parent c058cc57ef
commit c0245df07b
6 changed files with 3 additions and 70 deletions

View file

@ -1,3 +0,0 @@
*.jar
*.BAK
btools/

View file

@ -1,23 +0,0 @@
The pbf-parse is not included in the regular source tree
to avoid the library dependencies to "osmosis" and "protobuf"
In order to run the mapcreator from a pbf-file (as it is
done in the process_pbf_planet.sh script included in
the git-repo), you have to build yourself the "pbfparser.jar"
by doing the following:
-> get osmosis from https://bretth.dev.openstreetmap.org/osmosis-build/osmosis-latest.zip
-> copy lib/default/osmosis-osm-binary-*.jar in the archive to osmosis.jar in
this folder
-> copy lib/default/protobuf-java-*.jar in the archive to protobuf.jar in this
folder
-> copy the brouter-server/build/libs/brouter-...-all.jar to
brouter.jar in this folder
-> compile the PBF-Parser using:
javac -d . -cp protobuf.jar:osmosis.jar:brouter.jar *.java
-> pack all the compiled class files together in a jar
"pbfparser.jar" with "jar cf pbfparser.jar btools/**/*.class"
Alternatively, just for testing you can run the Mapcreator against a *xml.bz2 Database-Extract,
then you don't need the pbf-parser. However, the XML-Parser does not (yet) parse
Turn-Restrictions, so really just for testing...

View file

@ -1 +0,0 @@
javac -d . -cp pbfparser.jar;brouter.jar BPbfFieldDecoder.java BPbfBlobDecoder.java OsmParser.java

View file

@ -24,14 +24,11 @@ touch lastmaprun.date
rm -rf /var/www/brouter/segments4_lastrun
JAVA='/java/bin/java -Xmx2600m -Xms2600m -Xmn32m'
JAVA='java -Xmx2600m -Xms2600m -Xmn32m'
BROUTER_PROFILES=$(realpath "../../profiles2")
BROUTER_JAR=$(realpath $(ls ../../../brouter-server/build/libs/brouter-*-all.jar))
OSMOSIS_JAR=$(realpath "../../pbfparser/osmosis.jar")
PROTOBUF_JAR=$(realpath "../../pbfparser/protobuf.jar")
PBFPARSER_JAR=$(realpath "../../pbfparser/pbfparser.jar")
PLANET_FILE=${PLANET_FILE:-$(realpath "./planet-latest.osm.pbf")}
# Download SRTM zip files from
@ -43,7 +40,7 @@ SRTM_PATH="/private-backup/srtm"
mkdir tmp
cd tmp
mkdir nodetiles
${JAVA} -cp "${OSMOSIS_JAR}:${PROTOBUF_JAR}:${PBFPARSER_JAR}:${BROUTER_JAR}" btools.mapcreator.OsmCutter ${BROUTER_PROFILES}/lookups.dat nodetiles ways.dat relations.dat restrictions.dat ${BROUTER_PROFILES}/all.brf ${PLANET_FILE}
${JAVA} -cp ${BROUTER_JAR} -DavoidMapPolling=true btools.mapcreator.OsmCutter ${BROUTER_PROFILES}/lookups.dat nodetiles ways.dat relations.dat restrictions.dat ${BROUTER_PROFILES}/all.brf ${PLANET_FILE}
mkdir ftiles
${JAVA} -cp ${BROUTER_JAR} -Ddeletetmpfiles=true -DuseDenseMaps=true btools.mapcreator.NodeFilter nodetiles ways.dat ftiles

View file

@ -15,7 +15,7 @@ mkdir waytiles
mkdir waytiles55
mkdir nodes55
../../jdk8/bin/java -Xmx6144M -Xms6144M -Xmn256M -cp ../pbfparser.jar:../brouter_fc.jar -Ddeletetmpfiles=true -DuseDenseMaps=true btools.util.StackSampler btools.mapcreator.OsmFastCutter ../lookups.dat nodetiles waytiles nodes55 waytiles55 bordernids.dat relations.dat restrictions.dat ../all.brf ../trekking.brf ../softaccess.brf ../planet-new.osm.pbf
../../jdk8/bin/java -Xmx6144M -Xms6144M -Xmn256M -cp ../brouter_fc.jar -Ddeletetmpfiles=true -DuseDenseMaps=true btools.util.StackSampler btools.mapcreator.OsmFastCutter ../lookups.dat nodetiles waytiles nodes55 waytiles55 bordernids.dat relations.dat restrictions.dat ../all.brf ../trekking.brf ../softaccess.brf ../planet-new.osm.pbf
mv ../planet-latest.osm.pbf ../planet-old.osm.pbf
mv ../planet-new.osm.pbf ../planet-latest.osm.pbf