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

Stops with location_type=2 representing station exit/entrance points are removed from a dataset that doesn't have pathways.txt #13

Open
BodoMinea opened this issue Dec 12, 2021 · 0 comments

Comments

@BodoMinea
Copy link

BodoMinea commented Dec 12, 2021

Hi,

First of all, thanks for creating this great project! It has been of great help during my years of producing and aggregating GTFS feeds. I am currently administering a GTFS feed for a big local authority that includes a metro (subway) agency. The underground stations have multiple exits to the surface. To my knowledge, it is possible to instruct GTFS consuming applications to specify the most appropriate exit for their route. I have implemented as follows:

All stations are „described” by multiple stop_ids, with the following parameters:
Example Stop - general stop with location_type=1, we'll refer to it as „Main ID”
Example Stop Platform 1, location_type=0, platform_code=1, parent_station=Main ID
Example Stop Platform 2, location_type=0, platform_code=2, parent_station=Main ID
Example Stop Exit A, location_type=2, parent_station=Main ID
Example Stop Exit B, location_type=2, parent_station=Main ID
Example Stop Exit C, location_type=2, parent_station=Main ID

Trip stop_times reference the trips as stopping in Example Stop Platform 1 and Example Stop Platform 2 respectively. Therefore, there are no stop times referencing the main Example Stop or the three Example Stop Exits.

After running gtfstidy --keep-col-order -O -e -D -C --fix, which is my usual pre-publish command, the stop exit stops are removed from stops.txt. The output doesn't explicitly state the problem:

(27 trips [0.04%], 0 stops [0.00%], 0 shapes [0.00%], 0 services [0.00%], 0 routes [0.00%], 0 agencies [0.00%], 0 transfers [0.00%], 0 pathways [0.00%], 0 levels [0.00%], 0 fare attributes [0.00%] dropped due to errors. Use -W to display them.)
Removing service duplicates... done. (-3 services [-37.50%])

But running without the -O switch solves this issue and my entrance/exit-only stops are in the final feed.

Do you think an exception could be introduced for this (for my use-case at least it would be great to remove other orphan entities like - normal type unused stops, unused shapes etc), or maybe a way to granularly enable/disable orphan entity removal (analyze shapes but not stops for example)?

Or do you think I am mistaken - is this not valid per the GTFS spec and should the process remain as-is because having pathways is more comprehensive and solves this issue, as the orphan portion of the code looks for those?

Thank you for your time!

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

1 participant