Underscores stripped out of feed IDs #2405

Open
abyrd opened this Issue Feb 24, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@abyrd
Member

abyrd commented Feb 24, 2017

Giuseppe on the mailing list reports:
"I noted that if the feed id is given by the concatenation by underscore of two words, the program drops the underscore, CHINA_RAIL becomes CHINARAIL."

@abyrd abyrd added the bug label Feb 24, 2017

@abyrd abyrd self-assigned this Feb 24, 2017

@johannilsson

This comment has been minimized.

Show comment
Hide comment
@johannilsson

johannilsson Feb 24, 2017

Contributor

This was made as a workaround for OBA that split ids on underscores, OTP splits on colon which is also stripped from the id.

This is done here, https://github.com/opentripplanner/OpenTripPlanner/blob/master/src/main/java/org/opentripplanner/graph_builder/module/GtfsFeedId.java#L99

Contributor

johannilsson commented Feb 24, 2017

This was made as a workaround for OBA that split ids on underscores, OTP splits on colon which is also stripped from the id.

This is done here, https://github.com/opentripplanner/OpenTripPlanner/blob/master/src/main/java/org/opentripplanner/graph_builder/module/GtfsFeedId.java#L99

@abyrd

This comment has been minimized.

Show comment
Hide comment
@abyrd

abyrd Feb 24, 2017

Member

Thanks @johannilsson, I see this was added in b5ae935. I don't fully understand though why OTP needs to clean IDs to match OBA conventions. Can you give some more context?

Member

abyrd commented Feb 24, 2017

Thanks @johannilsson, I see this was added in b5ae935. I don't fully understand though why OTP needs to clean IDs to match OBA conventions. Can you give some more context?

@johannilsson

This comment has been minimized.

Show comment
Hide comment
@johannilsson

johannilsson Feb 24, 2017

Contributor

AgencyAndId.convertFromString is used in RoutingResource, this assumes the separator is an underscore. This seems fairly easy to refactor though, I can't remember if there was other parts that required this change as well though. Can do a tests on our builds without replacing the underscore to see how it works.

Contributor

johannilsson commented Feb 24, 2017

AgencyAndId.convertFromString is used in RoutingResource, this assumes the separator is an underscore. This seems fairly easy to refactor though, I can't remember if there was other parts that required this change as well though. Can do a tests on our builds without replacing the underscore to see how it works.

@abyrd

This comment has been minimized.

Show comment
Hide comment
@abyrd

abyrd Mar 14, 2017

Member

Oh I see, it's because we're using OBA as a library and it obeys this convention.

Member

abyrd commented Mar 14, 2017

Oh I see, it's because we're using OBA as a library and it obeys this convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment