attempt at generating Brouter segment files

This commit is contained in:
Ben Varick 2025-01-31 12:05:33 -06:00
parent d852d5814e
commit 47a4e865d6
Signed by: ben
SSH Key Fingerprint: SHA256:jWnpFDAcacYM5aPFpYRqlsamlDyKNpSj3jj+k4ojtUo
4 changed files with 10 additions and 14 deletions

View File

@ -56,3 +56,5 @@ 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

View File

@ -39,8 +39,9 @@ This allows you to make changes to the street network (add a bike path, reduce a
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 `map_edited.osm` in `docker/brouter/osm_edit/` (File -> Save As)
3. `make osm_edit_refresh_base` will download a fresh copy of `wisconsin-latest.osm.pbf` and the srtm 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.
3. `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.
## Misc. ## Misc.
- [Bike Level of Traffic Stress (LTS)](https://www.dvrpc.org/webmaps/bike-lts/analysis/) - [Bike Level of Traffic Stress (LTS)](https://www.dvrpc.org/webmaps/bike-lts/analysis/)

View File

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

12
docker/brouter/osm_edit/process_pbf.sh Normal file → Executable file
View File

@ -11,7 +11,7 @@ BROUTER_PROFILES="/profiles2"
BROUTER_JAR="/brouter.jar" BROUTER_JAR="/brouter.jar"
PLANET_FILE="/osm_edit/wisconsin-latest_edited.osm.pbf" PLANET_FILE="/osm_edit/pbf_files/wisconsin-latest_edited.osm.pbf"
SRTM_PATH="/osm_edit/srtm" SRTM_PATH="/osm_edit/srtm"
@ -41,9 +41,7 @@ ${JAVA} -cp ${BROUTER_JAR} -Ddeletetmpfiles=true -DuseDenseMaps=true btools.mapc
mkdir segments 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 ${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
#cd .. rm -rf /osm_edit/segments4_lastrun
#rm -rf segments cp -R /osm_edit/segments4 /osm_edit/segments4_lastrun
#mv tmp/segments segments mv /osm_edit/tmp/segments/ /osm_edit/segments4/
#mv /osm_edit/segments4 /osm_edit/segments4_lastrun rm -rf /osm_edit/tmp
#mv segments /osm_edit/segments4
#rm -rf tmp