And you are listening To Los Angeles
2.0 KiB
Importing a new city into A/B Street
This process isn't easy yet. Please email dabreegster@gmail.com or file a Github issue if you hit problems. I'd really appreciate help and PRs to improve this.
Quick start
TODO. Ideally, you just run the importer with a local .osm file and an optional clipping polygon. No code changes.
Including the city by default
-
Make sure you can run
import.sh
-- see the instructions. You'll need Rust, osmconvert, gdal, etc. -
Use http://geojson.io/ to draw a polygon around the region you want to simulate.
-
Create a new directory:
mkdir -p data/input/your_city/polygons
-
Create a polygon filter file in that directory using the coordinates from geojson.io. It's easiest to start with an existing file from another directory; I recommend
data/input/austin/polygons/downtown_atx.poly
as a guide. -
Create a new module in
importer/src/
for your city, copyingimporter/src/austin.rs
as a guide. Edit that file in the obvious way. The main thing you'll need is a .osm or .osm.pbf file to download that contains your city. The clipping polygon will be applied to that. -
Update
importer/src/main.rs
to reference your new module, followingaustin
as an example. -
Run it:
./import.sh --city=your_city --raw --map
-
Update
.gitignore
, followingaustin
as an example.
Send a PR with your changes! I'll update the giant .zip files so most people don't have to build everything from scratch.
Next steps
OpenStreetMap isn't the only data source we need. If you look at the import pipeline for Seattle, you'll see many more sources for parking, GTFS bus schedules, person/trip demand data for scenarios, etc. Most of these aren't standard between cities. If you want to make your city more realistic, we'll have to import more data. Get in touch.