Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Dutch highway shields more recognizable (spacing, font?) #1148

Open
louwers opened this issue Aug 12, 2024 · 12 comments
Open

Make Dutch highway shields more recognizable (spacing, font?) #1148

louwers opened this issue Aug 12, 2024 · 12 comments
Labels
internationalization mapping Changes needed to OpenStreetMap shields

Comments

@louwers
Copy link

louwers commented Aug 12, 2024

image

image

See also e.g. Wikipedia https://en.wikipedia.org/wiki/A10_motorway_(Netherlands)

In France they also put a space and it is showing up correctly.

@claysmalley claysmalley added mapping Changes needed to OpenStreetMap internationalization shields labels Aug 12, 2024
@claysmalley
Copy link
Member

The Americana renderer takes no stance on matters of local formatting and punctuation—the ref=* value is displayed verbatim, as it is tagged in the OSM database. So the Dutch OSM community would need to agree to retagging all the relations.

cc @Blijbol

@louwers
Copy link
Author

louwers commented Aug 12, 2024

@claysmalley Well, the official names are without a space, and when referring to highways in text we also don't use a space. So there is no chance this would garner any support from the Dutch OSM community.

However if your cartographic goal is to have accurate representations of highway shields (which I think is the case1), you should use a space.

I think France's spaces in highways might be a case of https://wiki.openstreetmap.org/wiki/Tagging_for_the_renderer

Footnotes

  1. "Highway routes are identified by shields that resemble the signs on the road, with special support for roads that carry multiple routes concurrently."

@claysmalley
Copy link
Member

However if your cartographic goal is to have accurate representations of highway shields (which I think is the case), you should use a space.

Our goal with shields is not necessarily to have a perfect copy of what's on the ground, but to stylize and simplify a little so that they look good on a digital map, and provide a data-driven renderer that displays shields for route=road relations, however the local community has tagged them. It's up to the local community to adopt a tagging scheme that matches shields, or not.

Near where I live, there is a highway called Interstate 540, or I-540 for short. The relation for I-540 is tagged ref=540, because that is the text present on signage, and we've chosen as a community to match ref=* to the text on signs. The "official name" isn't in the relation at all.

@ZeLonewolf
Copy link
Member

Based on the initial photograph of the overhead signage (not the vector graphic below it), I am not seeing a space between the letter and number, or if there is a space, it is very very tiny. If you compare the A50 in the photograph to the A59 in the vector graphic, the space between "A" and "59" is much larger than the space between the "A" and the "50". Just eyeballing things, I think the vector graphic is putting a bigger space in than the signs say in reality.

All this to say -- I am not convinced there should even be a space between the letter and number based on what I'm seeing here.

@louwers
Copy link
Author

louwers commented Aug 12, 2024

972868

image

@ZeLonewolf Right. I don't think it is a space. I sent an inquiry to Rijkswaterstaat and asked for clarification.

@ZeLonewolf
Copy link
Member

ZeLonewolf commented Aug 12, 2024

I would also point out our style contributor's guide, which has this to say about shield design:

In general, this style is not trying to exactly replicate highway shields as seen on signage. Instead, we are trying to extract the key stylistic elements so that the graphics are recognizable as simplifications of their real-world counterparts.

Some number of years ago, @kennykb developed a map with photo-realistic highway shields with extraordinary attention to detail. Unfortunately, images of this map seem to be lost to time.

His map even went to the level of detail of rendering shields where suffix letters were drawn in a smaller font than the main route number, as shown in the "5A" and "5B" examples here:

image

We have not, so far in this project, attempted to micro-style these differences, as shown in our on-map rendering of New York state route 5A:

image

The only exception I can think of where we have consensus for micro-styling of text in this project is #366, which proposes to handle cases where shields have two rows of text by rendering the / character which appears in the ref tag as a line break. However, in those cases, the contents of the ref tag alone provide the information needed for the renderer to produce the line break behavior in a general way.

I would consider this described issue to be closer in nature to the New York case, which is one example of a class of text renderings that have minor stylistic adjustments on the real-world signs that we wouldn't produce a distinction for on the real-world map, if indeed there is a "less than a space" gap between characters.

There are other route networks where the space is explicit, both on signage and in the map:

image

If we find that in the Dutch case, spaces are being introduced in signage, this suggests that spaces should be inserted in the tagging as well. In the more recent photographs, it appears that the Dutch routes are following the text layout of European E-routes, which do place the space in the ref tag.

In summary, I agree with @claysmalley's assessment that this is a tagging issue to be sorted out with the Dutch mapping community rather than a styling requirement that the renderer should address.

@kennykb
Copy link

kennykb commented Aug 12, 2024 via email

@Blijbol
Copy link
Contributor

Blijbol commented Aug 12, 2024

According to the Nationale routenummering (Rijkswaterstaat, 1982), the correct way to write the numbers is without space (page 5):

Het verdient dan ook aanbeveling te spreken of te schrijven over bijvoorbeeld de A12, de N264, de s105 en eventueel over de E35.

The refs in the Netherlands are tagged as such (except s-roads nowadays use uppercase S, which was an actual change at some point in time).

However, for readability there has always been slight spacing on road signs, as you can see in figures 2.1 through 2.4 of the same document. The exact amount of spacing varies depending on when the road sign was designed and by whom (there have long been major differences between Rijkswaterstaat and ANWB). However, the spacing is always less than a full character and can't be considered a proper space character. Meanwhile milestone signs show no spacing at all.

So this is basically a stylistic choice for the renderer, not a tagging problem. Even though Americana has no policy of exactly replicating road signs, it might be interesting for Americana to consider modifying spacing for better international consistency, e.g. by inserting/modifying spaces in ref values via network-dependent regular expressions. This way you can also work with special Unicode space characters of various widths.

@louwers
Copy link
Author

louwers commented Aug 12, 2024

From my subjective experience, having been exposed to these shields all my life, I cannot say that I find the Dutch highway shields in Americana particularly recognizable.

If we find that in the Dutch case, spaces are being introduced in signage, this suggests that spaces should be inserted in the tagging as well.

Disagreed. The official references of these highways are without a space. Adding a space would be a case of Tagging for the Renderer.

@louwers louwers changed the title There should be a space between the letter and the number on Dutch highway shields Make Dutch highway shields more recognizable (spacing, font?) Aug 12, 2024
@ZeLonewolf
Copy link
Member

From my subjective experience, having been exposed to these shields all my life, I cannot say that I find the Dutch highway shields in Americana particularly recognizable.

These are not recognizable?
imageimage

@1ec5
Copy link
Member

1ec5 commented Aug 12, 2024

This came up previously in #141 (comment).

In general, this style’s artistic direction pays homage to a particular tradition from print cartography. One element of that is to apply a consistent typeface and color palette to every shield from every country, even if that sometimes requires a slight reinterpretation of the design. So it’s a question of whether we can “get away with” a departure of this magnitude.

There seems to be some precedent for more or less the current treatment, which is not to say that we must uncritically follow this particular example:

An inset map of Amsterdam with examples of A, E, and N roads as red, green, and yellow rectangles, respectively. The shield text is set in the medium weight of a geometric typeface resembling Futura, and there is no space between the alphabetic prefix and the digits.

France & Benelux Countries (American ed.). 1:500,000. Cartography by Freytag & Berndt. American Automobile Association. 2009. Amsterdam inset.

This is far from the only situation where we’ve taken liberties with route shields. For one thing, we made a decision early on not to hew too closely to reassurance markers for state and provincial routes in North America, because they tended to be too busy for the purpose of marking a route on an already busy map. Rightly or wrongly, this informed many of the initial simplifications we made as we expanded coverage around the world.

Sign Icon Description
A-5 A-5 Québec Autoroute 5
249 249 MCTRA 249 Tollway
国家高速 G1512 甬金高速 G1512 G1512 Ningbo–Jinhua Expressway

From a technical perspective, we want to gradually reduce the amount of custom string processing that the shield library does, not increase it, to improve the style’s portability in different environments, such as mobile platforms. One possible approach would be to port the custom JavaScript to MapLibre style expressions, but unfortunately the expression language lacks anything in the way of string processing operators. Don’t get me started on what it took just to be able to find and replace semicolons in #666 #670, let alone something that would seemingly require a regular expression. If anyone here is able to push through stuff like maplibre/maplibre-gl-js#2064 maplibre/maplibre-gl-js#2059, it would give us a lot more confidence about that direction.

Instead, we’ve taken a different route, trying to make the shields more data-driven, for example working with OpenMapTiles to expose ref:colour=* tags so that we no longer need to hard-code a lookup table of colors for certain color-coded route networks: #654 (comment). That will hopefully give mappers more agency over the presentation of shields based on their local knowledge. We’ve envisioned ref=* working more or less the same way. It mostly works, but now that you’ve pointed out the typographical issue, I won’t be able to unsee it. 😅

To the extent that our current departures from the physical signs present difficulties in comprehension, hopefully the legend helps a bit as a workaround for now.

Route markers: International E-road network, Motorway, Non-motorway, NL:S:Amsterdam, NL:ring Route markers: Europese weg, Autosnelweg, Niet-autosnelweg, NL:S:Amsterdam, NL:ring

And of course, just because OSM Americana prioritizes typographic consistency over pixel-perfect shield rendering, that doesn’t mean that it’s the One True Way™. There are several active forks of Americana that apply their own artistic direction. Try making a fork and maybe we’ll be really jealous of what you come up with and want to copy you. 😉

@1ec5
Copy link
Member

1ec5 commented Aug 16, 2024

This way you can also work with special Unicode space characters of various widths.

One possible approach would be to port the custom JavaScript to MapLibre style expressions, but unfortunately the expression language lacks anything in the way of string processing operators.

Looking into this some more, the existing string expression operators are inconsistently implemented so that they’ll misbehave if we pass a non-ASCII space into them: maplibre/maplibre-style-spec#778 maplibre/maplibre-native#2730.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internationalization mapping Changes needed to OpenStreetMap shields
Projects
Development

No branches or pull requests

6 participants