adamfranco / curvature

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

Fall back to highway_authority_ref, official_ref, admin_ref, etc if ref=* isn't available #65

Closed adamfranco closed 3 years ago

adamfranco commented 3 years ago

According to Pink Duck, UK mappers don't like using ref=* on county roads as this reference number is generally not signposted. See https://wiki.openstreetmap.org/wiki/Key:official_ref . Other locations seem to use other keys with admin_ref=* appears to be more common in Iceland, Finland, and Australia.

See TagInfo:

If ref=* is available on a way, use that as the joining key. If it isn't, then pull the joining key from one of these other reference field if available. If no refs are available, use the name= for joining.

adamfranco commented 3 years ago

I have a fix in place and am now reprocessing the data for Great Britain to test. This will be accounted for elsewhere during rolling data updates over the next month or so.

adamfranco commented 3 years ago

After reprocessing Great Britain I now see the segments of the county road that sparked this joined together as one segment: Screen Shot 2021-03-25 at 8 41 25 PM I did notice that the shared reference key wasn't ending up in the name though since it isn't in the ref tag. b1c3d8e puts it in the shared name for clarity, but only if there are actual ref tags used -- we wouldn't want these refs polluting the output unless they are the shared key.