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

Refactor stage 3: segment creation #23

Closed adamfranco closed 8 years ago

adamfranco commented 8 years ago

This is a sub-task of #20, Refactor collecting, preprocessing, and curvature calculation.

Stage 3 - Segment creation

Convert the coords for each of the ways into an ordered list of "segments". Since the ways in a collection will share their first/last points, we don't need two worry about a "segment" between each of the ways in the collection. This new data-structure would drop the coords from items and add segments

adamfranco commented 8 years ago

Hmm... the add_points post-processor is just adding back what we have in coords with the new data structure. No need to drop coords and do more work to add them back.