Allow some kinds of non-numeric shield_text#1452
Conversation
This normalises the formatting of road `ref`s which consist of a single letter, optional space and then a number. These are often displayed with the letter as part of the signage. Also back-fill network values where they can be inferred from the operator.
| # that extra refs are available for road networks. | ||
| if network is None: | ||
| operator = props.get('operator') | ||
| backfill_network = _NETWORK_OPERATORS.get(operator) |
There was a problem hiding this comment.
This may need to get slightly more sophisticated so account for multiple road shield types per country also based on the A, N, M, & etc shield text prefixes &/or the road class?
There was a problem hiding this comment.
I think this needs to get a lot more sophisticated!
The addition of the operator-based fall-back was only because the M1 section that #1062 mentioned had a ref but no network on the way, and was only part of the E13 relation (which has both ref and network). The current logic is built around tuples of (route_type, network, ref), so the simplest approach was to guess a network based on the information available on the way.
This is a kludge, but it's an improvement over what went before.
Once we have #135, then we should change the logic so that we're additionally able to match on the country and road class. For example, a road in the UK with highway=motorway would be generally expected to have a ref starting with M (apart from the ones which don't, which have been left scattered around like rakes in long grass by the trickster spirits to frustrate us), and could be assigned a network more accurately, where one wasn't otherwise specified.
|
Besides my comment in https://github.com/tilezen/vector-datasource/pull/1452/files#r155352236, I think this is good to go. But I think that's already covered in #1389. So LGTM. |
This normalises the formatting of road
refs which consist of a single letter, optional space and then a number. These are often displayed with the letter as part of the signage.Connects to #1062.