diff --git a/Makefile b/Makefile index c746f16..eb42337 100644 --- a/Makefile +++ b/Makefile @@ -43,17 +43,3 @@ brouter-data: cd ./docker/brouter/brouter-web; cp keys.template.js keys.js; cd ./docker/brouter/brouter-web; cp config.template.js config.js cd ./docker/brouter; docker compose build - -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 ./ - -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/changes.osc -o /osm_edit/pbf_files/wisconsin-latest_edited.osm.pbf --overwrite - -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 219d534..ae43ea3 100644 --- a/README.md +++ b/README.md @@ -34,17 +34,6 @@ calculates the walking routes using OSRM. - `make cycle-osrm` will run *cycling_route_analysis.Rmd* which calculates the biking routes using OSRM. - `make cycle-brouter` will run *cycling_route_analysis_brouter.Rmd* which calculates the biking routes using brouter. -## What-if analysis -This allows you to make changes to the street network (add a bike path, reduce a lane on an arterial street) and see how it affects the routes that brouter chooses. - -This is a multi-step process: -1. Generate an OsmChange file for the changes that you want to analyze. Don't upload your hypothetical infrastructure to OpenStreetMap! -2. Save that file as `docker/brouter/osm_edit/changes.osc`. -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/) diff --git a/docker/brouter/.gitignore b/docker/brouter/.gitignore index 0dc77db..98f415b 100644 --- a/docker/brouter/.gitignore +++ b/docker/brouter/.gitignore @@ -9,6 +9,5 @@ # Except docker-compose.yml !docker-compose.yml -# Except osm_edit -!osm_edit/ -!mapcreation/* \ No newline at end of file +# Except safety profiles +!safety.brf diff --git a/docker/brouter/osm_edit/.gitignore b/docker/brouter/osm_edit/.gitignore deleted file mode 100644 index 899c425..0000000 --- a/docker/brouter/osm_edit/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore - -# Except osm_edit directories -!pbf_files/ -!srtm3/ -!brouter-tmp/ -!segments/ - -!docker-compose.yml \ No newline at end of file diff --git a/docker/brouter/osm_edit/brouter-tmp/.gitignore b/docker/brouter/osm_edit/brouter-tmp/.gitignore deleted file mode 100644 index 64f5877..0000000 --- a/docker/brouter/osm_edit/brouter-tmp/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Ignore everything in this directory -* - -# Except this file -!.gitignore diff --git a/docker/brouter/osm_edit/docker-compose.yml b/docker/brouter/osm_edit/docker-compose.yml deleted file mode 100644 index e37f5cc..0000000 --- a/docker/brouter/osm_edit/docker-compose.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -services: - brouter: - container_name: brouter - ports: - - 17777:17777 - volumes: - - ./segments:/segments4 - image: brouter - build: - context: ../brouter - dockerfile: Dockerfile ---- -services: - brouter-web: - container_name: brouter-web - ports: - - 127.0.0.1:8080:80 - volumes: - - ../brouter-web/config.js:/usr/share/nginx/html/config.js - - ../brouter-web/keys.js:/usr/share/nginx/html/keys.js - - ../brouter-web/profiles:/usr/share/nginx/html/profiles - image: brouter-web - build: - context: ../brouter-web - dockerfile: Dockerfile diff --git a/docker/brouter/osm_edit/pbf_files/.gitignore b/docker/brouter/osm_edit/pbf_files/.gitignore deleted file mode 100644 index 64f5877..0000000 --- a/docker/brouter/osm_edit/pbf_files/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Ignore everything in this directory -* - -# Except this file -!.gitignore diff --git a/docker/brouter/osm_edit/segments/.gitignore b/docker/brouter/osm_edit/segments/.gitignore deleted file mode 100644 index 64f5877..0000000 --- a/docker/brouter/osm_edit/segments/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Ignore everything in this directory -* - -# Except this file -!.gitignore diff --git a/docker/brouter/osm_edit/srtm3/.gitignore b/docker/brouter/osm_edit/srtm3/.gitignore deleted file mode 100644 index c8b8738..0000000 --- a/docker/brouter/osm_edit/srtm3/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Ignore everything in this directory -* - -# Except this file -!.gitignore - -# Except srtm_tiles.csv -!srtm_tiles.csv diff --git a/docker/brouter/osm_edit/srtm3/srtm_tiles.csv b/docker/brouter/osm_edit/srtm3/srtm_tiles.csv deleted file mode 100644 index 29c621e..0000000 --- a/docker/brouter/osm_edit/srtm3/srtm_tiles.csv +++ /dev/null @@ -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