added make commands for editing osm

This commit is contained in:
Ben Varick 2025-01-30 17:19:23 -06:00
parent 7ff54d52ea
commit 910dcd1d1a
Signed by: ben
SSH Key Fingerprint: SHA256:jWnpFDAcacYM5aPFpYRqlsamlDyKNpSj3jj+k4ojtUo
2 changed files with 11 additions and 8 deletions

View File

@ -48,6 +48,11 @@ 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/; 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" 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_create_pbfs: osm_edit_refresh_base:
docker run -v ./data/osm/osm_edit:/osm_edit ghcr.io/bvarick/osmium-tool:2.21.0 osmium cat /osm_edit/map.osm -o /osm_edit/map.osm.pbf cd ./data/osm; wget https://download.geofabrik.de/north-america/us/wisconsin-latest.osm.pbf -O ./wisconsin-latest.osm.pbf
docker run -v ./data/osm/osm_edit:/osm_edit ghcr.io/bvarick/osmium-tool:2.21.0 osmium cat /osm_edit/map_edited.osm -o /osm_edit/map_edited.osm.pbf cd ./data/osm/osm_edit/srtm/; wget -i srtm_tiles.csv -P ./
osm_edit_generate_pbf:
docker run -v ./data/osm:/osm ghcr.io/bvarick/osmium-tool:2.21.0 osmium apply-changes /osm/wisconsin-latest.osm.pbf /osm/osm_edit/map_edited.osm -o /osm/osm_edit/wisconsin-latest_edited.osm.pbf --overwrite
osm_edit_generate_brouter:

View File

@ -37,11 +37,9 @@ 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 a multi-step process: This is a multi-step process:
1. Download a chunk of OpenStreetMap data: https://www.openstreetmap.org/export 1. Make edits to OpenStreetMap in [JOSM](https://josm.openstreetmap.de/)
2. Make edits to that file in [JOSM](https://josm.openstreetmap.de/) 2. Save the edited map as `map_edited.osm` in `data/osm/osm_edit/` (File -> Save As)
3. Save the edited file as `map_edited.osm`, save both `map.osm` and `map_edited.osm` in `data/osm/osm_edit/` 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_create_pbfs` will generate two files `map.osm.pbf` and `map_edited.osm.pbf` in `docker/osm_edit/osm-data`
5.
## 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/)