osm-americana / openstreetmap-americana

A quintessentially American map style
https://americanamap.org
Creative Commons Zero v1.0 Universal
183 stars 60 forks source link

Shields in UK #106

Closed SK53 closed 1 year ago

SK53 commented 2 years ago

I'm not sure that UK roads truly have shields, but the basic minimum for a reasonably accurate representation is:

A reasonable selection of examples on the Sabre wiki.

Note this issue is raised for information, rather than with any expectation that it might be implemented. The only thing which I think is important is the suppression of shields for E-routes, as showing them may affect users' expectations.

ZeLonewolf commented 2 years ago

Regarding:

European routes (E-*): these are not signed in the UK and shields are no use for motorists. I'm not sure if the relevant relations are tagged unsigned=yes, and anyway unsigned is probably not supported in OMT

We have both ref and unsigned_ref (rather than the barely used unsigned=yes) to indicate whether or not a numbered route is signed. This is how we deal with the situation in the US, where we have both signed and unsigned routes. This style suppresses shields whenever a ref is not present, unless the route is of the type that doesn't have a ref but still has a shield (there are a number of these special cases in the US).

The E route relations that run through the UK are tagged with ref and therefore this style displays them as signed. The EU/UK community should consider this an opportunity to improve the tagging such that unsigned portions of E-road routes are members of relations tagged with unsigned_ref. If this is able to change in the tagging, the E-road shields will disappear from the map on the next update of the underlying vector tiles.

For awareness, the shields displayed by this style are generated solely through route relations and ignore ref tagging on ways entirely. We have been slowly building out shields for mainland Europe as they are displayed on signage and I would consider it in scope to do the same for the UK.

Tasks:

ZeLonewolf commented 2 years ago

What would be helpful to moving forward on the UK-specific signs is some kind of indications of what color schemes are used for different routes and how they are tagged:

image

SK53 commented 2 years ago

@ZeLonewolf thanks for the detailed comments. I certainly think we can check some of the unsigned tagging (e.g., one E-route is tagged ref:unsigned=yes).

One note: in the UK highway refs will almost always be on the way and not on a relation, although often described as such (for instance on Sabre), duplexes do not exist in the UK. A few route relations have been added, but this is entirely unnecessary for the UK (& I probably Ireland), but at present some refs from ways are shown.

zekefarwell commented 2 years ago

in the UK highway refs will almost always be on the way and not on a relation

This style uses route relations for highway shields. No ref on route relation = no shield. The only exceptions to this are for special cases like the New York Thruway where a route legitimately has no number or code on it's shield.

1ec5 commented 2 years ago

What would be helpful to moving forward on the UK-specific signs is some kind of indications of what color schemes are used for different routes and how they are tagged:

This chapter of the Traffic Signs Manual explains the color-coding system on UK directional signs. If I’m interpreting this document correctly, the background and patch colors seen in https://github.com/ZeLonewolf/openstreetmap-americana/issues/106#issuecomment-1023276656 indicate road classifications but aren’t integral parts of a route marker as in other countries:

openstreetmap-carto draws way refs as capsules that match the color of the associated roadway. If my interpretation above is correct, that treatment makes sense in the UK, because the background color is part of the identity of the roadway rather than of any route it carries. Before gravitystorm/openstreetmap-carto#1736, osm-carto’s road colors even used to match the background colors on UK signs. This color-coding system is a very different way of doing things than in MUTCD countries or the various European countries this renderer currently supports. (That said, it did used to be common for American halftone maps to recolor the shield to match the road line color.)

Mashin6 commented 2 years ago

I used one rogue relation to make this image

SK53 commented 2 years ago
* The indication for the A505 to Letchworth has a white background because it follows a non-primary road ([classified as `secondary` in OSM](https://www.openstreetmap.org/way/262396323)).

No, the OSM standard is A-roads are either 'trunk' (i.e., with yellow on green signage) or 'primary'. So official "non-primary A-roads" are still highway=primary in OSM. Only B-roads receive a highway=secondary tag.

Unfortunately official terminology has changed over the years so that whereas there were many trunk roads in the past (on old maps they were denoted by "(T)" after the A###, with remaining A-roads being primary. Now the old trunk network is called primary with new trunks being a small subset of roads which are maintained by a national agency. However, current national classification is not relevant to OSM tagging: which is based more on things easily observed on the ground (signage colour & ref). (Not that this prevents someone deciding now and then that we should be mapping the latest set of official documents).

If you look at OSGB Landranger mapping they colour code roads in a similar way to OSM (example of area of Somerset above on Cucaera's site). This would have been the original target of Blackadder's first iteration of "map features".

ZeLonewolf commented 2 years ago

Unfortunately official terminology has changed over the years so that whereas there were many trunk roads in the past (on old maps they were denoted by "(T)" after the A###, with remaining A-roads being primary. Now the old trunk network is called primary with new trunks being a small subset of roads which are maintained by a national agency. However, current national classification is not relevant to OSM tagging: which is based more on things easily observed on the ground

Uh... my head is spinning here 🤪

Ultimately what we need is a mapping between network value and sign appearance.

ZeLonewolf commented 1 year ago

I suspect that it does not make sense to attempt to render shields in the UK based on how the roads are named and signed. I would consider the various A, B, C, etc routes to really be road names in the same way that "5th Avenue" would be in North America. I would consider the fact that unwanted E-route shields are currently rendered to be a tagging error. Also, there does not seem to be strong consistency of sign coloring along a route, but rather indicate road classifications, which are a related but separate concept. Additionally, it does not appear that there is any appetite in the UK for the mapping of route relations, especially since routes are not a concept in the same way in the UK as they are in North America.

I would be open to rendering the blue Vienna Convention motorway symbology as so nicely demonstrated by @Mashin6, should the motorways become mapped in route relations.

For these reasons, I propose that this ticket be closed as wontfix.

trigpoint commented 1 year ago

A road relations in the rarely be able to be tagged with a highway classification as it is common for different parts to be different classifications.

Picking a local example https://www.openstreetmap.org/relation/13054406 The A5 is mostly trunk, however the section between Gailey and Telford is now primary, the trunk route being taken by the parallel M54.

ZeLonewolf commented 1 year ago

Gaps in a route relation are no problem for the renderer, from a technical standpoint.

This example I think is the first time I've been aware of an A road route relation in the UK.

Would it be correct for such a route to be rendered with a shield like this? image

Or does that coloring change in places based on other factors?

Would the GB community be open to adding a network value to route relations like that one? I would suggest GB:A.

ZeLonewolf commented 1 year ago

Also of note, Google Maps does not render shields in the UK except for motorways:

image

ZeLonewolf commented 1 year ago

Different colorings for the same route on an overhead gantry:

image

trigpoint commented 1 year ago

It changes depending on the highway classification. That sign is correct for the highway=trunk sections however the highway=primary sections has white signs with black lettering.

There are two types of A road.

trigpoint commented 1 year ago

Different colorings for the same route on an overhead gantry:

image

That is the end of an A5 section, there is then a gap indicated by parenthesis as the directions to. In this case different routes for different classifications of traffic to follow to rejoin.

Learners, bicycles, agricultural vehicles, tracked vehicles are prohibited on motorways.

Where the A5 begins again there are white signs. image

ZeLonewolf commented 1 year ago

Thanks. I too was hunting for those examples :) image

I took a look at the data and it does seem like we have something encoded that would work for this: image

It appears that OpenMapTiles may need an update to fix its network encoding to allow highway classification to override its pseudo-network generation.

trigpoint commented 1 year ago

That could work.

Although road route relations are not especially common in the UK. I would expect them to be on the first 99, rather than on 3 or 4 digit A roads or B roads

ZeLonewolf commented 1 year ago

The code for this feature is implemented as of #696, however, results will not be visible in the map until the next version of OpenMapTiles and planetiler is released.