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

Skip intersection corners (stop-signs, traffic lights, etc) #52

Closed adamfranco closed 3 years ago

adamfranco commented 7 years ago

Stops aren't fun, so intersections should be skipped in calculating curvature.

One mechanism to filter these is to look for adjoining nodes with highway=stop or highway=traffic_signals and ignore the curvature of the intersection.

Another technique that may work when highway=stop/traffic_signals nodes aren't provided is to calculate the angle between any triplet of nodes and exclude any angles tighter than some threshold -- e.g. ~90-degree and tighter corners made up of 3 nodes (not smoothed into a curve) are probably intersections.

adamfranco commented 3 years ago

Pau, France prior to roundabout change: Curvature_-_Pau-2020-10-14-with-roundabouts Same view without roundabouts ways squashed to 0 curvature: Curvature_-_Pau-2020-10-14-without-roundabouts

adamfranco commented 3 years ago

Phoenix Before: Curvature_-_Phoenix

After: Curvature_-_Phoenix after - B