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

Blot out highway medians #598

Open
1ec5 opened this issue Dec 2, 2022 · 2 comments
Open

Blot out highway medians #598

1ec5 opened this issue Dec 2, 2022 · 2 comments
Labels
enhancement New feature or request highway-lines mapping Changes needed to OpenStreetMap openmaptiles A change is needed in OpenMapTiles to support this

Comments

@1ec5
Copy link
Collaborator

1ec5 commented Dec 2, 2022

A mid zoom levels, sprawling freeway interchanges can take up a lot of space. Some map publishers fill in the landscaped medians with the same color as the freeway. Conceptually, the freeway is depicted as two or more fine strokes (just like every other roadway) joined by a colored fill. This ensures the highway looks coherent until we get to a high enough scale that it makes sense to give each roadway wider linework.

New York State Thruway

South Freeway

Synthesizing a polygon from the various carriageways would be maddeningly difficult. Fortunately, some regions in Europe have been mapping landuse=highway for this purpose. However, this tag does not distinguish different highway classifications. For example, it’s sometimes used on ordinary surface streets as a way to collect sidewalks and such with the main street. Either there would need to be some kind of secondary tag for indicating the highway classification, or we’d have to infer that from the roadways within during postprocessing.

@1ec5 1ec5 added enhancement New feature or request mapping Changes needed to OpenStreetMap openmaptiles A change is needed in OpenMapTiles to support this highway-lines labels Dec 2, 2022
@dabreegster
Copy link

dabreegster commented Dec 18, 2022

This is something we've been exploring in osm2streets recently as a general-purpose planar graph library. You'd input line-strings tagged with arbitrary data (like "left side of way 123 of motorway type"), it splits into segments based on any lines crossing (ignoring the original OSM graph -- overlapping bridges and tunnels need to produce a crossing), and then traces along the lines and calculates faces/polygons. It's equivalent to taking a screenshot and using a raster "fill" tool in a paint program, but following exact vector lines. We'll be using this to trace the interior of neighborhoods (everything surrounded by highway=tertiary or above) and find medians in between dual carriageways.

It's a WIP, but if it might be helpful here, I can keep your use case in mind. If you can feed in the thickened highway line-string polygons at some zoom level that you've got now, you might be able to use the library to fill in the spaces between them. It'll be a Rust library with Javascript bindings, and if your stack is something else, we can make more bindings (or worst case, just call a CLI tool and use GeoJSON files for IO)

Ref a-b-street/osm2streets#10 so I can find this issue easily later

@1ec5
Copy link
Collaborator Author

1ec5 commented Dec 18, 2022

If you can feed in the thickened highway line-string polygons at some zoom level that you've got now, you might be able to use the library to fill in the spaces between them. It'll be a Rust library with Javascript bindings, and if your stack is something else, we can make more bindings (or worst case, just call a CLI tool and use GeoJSON files for IO)

The Americana project is specifically about the frontend. It currently uses tiles produced by Planetiler, which is written in Java, though Americana can also supplement these tiles with a different tileset created by other means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request highway-lines mapping Changes needed to OpenStreetMap openmaptiles A change is needed in OpenMapTiles to support this
Projects
None yet
Development

No branches or pull requests

2 participants