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

Missing shield on eight-way route concurrency #894

Open
1ec5 opened this issue Jul 6, 2023 · 13 comments
Open

Missing shield on eight-way route concurrency #894

1ec5 opened this issue Jul 6, 2023 · 13 comments
Labels
bug Something isn't working openmaptiles A change is needed in OpenMapTiles to support this planetiler Pending next planetiler release shields

Comments

@1ec5
Copy link
Collaborator

1ec5 commented Jul 6, 2023

In Downtown Cincinnati, Central Avenue between 5th and 6th Streets carries U.S. Routes 22, 27, 42, 52, 127, U.S. Route 50 Truck, and Ohio State Route 3 – in that order. This seven-way concurrency is apparently too much for OpenMapTiles, which can only handle up to a six-way concurrency: openmaptiles/openmaptiles#1128. Americana shows all the shields except for U.S. Route 50 Truck.

U.S. Routes 22, 27, 42, 52, and 127 and Ohio State Route 3

Once changeset 138,168,933 makes it into the tiles, there will be an eighth route to display along this block: the Ohio River Scenic Byway. #893 is adding a shield for that route. Presumably it would go missing at 5th Street and pick back up on the 6th Street Viaduct.

Blocked by openmaptiles/planetiler-openmaptiles#95

@1ec5 1ec5 added bug Something isn't working openmaptiles A change is needed in OpenMapTiles to support this shields labels Jul 6, 2023
@1ec5 1ec5 changed the title Missing shield on seven-way route concurrency Missing shield on ~~seven~~ eight-way route concurrency Jul 6, 2023
@1ec5 1ec5 changed the title Missing shield on ~~seven~~ eight-way route concurrency Missing shield on eight-way route concurrency Jul 6, 2023
@ZeLonewolf ZeLonewolf added the planetiler Pending next planetiler release label Jul 6, 2023
@ZeLonewolf
Copy link
Owner

Related #planetiler Slack discussion here: https://osmus.slack.com/archives/C031V9E9RMG/p1688647853439579

@1ec5
Copy link
Collaborator Author

1ec5 commented Aug 6, 2023

Now that #893 has landed, the Ohio River Scenic Byway shield has displaced the State Route 3 shield. OpenMapTiles ranks SR 3 last even though it’s more important than at least three of the routes that remain:

U.S. 27 / U.S. 42 / U.S. 52 / U.S. 127 / Ohio River Scenic Byway / U.S. 50 Truck

@ZeLonewolf
Copy link
Owner

To fix this problem, additional code would be needed here to differentiate routes at the state level:
https://github.com/ZeLonewolf/openmaptiles/blob/master/layers/transportation/update_route_member.sql

@1ec5
Copy link
Collaborator Author

1ec5 commented Aug 6, 2023

That’s probably a good thing to polish up in the long term, though increasing the maximum concurrency would also work around the issue, functionally speaking.

Greater concurrency would prevent this particular label from appearing until a higher zoom level. If that’s a problem, we could introduce a redundant layer that only includes a few shields at a time, as a backup.

@ZeLonewolf
Copy link
Owner

Please confirm whether this issue is resolved now!

@jleedev
Copy link
Collaborator

jleedev commented Oct 16, 2023

That segment has up to route_8 now in the tiles, and I see appropriate shields when I crank up the concurrency in the shield expression.

The tilejson implies that route_19 exists somewhere, have fun finding it.

@1ec5
Copy link
Collaborator Author

1ec5 commented Oct 16, 2023

That segment has up to route_8 now in the tiles, and I see appropriate shields when I crank up the concurrency in the shield expression.

Cool, now we just need to increase this literal that limits the shield image expression to a six-way concurrency:

for (var i = 1; i <= 6; i++) {

@zekefarwell
Copy link
Collaborator

This eight-way concurrency is only a block long so it doesn't really seem like a major issue to me if a few of the shields aren't included (as long as they are properly sorted by importance). With such a short concurrency, the missing shields will display nearby and it will be relatively clear how each route connects. Are there any examples of actual signed seven or eight-way concurrencies of significant length? If so I could see a compelling argument for increasing the limit.

@1ec5
Copy link
Collaborator Author

1ec5 commented Oct 16, 2023

as long as they are properly sorted by importance

That’s another issue: a scenic byway is being prioritized over a truck U.S. Route and the most important state route in the state. Fortunately, I don’t think increasing the concurrency limit in the expression has much of a downside. Any increase in the style’s size would be massively outweighed by the label code anyways.

@1ec5
Copy link
Collaborator Author

1ec5 commented Oct 16, 2023

Are there any examples of actual signed seven or eight-way concurrencies of significant length? If so I could see a compelling argument for increasing the limit.

Here are some more substantial seven-way concurrencies in Georgia. I haven’t checked whether they’re all fully signposted, but they’re all in ref rather than unsigned_ref:

Moreover, even if a route relation is tagged unsigned_ref, it still takes up a slot, potentially crowding out a signposted route.

Footnotes

  1. Governor’s Road Improvement Program (GRIP) corridors are modeled as unnumbered route relations; nevertheless, they are exposed in OpenMapTiles output. 2 3

@zekefarwell
Copy link
Collaborator

zekefarwell commented Oct 17, 2023

That’s another issue: a scenic byway is being prioritized over a truck U.S. Route and the most important state route in the state.

Now that all the routes are in the tiles, it looks like SR 3 is being properly prioritized before the scenic route and the truck route. So that's good at least.

Fortunately, I don’t think increasing the concurrency limit in the expression has much of a downside

The downside I see is just that sometimes eight shields won't fit in the available space and MapLibre will instead show no shields. Of course we already have this problem with a limit of six, but it gets worse the higher the limit. Ideally we'd be able to progressively truncate the shield string so if 6 didn't fit we could show 5, then 4, then 3, etc. I'm not sure if that's possible, but it sounds like your backup layer idea would have a similar goal.

@1ec5
Copy link
Collaborator Author

1ec5 commented Oct 17, 2023

The downside I see is just that sometimes eight shields won't fit in the available space and MapLibre will instead show no shields. Of course we already have this problem with a limit of six, but it gets worse the higher the limit.

Perhaps, but this downside is no more significant than the concurrencies themselves.

Ideally we'd be able to progressively truncate the shield string so if 6 didn't fit we could show 5, then 4, then 3, etc. I'm not sure if that's possible, but it sounds like your backup layer idea would have a similar goal.

The fallback layer would be the way to progressively show shields in a concurrency. I’ve experimented with something similar for #793, but the shield concurrencies should be more straightforward to accommodate than road labels.

If we’re really concerned about clutter, I think one fallback layer would be enough. Six layers (representing a factorial of concurrency cardinality) would probably be overkill and possibly counterproductive. The user needs to be able to trust to some extent that we’re showing all the shields we can. If there are too many fallback layers, the user needs to keep zooming in further to verify that the map has fully expanded all the labels.

@1ec5
Copy link
Collaborator Author

1ec5 commented Jan 12, 2024

This query turns up 1,698 roadways that are part of five or more unique route relations of numbered highway routes.1 The vast majority of them are in the Southeast:

Heatmap of highly concurrent roadways in the Southeast

Cincinnati’s Central Avenue is the most highly concurrent roadways in these results. Tied with it is a roundabout in Augusta, Maine that should probably be refactored so that each route only traverses part of the roundabout.

Footnotes

  1. We don’t show a shield for every numbered route; conversely, not every shield we show is for a numbered route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working openmaptiles A change is needed in OpenMapTiles to support this planetiler Pending next planetiler release shields
Projects
None yet
Development

No branches or pull requests

4 participants