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

Offset one-way arrows away from roads #992

Open
1ec5 opened this issue Oct 31, 2023 · 1 comment · May be fixed by #995
Open

Offset one-way arrows away from roads #992

1ec5 opened this issue Oct 31, 2023 · 1 comment · May be fixed by #995

Comments

@1ec5
Copy link
Collaborator

1ec5 commented Oct 31, 2023

This style currently tries very hard to superimpose one-way arrows on roads. While we should make use of the space within a filled road, we’re running into a lot of problems, especially when the road is only nominally filled.

For example, the arrows at zoom level 15 on local roads and especially alleys gets almost buried in the road casing, making it more difficult to discern the arrow’s direction: #512 (comment). Meanwhile, we’ve had to invert the arrow’s color on some darker filled roads, but neither black nor white will yield much contrast against a red road or a road that happens to intersect or pass under: #512 (comment) #512 (comment). We tried to mitigate this issue by removing one-way arrows from ramps, but sometimes ramps do benefit from the arrows: #512 (comment).

Many print maps avoid filling roads even at high zoom levels, so they have to account for collisions between stroked roads and one-way arrows. They typically deconflict the arrows in the same manner as road name labels, by offsetting them to one side of the roadway. Though this treatment takes up more space, it ensures the arrows’ legibility and allows for them to be styled more consistently.

MNDOT 2019 American Map New York City

I implemented offset one-way arrows in the AARoads Wiki fork in aaroads-wiki#2 (comment). Overall, I think it reinforces the aesthetic that we’re going for with the road name labels. One downside is that it highlights the idiosyncratic arrow placement along these roadway lines, but I think that’s partly because the tiles aren’t merging roadways aggressively enough (onthegomap/planetiler#298) and don’t contain feature IDs that MapLibre can use to join features across tile boundaries (onthegomap/planetiler#377).

OSM Americana AARoads Wiki
Interior arrows Exterior arrows
@1ec5
Copy link
Collaborator Author

1ec5 commented Oct 31, 2023

Ideally, the offset would be away from the median of the road even if the road is divided. But this requires knowledge of which side of the road people drive on in a given region. For now, I think it’s OK-ish to assume driving on the right, but this means the one-way arrows will mush together or even overlap the roadway if it’s divided in a region that drives on the left. I don’t know of a good way around this issue unless we incorporate a crude GeoJSON of the countries that drive on the left.

@1ec5 1ec5 linked a pull request Oct 31, 2023 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant