Urban-Analytics-Technology-Platform / od2net

https://od2net.org
Apache License 2.0
27 stars 6 forks source link

Explore/implement other LTS definitions #7

Open Robinlovelace opened 1 year ago

Robinlovelace commented 1 year ago

It's down as LTS 4 in the tool but is 20 mph living street.

Is the .ts code expecting speed in units of kph?

https://www.openstreetmap.org/way/31958493#map=19/53.80025/-1.55256

Robinlovelace commented 1 year ago

Here's how it looks after following instructions in #6

image

Robinlovelace commented 1 year ago

Not sure how up-to-date it is but here's the streetview:

image

Robinlovelace commented 1 year ago

https://www.google.co.uk/maps/@53.8002532,-1.5525103,3a,75y,337.43h,71.04t/data=!3m7!1e1!3m5!1s4eYgU4Ly9PCNuGpdovzkEQ!2e0!6shttps:%2F%2Fstreetviewpixels-pa.googleapis.com%2Fv1%2Fthumbnail%3Fpanoid%3D4eYgU4Ly9PCNuGpdovzkEQ%26cb_client%3Dmaps_sv.tactile.gps%26w%3D203%26h%3D100%26yaw%3D175.83148%26pitch%3D0%26thumbfov%3D100!7i16384!8i8192?entry=ttu

dabreegster commented 1 year ago

If you hover on the segment, it explains the LTS rationale. Indeed looks like a few bugs happening here. The LTS code is lifted straight from BikeOttawa, because I wanted to get something started quickly. I'll use this issue to at least understand + clean it up. But ultimately, we need to settle on the LTS definition we want to use ATE-wide, then map OSM to it. Screenshot from 2023-08-07 16-27-39

Robinlovelace commented 1 year ago

Thanks for sharing the screenshot Dustin, I did see that hence wondering if it was caused by the LTS-generating code not handling mph units but couldn't get a quick screenshot. I think the 'mixed traffic' bit in the description is fair, the maxspeed is the only bug I can see, what others are there?

:+1: to settle on an LTS definition. Having looked at the one used internally in the R5 routing engine and the .ts code underlying the BikeOttowa one used here, I sense that the BikeOttowa one is a good starting point with more rules, but not sure as it was a while since looked at the R5 definition.

Robinlovelace commented 1 year ago

The R5 one, ~300 lines of Java code for reference: https://github.com/conveyal/r5/blob/master/src/main/java/com/conveyal/r5/labeling/LevelOfTrafficStressLabeler.java

This one seems a bit more detailed: https://github.com/BikeOttawa/stressmodel/blob/master/stressmodel.js

Wondering if there are more out there or if we should start with stressmodel.js, seems like a reasonable starting point and shouldn't be too hard to modify for mph and other tbd changes to measure of LTS or other definition of walk/cyclability.

dabreegster commented 1 year ago

We could detangle the step of inferring missing values like speed limit from the LTS assignment itself. I do like how the BikeOttawa code adds messages to justify its work.

Other links, from old A/B Street issues:

It could be a data science project in and of itself to compare definitions. Should be pretty straightforward to get a few definitions into the tool, and let you swap them out and immediately see color changes. Could also churn through and find all roads with a different categorization from different methods.

For the safe route to school project in the short term, is there one definition (not referring to OSM tags) that we want to use? Then we can map OSM to it.

Robinlovelace commented 1 year ago

For the safe route to school project in the short term, is there one definition (not referring to OSM tags) that we want to use?

There are multiple options. My thinking was to use: Cycle Skills Network Audit (CSNA), related to the 3 bikeability levels.

The CSNA assesses the suitability of the network in terms of the three levels in the UK National Standard for Cycle Training (Bikeability):

Level 1 Beginner Level 2 Introduction to Riding on the Road Level 3 Advanced

It turns out there are actually 7 levels in the original incarnation by Ken Spence who I met and who is interested in collaborating on this stuff:

Potential Level 1 Key motor traffic-free links not currently available to cyclists (due to legal / physical restrictions)

Level 1 Motor traffic-free cycle routes, plus streets with extremely low levels of calmed traffic (e.g. Home Zones) suitable for all cyclists

Level 2 Roads / cycle tracks suitable for cyclists at Bikeability Level 2

Level 2 Off-peak Some roads are quiet and safe for cyclists at Level 2 at off-peak times only. These are classified Level 3 at peak times and Level 2 at others.

Level 2.5 Roads / cycle tracks suitable for cyclists at Bikeability Level 2, except for turning manoeuvres across traffic

Level 3 Roads / cycle tracks suitable only for cyclists at Bikeability Level 3

Level 3.5 Roads where the level of risk is so high it is a barrier to even the most experienced cyclists

Source: https://aetransport.org/past-etc-papers/conference-papers-pre-2012/conference-papers-2009?abstractId=3080&state=b

Deep dive with maps that we can contact the creators for the raw data to compare with our estimates to iterate: https://www.lambeth.gov.uk/sites/default/files/co-lambeth-cycle-network-review.pdf

dabreegster commented 7 months ago

https://github.com/plus-mobilitylab/netapy another reference

dabreegster commented 7 months ago

https://australiancyclewaystats.jakecoppinger.com/ has another categorization