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

[FEATURE] Subway lines (with offsets) #555

Open
nvkelso opened this issue Apr 19, 2023 · 5 comments
Open

[FEATURE] Subway lines (with offsets) #555

nvkelso opened this issue Apr 19, 2023 · 5 comments

Comments

@nvkelso
Copy link

nvkelso commented Apr 19, 2023

Is your feature request related to a problem? Please describe.

When designing a transit map it's ideal to have subway lines (and sometimes other lines like light rail) considered as a group along a way but offset from each other for visual display, by zoom. Right now the lines stack on top of each other (because that's how the OSM data comes in) instead of being offset for visual display per zoom.

Describe the solution you'd like

The older Maps.ME open source project has a good tool for generating offset transit lines:
https://github.com/mapsme/omim/blob/master/docs/SUBWAY_GENERATION.md
and
https://github.com/mapsme/subways

The downside of this tool is it had to be run per city instead of globally. (When running globally such algos can get greedy.) Ideally this can be run globally (or for whatever bbox and planet extract is input), though.

Describe alternatives you've considered

n/a

Additional context

Here's what this looks like in San Francisco, California in Organic Maps (a free continuation of original FOSS Maps.Me codebase):

NOTE: In this case station "pills" look like they are also being generated, which is something that MapboxGL to my knowledge doesn't know how to generate. However, you could probably trick it by calculating width and angle for each station node across the offset lines?

image

@bdon
Copy link
Contributor

bdon commented Apr 20, 2023

Do we want to use OSM as a datasource or something like aggregated GTFS via transitland?

https://www.transit.land/map#10.76/52.5183/13.3067

@msbarry
Copy link
Contributor

msbarry commented Apr 21, 2023

So in this case what do you think we would have to do ahead of time vs what could the client do at render time? It seems like at one extreme we could have planetiler place the stylized subway lines at fixed points on the ground, or the other we could have planetiler pass along an "offset index" or something to maplibre to use with its line-offset property - although that doesn't handle splits/joins/turns/station angles ...

@nvkelso
Copy link
Author

nvkelso commented Apr 22, 2023

If you want smoothly interpolated line offsets between tile integer zooms, you need to include lines & their offsets as metadata on a single "railway" geometry feature. As you point out MapLibre / MapboxGL only kinda know how to render this properly (splits/joins/turns/station angles), though.

The poor man's version (so each line get's its own offset geometry feature) would probably render more reliably in current off the shelf graphics software.

@nvkelso
Copy link
Author

nvkelso commented Apr 22, 2023

Do we want to use OSM as a datasource or something like aggregated GTFS via transitland?

I'm a big fan of Transitland.

But most the subway (and railway) information is already in OpenStreetMap... so I'd start with OSM first.

The nice thing about OSM is it already includes the geometry, and the relations. While GTFS doesn't require sending down the geometries so you often have to backfill them.

@wipfli
Copy link
Contributor

wipfli commented Jun 26, 2023

Screenshot_20230626-151439
https://www.sbb.ch/de/freizeit-ferien/destinationen/staedte-laender-europa.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants