a-b-street / osm2lanes

A common library and set of test cases for transforming OSM tags to lane specifications
https://a-b-street.github.io/osm2lanes/
Apache License 2.0
33 stars 2 forks source link

Generalize the driving-side crate to return ISO country codes #266

Closed dabreegster closed 1 year ago

dabreegster commented 1 year ago

This adds all countries, the iso2 code, and cleans up the API slightly. As a next step, I'll split into a separate repo and publish to crates.io.

The intention is that we can use this in osm2streets to start defining typical_lane_widths that vary by country code.

github-actions[bot] commented 1 year ago

Benchmark for c11dff4

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | tests/224637155 | 6.2±0.28µs | 6.4±0.51µs | +3.23% | | tests/380103730 Japanese Expressway | 8.8±0.76µs | 8.6±0.62µs | -2.27% | | tests/389654080 | 10.6±0.68µs | 10.1±0.56µs | -4.72% | | tests/49207928 cycleway:BACKWARD=lane | 7.5±0.41µs | 7.6±0.36µs | +1.33% | | tests/8591383 a bidirectional cycleway, oneway:bicycle | 8.4±0.62µs | 8.4±0.47µs | 0.00% | | tests/bus:lanes=designated\| | 7.8±0.42µs | 8.0±0.86µs | +2.56% | | tests/busway=lane | **6.8±0.26µs** | 7.3±0.56µs | **+7.35%** | | tests/cycleway=lane | 7.3±0.36µs | 7.5±0.49µs | +2.74% | | tests/cycleway=opposite oneway=yes oneway:bicycle=no | **6.7±0.34µs** | 7.1±0.44µs | **+5.97%** | | tests/cycleway=opposite_track oneway=yes, deprecated | 8.1±0.49µs | 8.2±0.64µs | +1.23% | | tests/sidewalk:right=yes | 6.2±0.29µs | 6.3±0.30µs | +1.61% | | tests/sidewalk=both | 6.8±0.33µs | 6.8±0.46µs | 0.00% |
dabreegster commented 1 year ago

Going to merge this and carry forward with splitting into a new repo, and using from osm2streets