added make osm_edit_brouter_containers

This commit is contained in:
Ben Varick 2025-01-31 17:46:02 -06:00
parent 4ce0fadf28
commit 00743f5d11
No known key found for this signature in database
2 changed files with 8 additions and 5 deletions

View File

@ -44,10 +44,6 @@ brouter-data:
cd ./docker/brouter/brouter-web; cp config.template.js config.js cd ./docker/brouter/brouter-web; cp config.template.js config.js
cd ./docker/brouter; docker compose build cd ./docker/brouter; docker compose build
osm_edit_import_pbf:
cd ./docker/osm_edit/; wget https://download.geofabrik.de/north-america/us/wisconsin-latest.osm.pbf -O ./osm-data/wisconsin-latest.osm.pbf
cd ./docker/osm_edit/; rm ./osm-data/wisconsin-latest.osm; docker run -v ./osm-data:/osm-data ghcr.io/bvarick/osmosis:0.49.2 osmosis --read-pbf "/osm-data/wisconsin-latest.osm.pbf" --write-xml file="/osm-data/wisconsin-latest.osm"
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/srtm3/; wget -i srtm_tiles.csv -P ./ cd ./docker/brouter/osm_edit/srtm3/; wget -i srtm_tiles.csv -P ./
@ -58,3 +54,6 @@ osm_edit_generate_pbf:
osm_edit_generate_brouter: osm_edit_generate_brouter:
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 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
osm_edit_brouter_containers:
cd ./docker/brouter/osm_edit; docker compose up -d

View File

@ -36,12 +36,16 @@ calculates the walking routes using OSRM.
## What-if analysis ## What-if analysis
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 currently not working, I'm trying to figure it out.
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 `docker/brouter/osm_edit/map_edited.osm` (File -> Save As) 2. Save the edited map as `docker/brouter/osm_edit/map_edited.osm` (File -> Save As). Don't upload your hypothetical infrastructure to OpenStreetMap!
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.
6. `make osm_edit_brouter_containers` starts the brouter backend and frontend using your newly created segment files with the edits you made. You can access the webui at http://127.0.0.1:8080
## 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/)