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] Improve route_name generation in GTFS parsing #674

Merged
merged 1 commit into from
Jul 16, 2020

Conversation

woshilapin
Copy link
Contributor

When creating a Route, we want to apply generic route_name generation unless all trips in that route are in the same direction, in this case, we keep the route's name.

Bonus: The specification proposes to use route_short_name if route_long_name is empty but our previous implementation was only using route_long_name. This PR fixes it.

ref: ND-681

@@ -1,3 +1,3 @@
route_id,route_name,direction_type,line_id,geometry_id,destination_id
route:2,plop - plop,forward,route:2,,stoparea:1
route:3,plop - plop,forward,route:3,,stoparea:1
route:2,ma route 1,forward,route:2,,stoparea:1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This modification is due to using route_short_name when route_long_name is empty (the previous implementation was leaving it empty, and therefore, the auto-generation rule was triggered).

Copy link
Contributor

@papailio papailio left a comment

Choose a reason for hiding this comment

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

I approve the doc (apart from a small typo) and the fixtures.
I let the experts review the code ;)

@woshilapin woshilapin force-pushed the gtfs2ntfs-route_name branch from 7626146 to 5f3ad9f Compare July 16, 2020 12:48
@woshilapin woshilapin merged commit 58f0bb7 into hove-io:master Jul 16, 2020
@woshilapin woshilapin deleted the gtfs2ntfs-route_name branch July 16, 2020 15:48
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

Successfully merging this pull request may close these issues.

4 participants