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

Rewrite road layer #995

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Rewrite road layer #995

wants to merge 11 commits into from

Conversation

1ec5
Copy link
Member

@1ec5 1ec5 commented Oct 31, 2023

This is a full rewrite of the road layer code based on aaroads-wiki#2.

Tasks:

  • Merge and rebase changes to roads layers from AARoads fork
  • Restore road widths and colors based on functional classification
  • Restore space-filling streets at high zoom levels
  • Restore casing on freeways
  • Check whether Unnecessary components to road line-sort-key #779 is fixed
  • Eliminate bridge casing and always sort filled road lines over stroked road lines at lower zoom levels (possible tail work)
  • Experiment with single offset lines for freeway and expressway casing instead of line gap (possible tail work)

Fixes #746, fixes #992, fixes #993.

@ZeLonewolf
Copy link
Member

How are you addressing #746 (exits to nowhere)?

@1ec5
Copy link
Member Author

1ec5 commented Nov 2, 2023

How are you addressing #746 (exits to nowhere)?

This design reduces freeway ramps to thin black strokes, even when they connect freeways to freeways, but tries to keep them visible at any zoom level where freeways are visible (OpenMapTiles is a limiting factor here). See the before-and-after screenshots in aaroads-wiki#2 (comment) aaroads-wiki#2 (comment) where I first implemented this approach, and also this discussion in Slack. I think there will be more continuity between freeways and their ramps once we restore the black casing to freeways.

The treatment of freeway-to-freeway ramps may come as a surprise to anyone who’s been focused on highway connectivity as part of the U.S. mapping community’s reclassification effort, with its emphasis on identifying a coherent, well-connected network of freeways and trunk roads. However, the effect of “pinching” the lines at major freeway interchanges has plenty of precedent among American maps at scales where interchanges are more than mere diamonds but roads are still stroked. At least this treatment is more prevalent on these maps than the “exits to nowhere” that are typical of OSM-based maps.

MNDOT 2019 Compass Maps San Mateo County 2006 Universal Maps Cincinnati Area Rand McNally Dallas Metro

Some maps do keep freeway–freeway ramps as filled lines that look identical to the freeway, but they’re in the minority. (If anything, these maps would be arguments for tagging these connections as highway=motorway rather than highway=motorway_link.)

INDOT Universal Map Chicago

Anecdotally, I’ve found that deemphasizing ramps highlights many misclassified ramps that would potentially affect turn-by-turn navigation. I think this benefit would outweigh the downside of tempting mappers to reclassify freeway–freeway ramps as freeways.

Comment on lines +70 to +71
// Assumes driving on the right.
"icon-offset": [0, 10],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the offset effect, but it looks really clunky in left-hand-drive localities, including the US Virgin Islands. Perhaps an asymmetric oneway icon could make it look a little better.

Copy link
Member Author

@1ec5 1ec5 Apr 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking this might fall under the notion that we’re primarily optimizing for North America, but a regression in left-hand driving countries would be far from ideal, and you have a point about USVI. We could bundle a GeoJSON of left-hand driving countries and reference it within a within expression, similar to #749. Performance might be an issue, however.

Copy link
Member Author

@1ec5 1ec5 Apr 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really the effect I’m going for is how printed maps traditionally would append an arrow to the (offset) label of each one-way street, rather than treating it as a separately placed repeating element. That would have the benefit of less repetition and probably handling divided highways better in left-hand driving countries. But I don’t think that’s feasible here, because the oneway field is only present on the transportation layer, not the transportation_name layer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess 25.7 kilobytes or 57.2 kB isn’t too bad, though it sure would be nice if every road just had its country code on it.

@claysmalley claysmalley linked an issue Apr 1, 2024 that may be closed by this pull request
@1ec5 1ec5 mentioned this pull request Sep 19, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants