-
Notifications
You must be signed in to change notification settings - Fork 1k
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
If configured, add subway station entrances from OSM to walk steps #6343
Open
leonardehrenfried
wants to merge
48
commits into
opentripplanner:dev-2.x
Choose a base branch
from
leonardehrenfried:station-entrances
base: dev-2.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
1d19a05
Add subway station entrances to walk steps
HenrikSundell 67f4b1b
Add entity to walk steps
HenrikSundell 9d18269
Add more parameters to Entrance
HenrikSundell 3b88288
Move StepEntity classes
HenrikSundell 0a62bf8
Remove default name for subway station entrances
HenrikSundell 528ab55
Add option to turn on osm subway entrances in osmDefaults
HenrikSundell 3e4ae96
Merge remote-tracking branch 'otp/dev-2.x' into station-entrances
HenrikSundell 401a405
Fix walk step generation
HenrikSundell 438bc31
Add step entity to graphql tests
HenrikSundell 97c2de6
Rename variables to match with graphql
HenrikSundell d844561
Rename variables
HenrikSundell 02a07ea
Rename function
HenrikSundell 5dc74dd
Fix comments
HenrikSundell 5d55646
Remove println
HenrikSundell d1067c6
Remove unnecessary imports
HenrikSundell 5c97ad1
Add accessibilty information to entrances
HenrikSundell e10e0a2
Use existing entrance class for walk steps
HenrikSundell 34761fe
Fix EntranceImpl
HenrikSundell c84b7cf
Add id to walk step entrances
HenrikSundell 2ea8a52
Remove old file
HenrikSundell 39b0db3
Fix otp version
HenrikSundell 3b6bf3f
Remove unused import
HenrikSundell 36be3dc
Merge remote-tracking branch 'otp/dev-2.x' into station-entrances
HenrikSundell c9df52d
Require entranceId
HenrikSundell 7a9a8f6
Rename methods
HenrikSundell c9139e3
Update dosumentation
HenrikSundell 7b21024
Update documentation
HenrikSundell ce7719c
Remove redundant null check
HenrikSundell b737411
Add feature union to steps
HenrikSundell f547e07
Return feature based on relativeDirection
HenrikSundell 18b84f0
Remove StepFeature class
HenrikSundell a327594
Merge remote-tracking branch 'upstream/dev-2.x' into station-entrances
leonardehrenfried 04d35b7
Clean up code a little
leonardehrenfried c4d665d
Reformat code and schema
leonardehrenfried bf89f49
Fix tests
leonardehrenfried 2eb0e7b
Add documentation
leonardehrenfried 4fd0f68
Merge remote-tracking branch 'upstream/dev-2.x' into station-entrances
leonardehrenfried 977d8eb
Clean up
leonardehrenfried b7cc6fd
Remove enum mapper test for REST API
leonardehrenfried e473061
Fix highway exits
leonardehrenfried 713143b
Use three states for accessibility
leonardehrenfried 0b6a74a
Update documentation
leonardehrenfried 5b12c7f
Update docs
leonardehrenfried 8c6fda4
Extract entrance from transit link
leonardehrenfried bd94b13
Add test for extracting entrance from pathway data
leonardehrenfried 74106b5
Update schema docs
leonardehrenfried 628bf95
Rename 'code' to 'publicCode'
leonardehrenfried 4248ffe
Fix mapping in Transmodel API
leonardehrenfried File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...on/src/main/java/org/opentripplanner/apis/transmodel/mapping/RelativeDirectionMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.opentripplanner.apis.transmodel.mapping; | ||
|
||
import org.opentripplanner.model.plan.RelativeDirection; | ||
|
||
/** | ||
* This mapper makes sure that only those values are returned which have a mapping in the Transmodel API, | ||
* as we don't really want to return all of them. | ||
*/ | ||
public class RelativeDirectionMapper { | ||
|
||
public static RelativeDirection map(RelativeDirection relativeDirection) { | ||
return switch (relativeDirection) { | ||
case DEPART, | ||
SLIGHTLY_LEFT, | ||
HARD_LEFT, | ||
LEFT, | ||
CONTINUE, | ||
SLIGHTLY_RIGHT, | ||
RIGHT, | ||
HARD_RIGHT, | ||
CIRCLE_CLOCKWISE, | ||
CIRCLE_COUNTERCLOCKWISE, | ||
ELEVATOR, | ||
UTURN_LEFT, | ||
UTURN_RIGHT -> relativeDirection; | ||
// for these the Transmodel API doesn't have a mapping. should it? | ||
case ENTER_STATION, | ||
EXIT_STATION, | ||
ENTER_OR_EXIT_STATION, | ||
FOLLOW_SIGNS -> RelativeDirection.CONTINUE; | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, didn't know this was possible.