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

Render traffic signals #795

Open
wmisener opened this issue Feb 17, 2023 · 9 comments
Open

Render traffic signals #795

wmisener opened this issue Feb 17, 2023 · 9 comments
Labels
blocked enhancement New feature or request openmaptiles A change is needed in OpenMapTiles to support this

Comments

@wmisener
Copy link
Collaborator

Traffic signals are a key part of the road landscape, and it's important for road users using a variety of modes to know which intersections have them. Many city-wide road maps omit them, but smaller-scope neighborhood-level maps can show them. So they would be nice to render at high zoom levels, maybe z>16.

I think the icons should probably be black, which would match the road outlines. The Carto icons are quite oval, which seems very European to me; an American icon would probably be rectangular, as on the road sign:

I think it would be pretty cute to have the red-yellow-green light coloration in the icon, but I'm not sure whether that's stylistically desirable. It would run afoul of the runtime styling implemented in #776, though signals are in a sense more part of the road than part of the POI class anyways.

It might not be possible to nicely implement signal icons currently because roads at high zoom are very thin. Thicker roads which better match the physical width, as suggested in #372, would better accommodate signals and other potential icons that would lie in the roadway, like crosswalks or stop signs.

Unfortunately, I think traffic signals do not currently appear in the OMT tiles.

@ZeLonewolf
Copy link
Member

They are not in OMT, so a corresponding ticket should be logged at https://github.com/openmaptiles/openmaptiles

@wmisener
Copy link
Collaborator Author

I've submitted an issue there to add highway=traffic_signals openmaptiles/openmaptiles#1493 (comment)

@adamfranco
Copy link
Collaborator

Along with traffic signals I'd like to see stop signs as well.

For both signals and stop signs these may be mapped as a single node at the road intersection or as separate nodes on each approach at the location of the stop-bar marking. I'd think that placing the icons at the mapped location would be fine in either case, rather than trying to coalesce the intersection details into a single point.

@ZeLonewolf
Copy link
Member

Let's separate traffic signals from stop signs, especially with regard to the OMT discussion. Traffic signals are rendered in osm-carto so they'd be an easier feature to justify adding.

image

@1ec5
Copy link
Member

1ec5 commented Feb 17, 2023

For both signals and stop signs these may be mapped as a single node at the road intersection or as separate nodes on each approach at the location of the stop-bar marking. I'd think that placing the icons at the mapped location would be fine in either case, rather than trying to coalesce the intersection details into a single point.

In that case, the style should only show traffic signals at zoom levels where the four signals at an intersection wouldn’t mostly collide each other out, leaving only one signal awkwardly offset from the intersection. This would be a great use case for clustering, but GL JS only supports clustering in GeoJSON sources. Perhaps the clustering can happen on the server side.

@ZeLonewolf
Copy link
Member

Server side clustering should be feasible, my only concern would be whether it looks right if the centroid of the cluster isn't dead center in the intersection.

@1ec5
Copy link
Member

1ec5 commented Feb 17, 2023

That’s true. Some routing engines such as OSRM might have code for making the mapping style more consistent for traffic signals and stop signs. If they rewrite traffic signals from the intersection to the incoming ways, we could go in the other direction.

@wmisener
Copy link
Collaborator Author

Let's separate traffic signals from stop signs, especially with regard to the OMT discussion. Traffic signals are rendered in osm-carto so they'd be an easier feature to justify adding.

Opened a new issue to track stop signs: #796. The exact considerations for things like zoom level and coalescing nodes will likely be different between the two anyways, so it's good to have two issues beyond the OMT discussion. I'm definitely in favor of rendering both signals and stop signs in this style.

@1ec5
Copy link
Member

1ec5 commented Feb 17, 2023

If we need a monochromatic version of the MUTCD traffic signal glyph, the MUTCD-inspired Australian version is pretty unambiguous, though it would require us to do the coalescing described above:

W3-3

@claysmalley claysmalley added the enhancement New feature or request label Jun 16, 2023
@wmisener wmisener added blocked openmaptiles A change is needed in OpenMapTiles to support this labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request openmaptiles A change is needed in OpenMapTiles to support this
Projects
None yet
Development

No branches or pull requests

5 participants