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

Boarding Locations should support more tags #6433

Open
Brickblock1 opened this issue Feb 5, 2025 · 2 comments
Open

Boarding Locations should support more tags #6433

Brickblock1 opened this issue Feb 5, 2025 · 2 comments

Comments

@Brickblock1
Copy link

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

Currently OTP supports these tags for linking Boarding Locations:
public_transport=platform
highway=bus_stop
railway=tram_stop
railway=station
railway=halt
amenity=bus_station
amenity=ferry_terminal
railway=platform (undocumented)

This list works well when the osm data uses PTv2 tagging but linking becomes troublesome in places where PTv2 is not used. Notible examples of places where PTv2 is not used are Norway and the area around Stockholm.

Most notible is the lack of highway=platform from this list which is a better candidate for linking as it is more often connected to the street grid than highway=bus_stop and better represents the waiting area.

Goal / high level use-case

Be able to use Boarding Location linking for bus stops in Stockholm where stop locations in GTFS/NeTEx can be quite inaccurate.

Describe the solution you'd like

Add highway=platform and public_transport=station to the list of supported tags.
Look at removing railway=tram_stop as it is analogous to public_transport=stop_position which is explicitly not supported.

Describe alternatives you've considered

  1. Adding public_transport=platform before loading the OSM data into OTP.
    This is rather cumbersome and adds a barrier for beginners to overcome.
  2. Not linking GTFS/NeTEx to the platform but rather the highway=bus_stop node.
    This is not going to work nearly as well since highway=bus_stop is not universally expected to be connected to the street grid.

Additional context

Image
Image from PTSA showing area where PTv2 tagging isn't used.

It is very unlikely that this tagging convention of not using PTv2 for bus stops will change in the future. (users are actively removing PTv2 tags)

@leonardehrenfried leonardehrenfried changed the title Boarding Locations should support more tags/needs an overhaul. Boarding Locations should support more tags Feb 6, 2025
@leonardehrenfried
Copy link
Member

highway=platform, while not the totally recommended way of tagging platforms (but in OSM which tag really is?), seems fine for me to support. I would welcome a PR for this.

If you're a Java developer, the code in question is here:

/**
* Is this a public transport boarding location where passengers wait for transit and that can be
* linked to a transit stop vertex later on.
* <p>
* This intentionally excludes railway=stop and public_transport=stop because these are supposed
* to be placed on the tracks not on the platform.
*
* @return whether the node is a place used to board a public transport vehicle
*/
public boolean isBoardingLocation() {
return (
isTag("highway", "bus_stop") ||
isTag("railway", "tram_stop") ||
isTag("railway", "station") ||
isTag("railway", "halt") ||
isTag("amenity", "bus_station") ||
isTag("amenity", "ferry_terminal") ||
isPlatform()
);
}
/**
* Determines if an entity is a platform.
* <p>
* However, they are filtered out if they are tagged usage=tourism. This prevents miniature tourist
* railways like the one in Portland's Zoo (https://www.openstreetmap.org/way/119108622)
* from being linked to transit stops that are underneath it.
**/
public boolean isPlatform() {
var isPlatform = isTag("public_transport", "platform") || isRailwayPlatform();
return isPlatform && !isTag("usage", "tourism");
}
public boolean isRailwayPlatform() {
return isTag("railway", "platform");
}

@miklcct
Copy link
Contributor

miklcct commented Feb 6, 2025

I would also like to add railway=platform_edge as well.

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

3 participants