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

Handle sidewalk=separate and none. Closes #249 #257

Closed dabreegster closed 1 year ago

dabreegster commented 1 year ago

This PR handles sidewalk=separate by silently ignoring it and not adding a sidewalk, because it's not the job of osm2lanes to figure out parallel ways. And it handles sidewalk=none by treating it the same as no and adding a deprecated warning.

github-actions[bot] commented 1 year ago

Benchmark for f34bbc8

Click to view benchmark | Test | Base | PR | % | |------|--------------|------------------|---| | tests/224637155 | 5.5±0.01µs | 5.5±0.01µs | 0.00% | | tests/380103730 Japanese Expressway | **7.2±0.06µs** | 7.3±0.02µs | **+1.39%** | | tests/389654080 | **8.9±0.01µs** | 9.0±0.03µs | **+1.12%** | | tests/49207928 cycleway:BACKWARD=lane | 6.6±0.01µs | 6.6±0.01µs | 0.00% | | tests/8591383 a bidirectional cycleway, oneway:bicycle | 7.4±0.01µs | 7.4±0.01µs | 0.00% | | tests/bus:lanes=designated\| | **6.8±0.02µs** | 6.9±0.00µs | **+1.47%** | | tests/busway=lane | 6.2±0.01µs | 6.2±0.01µs | 0.00% | | tests/cycleway=lane | 6.4±0.02µs | **6.3±0.01µs** | **-1.56%** | | tests/cycleway=opposite oneway=yes oneway:bicycle=no | 6.0±0.02µs | 6.0±0.01µs | 0.00% | | tests/cycleway=opposite_track oneway=yes, deprecated | 7.0±0.01µs | 7.0±0.01µs | 0.00% | | tests/sidewalk:right=yes | 5.6±0.00µs | 5.6±0.04µs | 0.00% | | tests/sidewalk=both | 5.8±0.01µs | 5.8±0.01µs | 0.00% |