-
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
base: dev-2.x
Are you sure you want to change the base?
Add StreetDetailsService for storing level and incline information for edges
#6897
Conversation
…DecoratorRepository.
…into stairs-escalators-elevators-gtfs-graphql
...tripplanner/model/plan/walkstep/verticaltransportation/VerticalTransportationUseFactory.java
Outdated
Show resolved
Hide resolved
...tripplanner/model/plan/walkstep/verticaltransportation/VerticalTransportationUseFactory.java
Outdated
Show resolved
Hide resolved
...tripplanner/model/plan/walkstep/verticaltransportation/VerticalTransportationUseFactory.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/stepImpl.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/service/streetdetails/model/Level.java
Outdated
Show resolved
Hide resolved
OsmStreetDecoratorService for storing level and incline information for edgesStreetDetailsService for storing level and incline information for edges
optionsome
left a comment
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.
Could you try adding GraphQL integration tests for the new features?
done |
application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/stepImpl.java
Outdated
Show resolved
Hide resolved
...a/org/opentripplanner/graph_builder/module/osm/edgelevelinfo/NoopEdgeLevelInfoProcessor.java
Outdated
Show resolved
Hide resolved
application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/stepImpl.java
Outdated
Show resolved
Hide resolved
leonardehrenfried
left a comment
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.
I probably missed something, but I would like to know why half the features are created in the WalkStepMapper and the other half isn't.
Let's discuss in the dev meeting.
…into stairs-escalators-elevators-gtfs-graphql
| if (verticalTransportationUse instanceof EscalatorUse escalatorUse) { | ||
| return escalatorUse; | ||
| } else if (verticalTransportationUse instanceof StairsUse stairsUse) { | ||
| return stairsUse; |
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.
You could still use the switch here. On the other hand, are these ifs even necessary, could you just return verticalTransportationUse? The StepFeatureTypeResolver should handle the supported types.
Summary
This PR adds the
StreetDetailsServicewhich is used for storing level and incline information for edges. A build config field is provided to enable/disable storing level and incline info. This PR also adds info about stairs, escalators, and elevators to the walksteps of a leg of the GTFS GraphQL API.I also did some refactoring where I felt it was necessary, e.g. in
EscalatorProcessorandOsmModule.Issue
Closes #6829
Unit tests
New tests:
Documentation