From 00743f5d1192df1856994f193fc063d06c69532a Mon Sep 17 00:00:00 2001 From: Ben Varick Date: Fri, 31 Jan 2025 17:46:02 -0600 Subject: [PATCH] added make osm_edit_brouter_containers --- Makefile | 7 +++---- README.md | 6 +++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3511063..41d2f2f 100644 --- a/Makefile +++ b/Makefile @@ -44,10 +44,6 @@ brouter-data: cd ./docker/brouter/brouter-web; cp config.template.js config.js 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: 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 ./ @@ -58,3 +54,6 @@ osm_edit_generate_pbf: 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 +osm_edit_brouter_containers: + cd ./docker/brouter/osm_edit; docker compose up -d + diff --git a/README.md b/README.md index d2113a8..59b65bf 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,16 @@ calculates the walking routes using OSRM. ## 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 is currently not working, I'm trying to figure it out. + This is a multi-step process: 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. 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. +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. - [Bike Level of Traffic Stress (LTS)](https://www.dvrpc.org/webmaps/bike-lts/analysis/)