Closed dabreegster closed 2 years ago
I guess when a speed is ridiculous we just add an "unsupported", and pretend the tag wasn't there.
I can't even get the test to reproduce this crash: https://github.com/a-b-street/osm2lanes/commit/b5ed9394b73a054f98f2f29535dca34a866d3803
Currently tracing through to figure out exactly when SpeedClass::from
is called and why it's not happening from the test, even though the tags match what I'm feeding in
Ahh, https://github.com/a-b-street/osm2lanes/blob/f651f6b295ff3de6097163f5d3879c33100bcd09/osm2lanes/src/test.rs#L417 was too much magic for me. Even with 'rust: separator: true', the expected output needs to have at least some separator to enable the option. I can repro the original bug now.
This one's interesting, because someone has fixed the upstream data since then. It causes a panic now, so I'll definitely add a test case. https://www.openstreetmap.org/way/102917976 is now fixed, but in my old copy:
/home/dabreegster/.cargo/git/checkouts/osm2lanes-0a9401f46878d04a/df0e7bb/osm2lanes/src/transform/tags_to_lanes/separator/semantic.rs:27:18