Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start a small test suite of OSM XML -> RawMap GeoJSON goldenfiles. #8 #15

Merged
merged 1 commit into from
May 21, 2022

Conversation

dabreegster
Copy link
Contributor

See src/lib.rs for a description of what this does. In short, we can clip out a osm.xml file for some tricky area, run it through A/B Street's current code, and save the resulting polygons as geojson. As we iterate on that code, we can see when the output changes, making this a convenient regression test.

I'm starting this code in this repo and not A/B Street to:

  1. avoid making the main abstreet git repo huge with all the OSM and GeoJSON files
  2. nudge towards extracting the osm2streets-bits into proper standalone crates and repos

@BudgieInWA, there are many other ideas you mentioned in the issue -- consider this just a start.

CC @martinfleis, who has some Google summer of code students also working on street network simplification. At the very least, we could share the input test cases that cause problems. There are only 3 included in this PR so far, but I have many more in mind to add.

@dabreegster dabreegster merged commit d59b341 into main May 21, 2022
@dabreegster dabreegster deleted the test_suite branch May 21, 2022 11:39
@dabreegster
Copy link
Contributor Author

You can view the current output with github's viewer, https://github.com/a-b-street/osm2streets/blob/main/tests/src/aurora_sausage_link/output.json

dabreegster added a commit to a-b-street/abstreet that referenced this pull request May 21, 2022
@martinfleis
Copy link

Thanks for CCing me in.

There are only 3 included in this PR so far, but I have many more in mind to add.

Can you keep me in the loop on those as well?

@dabreegster
Copy link
Contributor Author

@martinfleis, sure -- I added more in a few followup commits, all at https://github.com/a-b-street/osm2streets/tree/main/tests/src. If you come across any good examples in OSM, please send them over and we can add them here. When we actually start trying to simplify some of these scenarios, I can CC you on those PRs too

Comment on lines +3 to +5
//! - `input.osm`, from the export tab of https://www.openstreetmap.org
//! - `cfg.json`, defining the `driving_side` and describing the situation
//! - `output.json`, a GeoJSON file showing the resulting road and intersection polygons
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call these test.json (or test.yml), input.osm, rawmap.geojson? I want to add tests of different kinds that sit along side the RawMap GeoJSON ones, so lets name each output what it is.

I might go for roads.dot (then corridors.dot)...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! So cfg.json -> test.json and output.json -> raw_map.geojson I think? I can work on that as well as adding docs how to use this sometime this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants