-
Notifications
You must be signed in to change notification settings - Fork 63
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
Distinguish highway bridges from non-bridges #169
Comments
Many state-scale road maps show “guardrails” similar to your mockup above, though the casing is thinner and the gap larger: Most only show this detail when there’s a grade separation with no connecting ramps; otherwise, the interchange is generalized as a square or diamond, which is understood to be a cloverleaf, trumpet, etc.: Some maps take a simpler approach, with just a knock-out (halo) effect but no guardrails: Or just the guardrails but no gap: Some maps not only show the guardrail but also depict each guardrail bending away from the roadway at either end, like in the real world: |
Thanks, @1ec5 ! I guess one challenge is that our style may not have a consistent background color as roads could be layered over landcover/landuse and similar backgrounds. This probably isn't an issue if the offset between the casing and guardrail is small, but if it is large it could stand out from these background colors quite a bit. 🤔 |
Ah. Good point. Hairline casings could eliminate the need for bridge distinctions, but they will be needed for the stroked style and maybe for the expressway style. |
I wonder if that might actually be preferable to having the gap blend in with the background anyways, since that would make the guardrails harder to see. In any case, I think I’ve only seen guardrails and knockouts for road-road and road-rail separations, but not over water. In theory, we could distinguish bridges over water using Another possibility would be to use |
Just noting that #84 is related to this bridge issue. If the change from stroke to casing is near the limit of where bridge distinctions need to be shown, then maybe we don't need to render guardrails. Another alternative if we want to provide some distinction between bridges and intersections would be to add a light hairline casing to contrast with the dark strokes: |
We did originally have darker casing to differentiate bridges but it was only ever implemented for motorways. It must have gotten lost in a refactor at some point along with the previously dashed tunnel casing. I like the look of the guardrails better than what we had before. The zoom level where bridges and tunnels start being differentiated is supposed to be controlled by this variable but it looks like it's currently not working properly because I'm still seeing tunnels at zoom 10 and below. Introduced in #55 |
I like this knockout effect a lot. It’s very intuitive against the land background. If a bridge crosses over water, would this lighter knockout still look like a bridge casing, or could it be mistaken for a causeway? |
Low-zoom "stroke" rendering is now handled as a dark fill with thin light casing. At high zooms the color pallet flips to light fill. This addresses the bridge layering challenge noted in #169 by always using casing for all highways. Even without extra bridge rails, the light casing allows viewers to distinguish overlaps versus junctions in "stroke" style.
This PR disambiguates highway levels (fixes #84) by always showing primary and lower highways with either dark or light treatments rather than a mix of both. The current dark/light switch happens at z15, but it could be changed earlier or later. Additionally, the dark treatment from highways changes from from using the fill layer to draw "strokes" (without a casing layer) to always drawing both the casing and fill layers, but using a light casing with dark fill and a dark casing with light fill at the different zooms of primary and down. This partially or fully addresses #169 by allowing the the dark treatment's lighter casing to disambiguate between junctions and bridges/overpasses.
If there's concern about the casing for guardrails clashing with the background, can the casing have an intermediate opacity? Possibly even a gradient that is strongest against the guardrail? I don't have evidence for this in use on real maps, but it could let you use the guardrail style on non-white backgrounds. Apologies if the technology dictates 100% opacity for casings. |
For the AARoads Wiki fork, I implemented a knockout effect with hairline guardrails in aaroads-wiki#2 (comment). I mostly got away with it because none of the roads in that fork have a casing that would look redundant to the knockout. In fact, that lack of a casing all but necessitated a knockout, as we discovered above. The knockout and guardrail look OK at high zoom levels but not that great at mid zoom levels. On the one hand, I would’ve preferred the knockout to be wider on land, but on the other hand, I really needed it to be less prominent over water, since there’s already plenty of contrast between the road and water. |
#934 takes this approach by way of a fill extrusion layer. While it avoids looking like a causeway over water or a gap in a park, it’s also a distinct bridge color that varies significantly depending on context. I think this variation adds to the map’s visual complexity rather than clearing it up.
A solution to this would be to compose two different knockouts per bridge: one based on the bridge area and another based on the roadway that’s always wider than the roadway. In turn, there can be two guardrail layers based on the same features. To keep the bridge area–based guardrail layer from looking like an outline, the roadway-based knockout layer can cover up the bridge area–based guardrail layer at the abutments. To avoid redundant guardrails, both guardrail layers would appear beneath both knockout layers. |
I like the guardrail idea. I'll try putting that together. |
While extra casings for bridges add visual clutter, it was noted by Minh in Slack that without them it can be difficult or impossible to disambiguate between an intersection and a flyover.
If we'd like to keep bridges subtle, then maybe just a slight extra width to the casing could be added. We could potentially layer two levels of casing (widest dark bottom, then a lighter slightly narrower, both under the normal road casing) to visually offset an outer bridge line from the normal casing. This technique could be especially useful for the dark-stroke style at lower zooms.
Maybe something along these lines:
This sort of treatment could work with both case+fill style as well as stroked style and shouldn't conflict with expressway rendering.
At some point features will become too small to make differentiating bridges useful, maybe somewhere around z12
The text was updated successfully, but these errors were encountered: