changed container called by osm_edit_generate_brouter, works now

This commit is contained in:
Ben Varick 2025-01-31 13:32:31 -06:00
parent 47a4e865d6
commit 1baaca834a
Signed by: ben
SSH Key Fingerprint: SHA256:jWnpFDAcacYM5aPFpYRqlsamlDyKNpSj3jj+k4ojtUo
6 changed files with 5 additions and 63 deletions

View File

@ -50,11 +50,11 @@ osm_edit_import_pbf:
osm_edit_refresh_base: osm_edit_refresh_base:
cd ./docker/brouter/osm_edit; wget https://download.geofabrik.de/north-america/us/wisconsin-latest.osm.pbf -O ./pbf_files/wisconsin-latest.osm.pbf cd ./docker/brouter/osm_edit; wget https://download.geofabrik.de/north-america/us/wisconsin-latest.osm.pbf -O ./pbf_files/wisconsin-latest.osm.pbf
cd ./docker/brouter/osm_edit/srtm/; wget -i srtm_tiles.csv -P ./ cd ./docker/brouter/osm_edit/srtm3/; wget -i srtm_tiles.csv -P ./
osm_edit_generate_pbf: osm_edit_generate_pbf:
cd ./docker/brouter/; docker run -v ./osm_edit:/osm_edit ghcr.io/bvarick/osmium-tool:2.21.0 osmium apply-changes /osm_edit/pbf_files/wisconsin-latest.osm.pbf /osm_edit/map_edited.osm -o /osm_edit/pbf_files/wisconsin-latest_edited.osm.pbf --overwrite cd ./docker/brouter/; docker run -v ./osm_edit:/osm_edit ghcr.io/bvarick/osmium-tool:2.21.0 osmium apply-changes /osm_edit/pbf_files/wisconsin-latest.osm.pbf /osm_edit/map_edited.osm -o /osm_edit/pbf_files/wisconsin-latest_edited.osm.pbf --overwrite
osm_edit_generate_brouter: osm_edit_generate_brouter:
docker run --rm -v ./docker/brouter/osm_edit:/osm_edit brouter /osm_edit/process_pbf.sh docker run --rm --user "$(id -u):$(id -g)" --env PLANET=wisconsin-latest_edited.osm.pbf --env JAVA_OPTS="-Xmx2048M -Xms2048M -Xmn256M" --env PLANET_UPDATE=0 --volume ./docker/brouter/osm_edit/brouter-tmp:/brouter-tmp --volume ./docker/brouter/osm_edit/pbf_files:/planet --volume ./docker/brouter/osm_edit/srtm3:/srtm3:ro --volume ./docker/brouter/osm_edit/segments:/segments ghcr.io/mjaschen/brouter-routingdata-builder

View File

@ -38,7 +38,7 @@ calculates the walking routes using OSRM.
This allows you to make changes to the street network (add a bike path, reduce a lane on an arterial st) and see how it affects the routes that brouter chooses. This allows you to make changes to the street network (add a bike path, reduce a lane on an arterial st) and see how it affects the routes that brouter chooses.
This is a multi-step process: This is a multi-step process:
1. Make edits to OpenStreetMap in [JOSM](https://josm.openstreetmap.de/) 1. Make edits to OpenStreetMap in [JOSM](https://josm.openstreetmap.de/)
2. Save the edited map as `map_edited.osm` in `docker/brouter/osm_edit/` (File -> Save As) 2. Save the edited map as `docker/brouter/osm_edit/map_edited.osm` (File -> Save As)
3. `make osm_edit_refresh_base` will download a fresh copy of `wisconsin-latest.osm.pbf` and the elevation tiles for Wisconsin. You don't need to run this frequently. 3. `make osm_edit_refresh_base` will download a fresh copy of `wisconsin-latest.osm.pbf` and the elevation tiles for Wisconsin. You don't need to run this frequently.
4. `make osm_edit_generate_pbf` will take those edits and apply them to the `wisconsin-latest.osm.pbf` and generate `wisconsin-latest_edited.osm.pbf` 4. `make osm_edit_generate_pbf` will take those edits and apply them to the `wisconsin-latest.osm.pbf` and generate `wisconsin-latest_edited.osm.pbf`
5. `make osm_edit_generate_brouter` will generate new brouter segment files from the edited pbf file. 5. `make osm_edit_generate_brouter` will generate new brouter segment files from the edited pbf file.

View File

@ -11,3 +11,4 @@
# Except osm_edit # Except osm_edit
!osm_edit/ !osm_edit/
!mapcreation/*

View File

@ -1,47 +0,0 @@
#!/bin/bash
set -e
cd /osm_edit
touch lastmaprun.date
JAVA='java -Xmx2600m -Xms2600m -Xmn32m'
BROUTER_PROFILES="/profiles2"
BROUTER_JAR="/brouter.jar"
PLANET_FILE="/osm_edit/pbf_files/wisconsin-latest_edited.osm.pbf"
SRTM_PATH="/osm_edit/srtm"
rm -rf tmp
mkdir tmp
cd tmp
mkdir nodetiles
${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
${JAVA} -cp ${BROUTER_JAR} -Ddeletetmpfiles=true -DuseDenseMaps=true btools.mapcreator.RelationMerger ways.dat ways2.dat relations.dat ${BROUTER_PROFILES}/lookups.dat ${BROUTER_PROFILES}/trekking.brf ${BROUTER_PROFILES}/softaccess.brf
mkdir waytiles
${JAVA} -cp ${BROUTER_JAR} -Ddeletetmpfiles=true -DuseDenseMaps=true btools.mapcreator.WayCutter ftiles ways2.dat waytiles
mkdir waytiles55
${JAVA} -cp ${BROUTER_JAR} -Ddeletetmpfiles=true -DuseDenseMaps=true btools.mapcreator.WayCutter5 ftiles waytiles waytiles55 bordernids.dat
mkdir nodes55
${JAVA} -cp ${BROUTER_JAR} -Ddeletetmpfiles=true -DuseDenseMaps=true btools.mapcreator.NodeCutter ftiles nodes55
mkdir unodes55
${JAVA} -cp ${BROUTER_JAR} -Ddeletetmpfiles=true -DuseDenseMaps=true btools.mapcreator.PosUnifier nodes55 unodes55 bordernids.dat bordernodes.dat ${SRTM_PATH}
mkdir segments
${JAVA} -cp ${BROUTER_JAR} -DuseDenseMaps=true btools.mapcreator.WayLinker unodes55 waytiles55 bordernodes.dat restrictions.dat ${BROUTER_PROFILES}/lookups.dat ${BROUTER_PROFILES}/all.brf segments rd5
rm -rf /osm_edit/segments4_lastrun
cp -R /osm_edit/segments4 /osm_edit/segments4_lastrun
mv /osm_edit/tmp/segments/ /osm_edit/segments4/
rm -rf /osm_edit/tmp

View File

@ -1,8 +0,0 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
# Except srtm_tiles.csv
!srtm_tiles.csv

View File

@ -1,4 +0,0 @@
https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/ASCII/srtm_18_03.zip
https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/ASCII/srtm_18_04.zip
https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/ASCII/srtm_19_03.zip
https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/ASCII/srtm_19_04.zip
1 https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/ASCII/srtm_18_03.zip
2 https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/ASCII/srtm_18_04.zip
3 https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/ASCII/srtm_19_03.zip
4 https://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/ASCII/srtm_19_04.zip