adamfranco / curvature

Find roads that are the most curvy or twisty based on Open Street Map (OSM) data.
http://roadcurvature.com/
223 stars 37 forks source link

Incorporate "smoothness" tag #63

Closed markongh closed 3 years ago

markongh commented 3 years ago

Is your feature request related to a problem? Please describe. Incorporate the "smoothness" tag into the curvature scoring and analysis. Roads (especially in some parts of Italy) can be surface=asphalt or surface=paved, but in reality are very poor quality and a rider would be frustrated by constantly dodging potholes or very rough surfaces.

Describe the solution you'd like As for the curvature score, the smoothness tag could be used as a multiplicative factor. For display purposes, roads could be displayed as solid lines for smoothness=[excellent, good, intermediate], long dashed lines (- - - - ) for smoothness=bad, and short dotted line (. . . . . )for smoothness=[very_bad, horrible, very_horrible, impassible]. While smoothness is not a tag that seems to be used often, if the road is missing the tag the default should assume a good score and a solid line.

Describe alternatives you've considered n/a

Additional context As I said, currently the smoothness tag does not seem to be used much (only about 1% of roads), however, implementing it in RoadCurvature could encourage its use among your users. As riders discover poor quality roads, they could update the tag in OSM which would in turn improve the quality of your output.

adamfranco commented 3 years ago

Thanks for submitting this idea. One technical challenge to implementing this enhancement is that the database that drives the Curvature map doesn't contain the geometry of the original OSM ways as separate lines, but rather combines them together into a single long line that spans changes in speed-limit and other attributes. Separating out segments into their own representations would take quite a bit of refactoring. That said, it would be relatively easy to add smoothness as an attribute in the table of constituent ways that make up a "road":

Screen Shot 2021-01-31 at 3 27 17 PM

Unfortunately I don't think this is one I'll be able to implement easily, but I'll keep it in mind -- it would go along well similar weighting/display changes based on speed-limit.

markongh commented 3 years ago

Ah, yes, I think I understand. And you wouldn't want to potentially make an entire line a dashed or dotted line because of one small section rated as "horrible" even though the rest is excellent. If adding it to the table would be easy, I think that would be perfectly acceptable because a user could still quickly and easily scan the route in the table to look for any bad sections of road. That could even give a rider a heads-up before hand of specific sections be be cautious around.

adamfranco commented 3 years ago

I've added "smoothness" and "maxspeed" to the tags being tracked in the Curvature database. These can be seen when clicking on the details for a road segment as shown in this screen-shot.

Screen Shot 2021-03-17 at 10 53 15 PM

This data will get loaded over the course of the next month during normal rolling data-updates. Until then, the values for these attributes will be empty instead of "unknown". Currently Vermont, Netherlands, and Norway have this data loaded with a few more eastern US states that I'm most familiar with queued up for more immediate testing.