-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add StreetDetailsService for storing level and incline information for edges
#6897
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
Open
VillePihlava
wants to merge
94
commits into
opentripplanner:dev-2.x
Choose a base branch
from
HSLdevcom:stairs-escalators-elevators-gtfs-graphql
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 89 commits
Commits
Show all changes
94 commits
Select commit
Hold shift + click to select a range
a480b5c
Add VerticalTransportationUse information to WalkStep.
VillePihlava 3ba6570
Add VerticalTransportationUse and related changes to GTFS GraphQL sch…
VillePihlava 42acfdc
Remove id from VerticalTransportationUse type.
VillePihlava ce37d29
Implement datafetcher functions.
VillePihlava 9276250
Remove id from VerticalTransportationUse.
VillePihlava 65564e8
Modify walk step building logic for escalators, elevators, and stairs.
VillePihlava 975503a
Add new enum logic.
VillePihlava 2d056cc
Small changes.
VillePihlava f761461
Fix enum value.
VillePihlava 6167768
Remove fields related to VerticalTransportationUse.
VillePihlava 19dcc00
Add initial implementation of OsmStreetDecoratorService and OsmStreet…
VillePihlava bbaff17
Add initial version of OsmStreetDecorator dagger logic.
VillePihlava 8873d2a
Change floorNumber to float in OsmLevel.
VillePihlava 2f31753
Add levelRef to OsmLevel.
VillePihlava 23791ae
Change default to null.
VillePihlava 98b0e3b
Add isStairs method to OsmWay.
VillePihlava f57232c
Change OSM level info processing.
VillePihlava 9941cc9
Add isInclineUp and isInclineDown functions.
VillePihlava c6d710e
Change OsmStreetDecorator methods.
VillePihlava 542e450
Fix format.
VillePihlava e105eab
Refactor OsmStreetDecoratorRepository.
VillePihlava e37ff1a
Add method getEdgeLevelInfo to OsmModule.
VillePihlava bab8499
Add matchesNodes function.
VillePihlava 5c1bf82
Refactor EscalatorProcessor.
VillePihlava faeea2e
Add level info to OsmStreetDecoratorRepository.
VillePihlava bcb5560
Change VerticalTransportationUse.
VillePihlava 11bcc46
Add OsmStreetDecoratorService to StatesToWalkStepsMapper.
VillePihlava 1640533
First version of vertical transportation use walk steps.
VillePihlava b908252
Change instanceof checks.
VillePihlava 2a7312e
Fix step building logic in StatesToWalkStepsMapper.
VillePihlava 42db4d4
Change comment.
VillePihlava 13cf55c
Change level tag parsing logic.
VillePihlava ba9adcb
Fix tests.
VillePihlava c8886f9
Change comment.
VillePihlava b44dcf7
Fix 'level:ref' parsing.
VillePihlava 89ed402
Make method more readable.
VillePihlava 7052b52
Create separate types for elevators, escalators and stairs in GTFS Gr…
VillePihlava bf6d213
Remove Nullable annotations from OsmStreetDecoratorService and OsmStr…
VillePihlava e22684f
Change tests so that OsmStreetDecoratorRepository or OsmStreetDecorat…
VillePihlava 027cc00
Add OsmStreetDecorator feature flag.
VillePihlava b3c9fe2
Merge branch 'dev-2.x' of github.com:opentripplanner/OpenTripPlanner …
VillePihlava 5d322ee
Change floorNumber to double in OsmLevel.
VillePihlava e1e5ad5
Small changes to tests.
VillePihlava 24705b5
Add tests for stairs and escalator to StatesToWalkStepsMapper.
VillePihlava 6a9eea6
Add testEdgeLevelInfo to OsmModuleTest.
VillePihlava 1f42423
Merge branch 'dev-2.x' of github.com:opentripplanner/OpenTripPlanner …
VillePihlava 8a43bc7
Fix test.
VillePihlava bcdd0a2
Fix typo.
VillePihlava 88b7bd4
Remove OsmStreetDecorator feature flag and replace it with build conf…
VillePihlava a989c4c
Use same instance of OsmStreetDecoratorRepository during graph build …
VillePihlava 8b02069
Merge branch 'dev-2.x' of github.com:opentripplanner/OpenTripPlanner …
VillePihlava 31aea91
Remove unused files.
VillePihlava 8e60fa2
Fix comment and change floorNumber to level.
VillePihlava 7c6ae2f
Abstract class for CouldNotApplyMultiLevelInfoToWay issue.
VillePihlava 01ecb8d
Remove unused files.
VillePihlava 0d742f6
Add Level type to GTFS GraphQL schema and rename InclineType to Verti…
VillePihlava ba38c21
Rename variables and methods.
VillePihlava 303879f
Move EdgeLevelInfo logic from OsmModule to EdgeLevelInfoProcessor.
VillePihlava bda76c5
Remove way.hasTag(incline) check.
VillePihlava c777d9d
Refactor storeLevelInfoForEdge.
VillePihlava 84d0cc0
Move null checks into record.
VillePihlava fc979ff
Change order of parameters.
VillePihlava 67d6ceb
Refactor EscalatorProcessor.
VillePihlava 31591ac
Fix links to file in comments.
VillePihlava 8cc9743
Fix comments.
VillePihlava 11bab26
Change isPresent check to isEmpty and change logic.
VillePihlava 1d95fa8
Refactor vertex variables to be private and create getter functions.
VillePihlava 87cabc6
Add documentation to EdgeLevelInfo and VertexLevelInfo.
VillePihlava 0fd5f81
Change matchesNodes function to canBeAppliedToEdge.
VillePihlava df1445d
Add testEdgeLevelInfoNotStoredWithoutIncludeEdgeLevelInfo test.
VillePihlava ff6aee2
Remove ElevatorUse.
VillePihlava 27775f3
Refactor OsmLevel equals method.
VillePihlava 0df449b
Refactor EdgeLevelInfo into class.
VillePihlava 2796b20
Add documentation for Level.
VillePihlava 1418b77
Refactor OsmStreetDecoratorService to StreetDetailsService.
VillePihlava 5eb9a3a
Refactor StatesToWalkStepsMapper.
VillePihlava f33b15d
Add serializeable to EdgeLevelInfo.
VillePihlava a5ee9bd
Refactor StatesToWalkStepsMapper and move logic into stepImpl.
VillePihlava a663e46
Change GTFS GraphQL schema documentation.
VillePihlava 89a904c
Remove nodeRefs size check.
VillePihlava b5caf13
Add NoopEdgeLevelInfoProcessor.
VillePihlava 2a779a6
Refactor EscalatorProcessor.
VillePihlava 4dbaf51
Merge branch 'dev-2.x' of github.com:opentripplanner/OpenTripPlanner …
VillePihlava 76303c7
Remove unnecessary newline.
VillePihlava 58f2b26
Refactor VerticalTransportationUse and related classes.
VillePihlava 1c2b09f
Change records to classes and refactor equals methods.
VillePihlava 9e6fe30
Add EscalatorUse and StairsUse to walk step GraphQLIntegrationTest.
VillePihlava 6772a0c
Apply review feedback.
VillePihlava b0e1458
Refactor VerticalTransportationUse generation into StatesToWalkStepsM…
VillePihlava 155b729
Change comment.
VillePihlava 0da7def
Add ContradictoryLevelAndInclineInfoForWay issue.
VillePihlava 6b61f33
Remove comment and seemingly unnecessary method call without test cov…
VillePihlava dd1843d
Merge branch 'dev-2.x' of github.com:opentripplanner/OpenTripPlanner …
VillePihlava b8b2a4d
Remove unnecessary code.
VillePihlava 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
This file contains hidden or 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 hidden or 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
35 changes: 35 additions & 0 deletions
35
application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/EscalatorUseImpl.java
This file contains hidden or 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,35 @@ | ||
| package org.opentripplanner.apis.gtfs.datafetchers; | ||
|
|
||
| import graphql.schema.DataFetcher; | ||
| import org.opentripplanner.apis.gtfs.generated.GraphQLDataFetchers; | ||
| import org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLVerticalDirection; | ||
| import org.opentripplanner.apis.gtfs.mapping.VerticalDirectionMapper; | ||
| import org.opentripplanner.model.plan.walkstep.verticaltransportation.EscalatorUse; | ||
| import org.opentripplanner.service.streetdetails.model.Level; | ||
|
|
||
| public class EscalatorUseImpl implements GraphQLDataFetchers.GraphQLEscalatorUse { | ||
|
|
||
| @Override | ||
| public DataFetcher<Level> from() { | ||
| return environment -> { | ||
| EscalatorUse escalatorUse = environment.getSource(); | ||
| return escalatorUse.from(); | ||
| }; | ||
| } | ||
|
|
||
| @Override | ||
| public DataFetcher<Level> to() { | ||
| return environment -> { | ||
| EscalatorUse escalatorUse = environment.getSource(); | ||
| return escalatorUse.to(); | ||
| }; | ||
| } | ||
|
|
||
| @Override | ||
| public DataFetcher<GraphQLVerticalDirection> verticalDirection() { | ||
| return environment -> { | ||
| EscalatorUse escalatorUse = environment.getSource(); | ||
| return VerticalDirectionMapper.map(escalatorUse.verticalDirection()); | ||
| }; | ||
| } | ||
| } |
35 changes: 35 additions & 0 deletions
35
application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/StairsUseImpl.java
This file contains hidden or 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,35 @@ | ||
| package org.opentripplanner.apis.gtfs.datafetchers; | ||
|
|
||
| import graphql.schema.DataFetcher; | ||
| import org.opentripplanner.apis.gtfs.generated.GraphQLDataFetchers; | ||
| import org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLVerticalDirection; | ||
| import org.opentripplanner.apis.gtfs.mapping.VerticalDirectionMapper; | ||
| import org.opentripplanner.model.plan.walkstep.verticaltransportation.StairsUse; | ||
| import org.opentripplanner.service.streetdetails.model.Level; | ||
|
|
||
| public class StairsUseImpl implements GraphQLDataFetchers.GraphQLStairsUse { | ||
|
|
||
| @Override | ||
| public DataFetcher<Level> from() { | ||
| return environment -> { | ||
| StairsUse stairsUse = environment.getSource(); | ||
| return stairsUse.from(); | ||
| }; | ||
| } | ||
|
|
||
| @Override | ||
| public DataFetcher<Level> to() { | ||
| return environment -> { | ||
| StairsUse stairsUse = environment.getSource(); | ||
| return stairsUse.to(); | ||
| }; | ||
| } | ||
|
|
||
| @Override | ||
| public DataFetcher<GraphQLVerticalDirection> verticalDirection() { | ||
| return environment -> { | ||
| StairsUse stairsUse = environment.getSource(); | ||
| return VerticalDirectionMapper.map(stairsUse.verticalDirection()); | ||
| }; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
14 changes: 14 additions & 0 deletions
14
application/src/main/java/org/opentripplanner/apis/gtfs/mapping/VerticalDirectionMapper.java
This file contains hidden or 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,14 @@ | ||
| package org.opentripplanner.apis.gtfs.mapping; | ||
|
|
||
| import org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLVerticalDirection; | ||
| import org.opentripplanner.model.plan.walkstep.verticaltransportation.VerticalDirection; | ||
|
|
||
| public class VerticalDirectionMapper { | ||
|
|
||
| public static GraphQLVerticalDirection map(VerticalDirection verticalDirection) { | ||
| return switch (verticalDirection) { | ||
| case DOWN -> GraphQLVerticalDirection.DOWN; | ||
| case UP -> GraphQLVerticalDirection.UP; | ||
| }; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.