-
Notifications
You must be signed in to change notification settings - Fork 819
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
Add pictorial route shields #508
Comments
Thank you for this well-documented request. How do paper maps handle this? I suppose US paper maps show the shields? I can't remember ever having seen shields rendered on map in continental Europe. What about the UK? |
Yes, paper maps in the U.S. always show shields, though they are generally greatly simplified due to constraints on resolution and the number of colors available. For example, most maps omit the word “Interstate” at the top of Interstate shields. The National Park Service’s maps render all shields in black and white. To save space at low “zoom levels”, whenever multiple routes of the same network are concurrent, route numbers are often squeezed onto one shield (see I-80/I-90 at A-2, US 52/62/68 at E-14, and SR 6/SR 24 at D-3 on the State of Ohio’s official highway map). That would be difficult with the shield renderer’s approach, and I don’t think it’s strictly necessary. Some maps alter shields to match the color of the way. But I think that treatment would just add unnecessary complexity to OSM. |
Is this something we want? |
I assume you were soliciting others’ feedback, but since no one has responded, I urge everyone to take a look through literally every map of North America produced in North America, both printed and online. OSM is an outlier. At the very least, national and state routes are always given appropriate shields. Many maps use a generic state route shield throughout the U.S., to simplify things. But we might as well do better, since we’d already have to respect route relations to get to that level of support. If symbolic shields aren’t desired in Europe, that would just be a matter of omitting specialized shields for European route networks. Resolving this issue would require multiple steps and would certainly be a long-term effort. Here’s one approach:
GroupSymbolizer is only supported in the in-development Mapnik 3.0. In the meantime, it may be possible to rig something based on the The Shield Renderer prerenders a shield for each individual route, based on per-route configuration fields, but it seems like we could avoid such a high-maintenance approach:
|
From examples it seems that it is not really fitting the style, it is simply quite ugly. Note that I am not accustomed to something like this (not from USA). Also in the example renderer shields dominate everything else. |
The example images above are from the Shield Renderer, which intentionally hews as closely as possible to the actual signage (fonts and all). It’d be trivial to adjust the templates to better fit the map style while still differentiating between the different route networks. For example, Stamen’s Terrain style tones down the colors a bit and swaps in the map’s overall label font. Also, I picked examples with a variety of shields or with concurrencies, to illustrate the current style’s limitations. (The current style is simply incapable of displaying all the information necessary to navigate the U.S.’s major highways.) But in practice, shields are much less distracting in the vast majority of the map. This issue is not so much about the shield style but rather the infrastructure needed to render graphical shields at all. |
I think |
A. We’re at least a decade behind every major online mapping service. There’s already a functioning prototype. The U.S. community really wants this issue fixed. B. This is no floodgate. Any other country-specific rendering should be a separate issue and a separate decision. Especially in the U.S., a route shield is not just decoration; it is a part of the road’s identity, as important as the route number itself. And because the current style can only accommodate eight-character Route shields are familiar to visitors from the affected countries, much more than the current badges. Which of these is more likely to confuse/mislead an OSM user: when the road is only ever identified by signs like these (and never as “KS 10”): |
I am thinking about the floodgates of different styling for different features in different countries/areas. As everyone will want their own style feature for their town. That changes the complexities of the 'simple' carto css style to something very different for the project. How many symbols are for the US?! Dozens? hundreds? Are you proposing having symbols for different states and even counties within states in the US? Have you found them all or will be getting requests every hour for another tiny area that has their own symbol? I admit I know nothing about this way of displaying/organising these routes in the US. But I am genuinely curious how do you say in words the last example. There are 2 issues here how to display routes in relations for large road networks and how/if to use all these shields to be more visually appealing. All that said I am not completely against it I am struggling to understand it clearly. I am curious to know regulars on this list that are US based (@pnorman are you US based?) thoughts on this. |
Well Canada is close enough :) |
Yeah looking at online maps most displays these to some level for US/canada. What are you thoughts on the need for implementing shields in general? High priority/low priority? And apart from need for it technically/aesthetically there are a few issues we will need to look at. What level of shield granularity we go down to, how often/size (the sample render has them way to big on some zooms IMHO), how the code would look in the carto style - I think it will change a lot, overhead, etc |
Rovastar wrote:
I think of this as a request to have specialized shield backgrounds for different values of the
I think we have the opportunity to keep things somewhat simple in the stylesheets themselves, by tweaking Carto to support GroupSymbolizer and Mapnik to support
In truth, there may be thousands of symbols in the U.S. There are at least a hundred specific to the state of Ohio alone, and indeed we can find more if we look hard enough. However, we don’t have to support them all, at least not for the foreseeable future. Rather, we should first focus on parity with other online maps, which generally display the following shields in the U.S.:
It’s a sunflower. :-) Locals call this particular route “K-10”, but IIRC the name doesn’t appear on signage. In other states, such routes may be called “state route …”, “state trunkline …”, or simply “highway …”. It’s a royal mess, which is why we should aim to have the map reflect surveyable ground truth rather than make users guess. Each state has a different design for state routes, but enough maps use a plain white oval that we could do the same without confusing U.S. users. (Only a few online mapping services, such as MapQuest, currently recognize each state’s design.) If we’re worried about visitors from Europe getting confused by North American shields, we could list the most common shields in the map key when viewing North America. Heh, if we don’t go forward with this proposal, I might request adding the reverse to the map key instead:
The U.S. uses graphical route shields for compactness. As it is, the existing rendering box can’t even fit the raw
Also: @rweait @asciiphil @RussNelson @mvexel @ToeBee @iandees
If we decide to tweak the shields to match the OSM style, we might as well simplify them so they can be used at very small sizes. And to me the priority is getting the basic networks in; more obscure designs for county, township, and city routes can come much later. With GroupSymbolizer, I don’t think there will be much overhead to support concurrencies. Then, to support shields, each of the five basic shields listed above can get its own rule in roads.mss that overrides shield properties on the existing In the future, to support a wider variety of shields, we can maintain a directory of SVG templates in a shields/ directory, each file named according to a |
The printed maps I looked at all had shields for the Trans-Canada and Interstate. The road map used plain shields, but the outdoors map (which had much busier cartography in general) used the unique shields for provincial highways like the crowsnest. I was initially skeptical, but looking at other maps convinces me for rendering special shields for the Interstate, US highway, Trans-Canada and equivalent, but I'm not convinced about special renderings for sub-national shields (state highways, etc). I'm very skeptical about replicating every state variant for farm routes, etc. See Texas I think simplified versions rather than verbatim reproductions is the route to go. See interstates, but also the detailed designs look bad at the resolutions we need: For the technical side, it's complicated. @asciiphil's work has been invaluable in working out data issues and as a proof of concept, but I don't support incorporating it into osm-carto. My understanding is that MapQuest has done work to support a symbolizer for a group of shields, and we might need to wait until that lands, probably in Mapnik 3.0. |
This isn't about adding US shields to the rendering, this is about adding shields to the rendering and would, at a minimum, cover the US, Canada and Mexico, as that's what @asciiphil does. Wikipedia indicates that Australia has a system of multiple systems, and that Hong Kong, Malaysia and New Zealand have relatively simple systems. |
pnorman wrote:
That would be a fine first step. (See my list of five basic shields above.) Eventually, though, we should support
Agreed, the existing Shield Renderer is tightly coupled to high-maintenance enumerations of route numbers, which would be problematic for this project. Instead, we can use the templates as shield backgrounds behind arbitrary route numbers, like Stamen and MapQuest do on their maps, with a minimum of fuss. GroupSymbolizer has landed in Mapnik 3.0, which won’t be out for awhile. It’s only required for supporting route concurrencies (multiple shields on a way). We could even render shields without supporting concurrencies until Mapnik 3.0 is released. I’d be fine with splitting concurrencies out into a separate issue.
What I meant is that, if we incorporate shields into this renderer, we can still say no to country-specific road colors and public transit logos. The idea is that we already (usually) show route numbers on the map, so we should try to show them the right way. |
We're not planning to use |
I meant the regular contributors in this group ;-) None of which are in the US. :-)
I had no idea what that was!
In that case I think this can be parked until we are at that stage of Mapnik 3.0 and it is bedded in comfortably with our stuff. And when we do the main 1 or 2 tiers of these shields for all the relevant countries can be rendered and see how it goes. |
It should definitely be possible to add graphical shield rules before Mapnik 3.0 is out. GroupSymbolizer (mapnik/mapnik#2160) would only be needed for concurrencies, which are important but not a prerequisite. The shield rules can be based on Stamen’s Terrain stylesheet (CC-BY). |
I made a comment on issue 596, #596 (comment) , and I realize that in essence, this issue is asking for the same thing for a different reason: consistency applied to the 'ref' field. Since the current style provides no rendered refs for relations (whether text or shields!), we're getting a bad mishmash of styles for 'refs' all over the place, created on individual ways --which in turn will have to be fixed way-by-way when route relation refs is implemented in any form. The longer it takes for this to happen, the worse it will get. Panning around a bit in northeast Wisconsin, near http://www.openstreetmap.org/#map=13/44.2742/-88.4599 will likely illustrate better than I can describe succinctly - differently ref-ed US, state, and county roads, all done at the individual way/segment level. If and when relation refs are rendered, beginner users will be more likely to see the 'right' way to create labels/shields/whatever-we-call-it on routes, reducing the work to keep them consistent over time. *tl;dr - please don't shelve implementing labels "of some sort, even if that's just text" based on route relations (from #596) -- even IF the shield question here in #508 can't be immediately resolved. |
This issue is about graphical shields, not rendering from routes, although rendering from routes is probably a pre-requisite to tackling this. |
Can the renderer even do a good job rendering textual shields based on route relations? Most |
On Thu, Jun 26, 2014 at 2:02 AM, skylerbunny notifications@github.com
FWIW, we spent a ton of time augmenting route relations (Interstates and US Martijn van Exel |
Could you append this information to issue #596? As you point out, IF this were implemented in openstreetmap-carto, editors would be much more likely to implement and maintain it as such, since the instant gratification of properly displayed refs would come into play. EDIT: Also, Martin, can I safely assume that you and the team working with these relations would want route relations implemented first-or-at-the-same-time, making #596 a prerequisite? I'm pretty confident you don't want to edit every way in every relation to add tags to see shields, just to remove them all again for cleanup reasons when the relations ref tagging is implemented. But if I'm wrong, let me know! |
The main reason I would consider the current situation to be completely broken is that highways often overlap with each other in the US. When this happens, the ref value on the way grows to be larger than 8 characters at which point mapnik renders nothing at all. This leads to the impression by people looking at our map that major highways are not mapped. Case in point: A few notes that were created a few days ago: It is hard to convey that these highways are mapped without doing some kind of more advanced clustered shield rendering. Specific network images would be super awesome but even a more generic solution would be better than what we have now. |
I don't understand the people who are suggesting that shields are optional. They aren't optional. They are required. They're how you tell the difference between I-787, NY-787, and CR-787 (not that you'd have a county road numbered that high, but I'm just making the point). Specifically, I-787 switches over to NY-787 in Cohoes, NY, and the map's shielding needs to reflect that. There is a specific sign for Interstate 787 (which is a red topped blue shield with 787 in white numbers), and a different sign for NY-787 which doesn't say NY-787, but instead, like the Interstate shield, just says 787, in black letters on a white background with a black border that has a shape specific to New York State I won't even try to describe in words. If it then got to be a smaller road and changed into a county road, it would be yellow letters on a five-sided blue shield again, just saying "787". Saying "I-787", "NY-787", or "CR-787" just doesn't cut it. Makes the map look like a relic of the 1990's. Accurate shields for US maps ... not optional. |
Do we really want to do this? I'm skeptical, because we don't do such localization for any other feature and the roads code is already big and complex enough. |
We want this, but an effective implementation depends on #596. |
@kennykb started osm-shields as a successor to @asciiphil’s prototype that is intended to be more usable in a standard Mapnik-based renderer. I haven’t dug into the details, but hopefully it offers a way forward on this issue. |
@1ec5 - Maybe. I wanted pictorial route markers on my own maps, and it was such a long road figuring out how to make Mapnik's GroupSymbolizer do my bidding that I thought it was best to start a project so that at least the workflow was documented for others. (And so that I wouldn't forget how it worked!) If it turns out to be useful for OSM Carto, that would be a plus, but I'm not actively lobbying for that at present. I haven't the time and energy for that - it's a very high bar to clear. |
We open sourced 100s of road shield artwork as Mapzen was shutting down for all USA state shields and ~50 countries around the world (federal down to state and sometimes county). See the blog post (scroll down to the bottom) and artwork repo (Bubble Wrap is farthest along, and the map preview shows a demo using Tangram). The artwork is vector in Adobe Illustrator format and exported in raster. Can easily be converted to other formats. |
We can't use GroupSymbolizer. It isn't supported by CartoCSS. I don't think shield pictures are a serious blocker for this feature, given the other difficult problems faced. |
Ah, good point. mapbox/carto#349 was proposed a long time ago to address that, and seeing that reminds me that I had proposed an alternative syntax (1ec5/carto@1c9ff62) but never followed through with a PR. 🙈 |
@1ec5 were you still considering submitting a new PR to carto so that we can use GroupSymbolizer in CartoCSS? |
How close are we to having proper highway shields on OpenStreetMap by now? |
In this style? Quite far away. Unless at least "We can't use GroupSymbolizer. It isn't supported by CartoCSS." was fixed or some alternative was found. Though there was work in https://github.com/ZeLonewolf/openstreetmap-americana using a different technical stack, one of main planned features are US-centric highway shields. |
As @matkoniecz notes, we expect to have working highway shields in openstreetmap-americana, which is a vector style, shortly after OpenMapTiles completes its 3.13 release, which will include support for concurrent highway routes. This was completed in openmaptiles/openmaptiles#1152. However, they will not yet be aligned properly until we can get a fix for maplibre/maplibre-gl-js#188. So, this is actively being worked in other technical stacks, but I'm not aware of anyone actively working on highway shields for raster stacks like the one used by openstreetmap-carto. |
https://map.hu/wp-content/uploads/2020/11/2271_hu_450k_2013_puha_balaton.jpg @matthijsmelissen Sorry, but your statement is totally (or at least partially) wrong, because hungarian road atlases DO display road numbers with shield and even the E-roads. (And Hungary is in Europe) Well, I had to say this after talking with @ZeLonewolf about route shields and he mentioned this issue. I also used to have a road atlas that was from 2004, but i got rid of it recently because it was literally outdated, and back in the time i needed it (2007-2013ish) because we didn't have smartphones and GPS, so by that i could navigate my dad from A to B |
The OpenStreetMap Americana project is a CC0 renderer that is working towards a comprehensive rendering of highway shields. As a CC0 project, this work is license-compatible with this project and osm-carto contributors should feel free to re-use any of this work that may be applicable. Shield artwork can be found here: Network and shield definitions can be found here: |
In many parts of the world, the cartographic convention is to mark routes with graphical shields resembling road signage. This renderer marks routes with plain text badges that are suitable for countries that identify routes with consistent alphabetic prefixes, such as the U.K.’s M/A/B scheme. However, in countries that use graphical shields, this style makes OSM look foreign and much less impressive to potential contributors.
In the U.S., this renderer’s plain text badges often lead to disagreements and edit wars about the proper format of
ref
tags on ways. Some would prefer theref
tag to reflect real-world written usage (e.g. “I-10” for an Interstate route or “SR 123” for a state route), while others have pushed for a uniform, machine-readable syntax with a unique alphabetic prefix for each route network (“I 10” and “CA 123”). The U.S. is currently a patchwork of these schemes.Meanwhile, we already have very good penetration of
type=route
relations, which solve this problem with a separate, machine-readablenetwork
tag. But we still squabble over theref
tag on ways because route relations are ignored by mainstream renderers.#495 requested arbitrary route shields based on URLs in the
symbol
tag, but that suggestion should scare anyone who wants to deploy a renderer based on live OSM data. Instead, we should maintain a large set of shield images in the symbols directory and select from these images using thenetwork
tag on route relations.@asciiphil has built a fully-functional prototype (source) based on this idea. This renderer currently supports a variety of national, state, and some county and township routes in the U.S.; provincial routes in Canada; federal routes in Mexico; and some Australian routes. It also handles concurrencies and banners, which are difficult to express with
ref
tags on ways. It could easily be extended to handle country-specific shields in Europe (such as the blue hexagons in Germany), provided that route relations are used. The shield renderer is popular among members of the talk-us mailing list, but it needs to be ported over to the new Carto stylesheets.The shield renderer stores a series of public domain “template” SVG images which each have SVG text placeholders for route numbers. A “sequences” folder contains files that list ranges of valid route numbers for each route network. A preprocessing step assembles SVG images for each valid route number for each network. The Mapnik stylesheets look for these images.
For countries that rely on graphical shields, rendering them accurately is a functional requirement, not an aesthetic one. Please consider implementing functionality similar to what the shield renderer provides (if not necessarily the same pipeline). Thank you!
The text was updated successfully, but these errors were encountered: