add trolleybus & monorail support - #3658
Conversation
# Conflicts: # docs/Changelog.md
|
Presumably you want to include/exclude these modes in your routing requests. Am I seeing this correctly? |
|
If you don't, then mapping to bus and rail respectively would already be enough to get OTP to use them. |
|
Indeed want to give user flexibility to query and filter as he desires. |
|
There are a couple of proposals floating around the community to make the modes more flexible and add more precise sub-modes (which I think monorail and trolleybus are) therefore I'm not sure that the community will accept this PR. (Note: I'm not the final arbiter of these things.) Perhaps it's best if you join the OTP developer meeting that is happening Tuedays at 10am CEST and Thursdays at 3pm CEST on Google Hangout: https://meet.google.com/qwh-xzbz-atr |
Mapping these two modes as @leonardehrenfried suggest above would make this PR simple to approve, then we can discuss introducing new modes as a separate thing and decide on that in the issue #3657. I am not saying we will not accept it, I am just saying it need more discussion. FYI: We (Entur) are likely to propose a configurable submodes as a Sandbox in the near future. |
…ybus-support # Conflicts: # docs/Changelog.md
…ybus-support # Conflicts: # docs/Changelog.md
# Conflicts: # docs/Changelog.md
Co-authored-by: Thomas Gran <t2gran@gmail.com>
abyrd
left a comment
There was a problem hiding this comment.
This looks good to me, especially considering that these modes were added to the official base GTFS spec, and this PR also maps these new modes from the TPEG extension modes.
| private static final int MODE_TROLLEYBUS = 8192; | ||
|
|
||
| private static final int MODE_MONORAIL = 16384; |
There was a problem hiding this comment.
Now that we have so many of these it might be better to define them by bit-shifting 1 by successive integers, to avoid any errors in writing out the powers of 2 as integer literals.
PR Instructions
When creating a pull request, please follow the format below. For each section, replace the guidance text with your own text, keeping the section heading. If you have nothing to say in a particular section, you can completely delete the section including its heading to indicate that you have taken the requested steps. None of these instructions or the guidance text (non-heading text) should be present in the submitted PR. These sections serve as a checklist: when you have replaced or deleted all of them, the PR is considered complete. As of 2021, most regular OTP contributors participate in our twice-weekly conference calls. For all but the simplest and smallest PRs, participation in these discussions is necessary to facilitate the review and merge process. Other developers can ask questions and provide immediate feedback on technical design and code style, and resolve any concerns about long term maintenance and comprehension of new code.
Summary
Add support for correctly parsing gtfs feeds with route of type trolleybus or monorail
Issue
closes #3657
Unit tests
Write a few words on how the new code is tested.
Code style
Have you followed the suggested code style?
Documentation
Changelog