Skip to content
Open
Show file tree
Hide file tree
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 Sep 1, 2025
3ba6570
Add VerticalTransportationUse and related changes to GTFS GraphQL sch…
VillePihlava Sep 1, 2025
42acfdc
Remove id from VerticalTransportationUse type.
VillePihlava Sep 2, 2025
ce37d29
Implement datafetcher functions.
VillePihlava Sep 2, 2025
9276250
Remove id from VerticalTransportationUse.
VillePihlava Sep 2, 2025
65564e8
Modify walk step building logic for escalators, elevators, and stairs.
VillePihlava Sep 2, 2025
975503a
Add new enum logic.
VillePihlava Sep 2, 2025
2d056cc
Small changes.
VillePihlava Sep 2, 2025
f761461
Fix enum value.
VillePihlava Sep 2, 2025
6167768
Remove fields related to VerticalTransportationUse.
VillePihlava Sep 2, 2025
19dcc00
Add initial implementation of OsmStreetDecoratorService and OsmStreet…
VillePihlava Sep 10, 2025
bbaff17
Add initial version of OsmStreetDecorator dagger logic.
VillePihlava Sep 10, 2025
8873d2a
Change floorNumber to float in OsmLevel.
VillePihlava Sep 12, 2025
2f31753
Add levelRef to OsmLevel.
VillePihlava Sep 12, 2025
23791ae
Change default to null.
VillePihlava Sep 19, 2025
98b0e3b
Add isStairs method to OsmWay.
VillePihlava Sep 22, 2025
f57232c
Change OSM level info processing.
VillePihlava Sep 22, 2025
9941cc9
Add isInclineUp and isInclineDown functions.
VillePihlava Sep 22, 2025
c6d710e
Change OsmStreetDecorator methods.
VillePihlava Sep 22, 2025
542e450
Fix format.
VillePihlava Sep 22, 2025
e105eab
Refactor OsmStreetDecoratorRepository.
VillePihlava Sep 22, 2025
e37ff1a
Add method getEdgeLevelInfo to OsmModule.
VillePihlava Sep 22, 2025
bab8499
Add matchesNodes function.
VillePihlava Sep 23, 2025
5c1bf82
Refactor EscalatorProcessor.
VillePihlava Sep 23, 2025
faeea2e
Add level info to OsmStreetDecoratorRepository.
VillePihlava Sep 23, 2025
bcb5560
Change VerticalTransportationUse.
VillePihlava Sep 23, 2025
11bcc46
Add OsmStreetDecoratorService to StatesToWalkStepsMapper.
VillePihlava Sep 24, 2025
1640533
First version of vertical transportation use walk steps.
VillePihlava Sep 24, 2025
b908252
Change instanceof checks.
VillePihlava Sep 24, 2025
2a7312e
Fix step building logic in StatesToWalkStepsMapper.
VillePihlava Sep 25, 2025
42db4d4
Change comment.
VillePihlava Sep 25, 2025
13cf55c
Change level tag parsing logic.
VillePihlava Sep 25, 2025
ba9adcb
Fix tests.
VillePihlava Sep 25, 2025
c8886f9
Change comment.
VillePihlava Sep 30, 2025
b44dcf7
Fix 'level:ref' parsing.
VillePihlava Sep 30, 2025
89ed402
Make method more readable.
VillePihlava Oct 1, 2025
7052b52
Create separate types for elevators, escalators and stairs in GTFS Gr…
VillePihlava Oct 1, 2025
bf6d213
Remove Nullable annotations from OsmStreetDecoratorService and OsmStr…
VillePihlava Oct 1, 2025
e22684f
Change tests so that OsmStreetDecoratorRepository or OsmStreetDecorat…
VillePihlava Oct 2, 2025
027cc00
Add OsmStreetDecorator feature flag.
VillePihlava Oct 2, 2025
b3c9fe2
Merge branch 'dev-2.x' of github.com:opentripplanner/OpenTripPlanner …
VillePihlava Oct 3, 2025
5d322ee
Change floorNumber to double in OsmLevel.
VillePihlava Oct 3, 2025
e1e5ad5
Small changes to tests.
VillePihlava Oct 3, 2025
24705b5
Add tests for stairs and escalator to StatesToWalkStepsMapper.
VillePihlava Oct 3, 2025
6a9eea6
Add testEdgeLevelInfo to OsmModuleTest.
VillePihlava Oct 6, 2025
1f42423
Merge branch 'dev-2.x' of github.com:opentripplanner/OpenTripPlanner …
VillePihlava Oct 6, 2025
8a43bc7
Fix test.
VillePihlava Oct 6, 2025
bcdd0a2
Fix typo.
VillePihlava Oct 14, 2025
88b7bd4
Remove OsmStreetDecorator feature flag and replace it with build conf…
VillePihlava Oct 15, 2025
a989c4c
Use same instance of OsmStreetDecoratorRepository during graph build …
VillePihlava Oct 15, 2025
8b02069
Merge branch 'dev-2.x' of github.com:opentripplanner/OpenTripPlanner …
VillePihlava Oct 15, 2025
31aea91
Remove unused files.
VillePihlava Oct 15, 2025
8e60fa2
Fix comment and change floorNumber to level.
VillePihlava Oct 15, 2025
7c6ae2f
Abstract class for CouldNotApplyMultiLevelInfoToWay issue.
VillePihlava Oct 15, 2025
01ecb8d
Remove unused files.
VillePihlava Oct 15, 2025
0d742f6
Add Level type to GTFS GraphQL schema and rename InclineType to Verti…
VillePihlava Oct 21, 2025
ba38c21
Rename variables and methods.
VillePihlava Oct 21, 2025
303879f
Move EdgeLevelInfo logic from OsmModule to EdgeLevelInfoProcessor.
VillePihlava Oct 21, 2025
bda76c5
Remove way.hasTag(incline) check.
VillePihlava Oct 21, 2025
c777d9d
Refactor storeLevelInfoForEdge.
VillePihlava Oct 21, 2025
84d0cc0
Move null checks into record.
VillePihlava Oct 21, 2025
fc979ff
Change order of parameters.
VillePihlava Oct 21, 2025
67d6ceb
Refactor EscalatorProcessor.
VillePihlava Oct 21, 2025
31591ac
Fix links to file in comments.
VillePihlava Oct 22, 2025
8cc9743
Fix comments.
VillePihlava Oct 22, 2025
11bab26
Change isPresent check to isEmpty and change logic.
VillePihlava Oct 22, 2025
1d95fa8
Refactor vertex variables to be private and create getter functions.
VillePihlava Oct 22, 2025
87cabc6
Add documentation to EdgeLevelInfo and VertexLevelInfo.
VillePihlava Oct 22, 2025
0fd5f81
Change matchesNodes function to canBeAppliedToEdge.
VillePihlava Oct 22, 2025
df1445d
Add testEdgeLevelInfoNotStoredWithoutIncludeEdgeLevelInfo test.
VillePihlava Oct 22, 2025
ff6aee2
Remove ElevatorUse.
VillePihlava Oct 22, 2025
27775f3
Refactor OsmLevel equals method.
VillePihlava Oct 24, 2025
0df449b
Refactor EdgeLevelInfo into class.
VillePihlava Oct 24, 2025
2796b20
Add documentation for Level.
VillePihlava Oct 24, 2025
1418b77
Refactor OsmStreetDecoratorService to StreetDetailsService.
VillePihlava Oct 24, 2025
5eb9a3a
Refactor StatesToWalkStepsMapper.
VillePihlava Oct 24, 2025
f33b15d
Add serializeable to EdgeLevelInfo.
VillePihlava Oct 24, 2025
a5ee9bd
Refactor StatesToWalkStepsMapper and move logic into stepImpl.
VillePihlava Oct 27, 2025
a663e46
Change GTFS GraphQL schema documentation.
VillePihlava Oct 27, 2025
89a904c
Remove nodeRefs size check.
VillePihlava Oct 27, 2025
b5caf13
Add NoopEdgeLevelInfoProcessor.
VillePihlava Oct 27, 2025
2a779a6
Refactor EscalatorProcessor.
VillePihlava Oct 27, 2025
4dbaf51
Merge branch 'dev-2.x' of github.com:opentripplanner/OpenTripPlanner …
VillePihlava Oct 27, 2025
76303c7
Remove unnecessary newline.
VillePihlava Oct 27, 2025
58f2b26
Refactor VerticalTransportationUse and related classes.
VillePihlava Oct 28, 2025
1c2b09f
Change records to classes and refactor equals methods.
VillePihlava Oct 28, 2025
9e6fe30
Add EscalatorUse and StairsUse to walk step GraphQLIntegrationTest.
VillePihlava Oct 30, 2025
6772a0c
Apply review feedback.
VillePihlava Nov 4, 2025
b0e1458
Refactor VerticalTransportationUse generation into StatesToWalkStepsM…
VillePihlava Nov 7, 2025
155b729
Change comment.
VillePihlava Nov 7, 2025
0da7def
Add ContradictoryLevelAndInclineInfoForWay issue.
VillePihlava Nov 7, 2025
6b61f33
Remove comment and seemingly unnecessary method call without test cov…
VillePihlava Nov 7, 2025
dd1843d
Merge branch 'dev-2.x' of github.com:opentripplanner/OpenTripPlanner …
VillePihlava Nov 7, 2025
b8b2a4d
Remove unnecessary code.
VillePihlava Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.opentripplanner.routing.algorithm.mapping.GraphPathToItineraryMapper;
import org.opentripplanner.routing.graph.Graph;
import org.opentripplanner.routing.graphfinder.NearbyStop;
import org.opentripplanner.service.streetdetails.StreetDetailsService;
import org.opentripplanner.street.model.vertex.TransitStopVertex;
import org.opentripplanner.transit.api.request.TripRequest;
import org.opentripplanner.transit.model.filter.expr.Matcher;
Expand Down Expand Up @@ -61,6 +62,7 @@ public class FlexRouter {
public FlexRouter(
Graph graph,
TransitService transitService,
StreetDetailsService streetDetailsService,
FlexParameters flexParameters,
TripRequest filterRequest,
Instant requestedTime,
Expand All @@ -85,6 +87,7 @@ public FlexRouter(
transitService::getRegularStop,
transitService.getTimeZone(),
graph.streetNotesService,
streetDetailsService,
graph.ellipsoidToGeoidDifference
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.opentripplanner.apis.gtfs.datafetchers.DepartureRowImpl;
import org.opentripplanner.apis.gtfs.datafetchers.DependentFareProductImpl;
import org.opentripplanner.apis.gtfs.datafetchers.EntranceImpl;
import org.opentripplanner.apis.gtfs.datafetchers.EscalatorUseImpl;
import org.opentripplanner.apis.gtfs.datafetchers.EstimatedTimeImpl;
import org.opentripplanner.apis.gtfs.datafetchers.FareProductTypeResolver;
import org.opentripplanner.apis.gtfs.datafetchers.FareProductUseImpl;
Expand Down Expand Up @@ -54,6 +55,7 @@
import org.opentripplanner.apis.gtfs.datafetchers.RouteImpl;
import org.opentripplanner.apis.gtfs.datafetchers.RouteTypeImpl;
import org.opentripplanner.apis.gtfs.datafetchers.RoutingErrorImpl;
import org.opentripplanner.apis.gtfs.datafetchers.StairsUseImpl;
import org.opentripplanner.apis.gtfs.datafetchers.StepFeatureTypeResolver;
import org.opentripplanner.apis.gtfs.datafetchers.StopCallImpl;
import org.opentripplanner.apis.gtfs.datafetchers.StopGeometriesImpl;
Expand Down Expand Up @@ -208,6 +210,8 @@ public static GraphQLSchema createSchema() {
.type(typeWiring.build(EstimatedTimeImpl.class))
.type(typeWiring.build(EntranceImpl.class))
.type(typeWiring.build(RentalVehicleFuelImpl.class))
.type(typeWiring.build(EscalatorUseImpl.class))
.type(typeWiring.build(StairsUseImpl.class))
.build();

SchemaGenerator schemaGenerator = new SchemaGenerator();
Expand Down
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());
};
}
}
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());
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import graphql.schema.GraphQLObjectType;
import graphql.schema.GraphQLSchema;
import graphql.schema.TypeResolver;
import org.opentripplanner.model.plan.walkstep.verticaltransportation.EscalatorUse;
import org.opentripplanner.model.plan.walkstep.verticaltransportation.StairsUse;
import org.opentripplanner.transit.model.site.Entrance;

public class StepFeatureTypeResolver implements TypeResolver {
Expand All @@ -15,6 +17,10 @@ public GraphQLObjectType getType(TypeResolutionEnvironment environment) {

if (o instanceof Entrance) {
return schema.getObjectType("Entrance");
} else if (o instanceof EscalatorUse) {
return schema.getObjectType("EscalatorUse");
} else if (o instanceof StairsUse) {
return schema.getObjectType("StairsUse");
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
import org.opentripplanner.apis.gtfs.mapping.StreetNoteMapper;
import org.opentripplanner.model.plan.leg.ElevationProfile.Step;
import org.opentripplanner.model.plan.walkstep.WalkStep;
import org.opentripplanner.model.plan.walkstep.verticaltransportation.EscalatorUse;
import org.opentripplanner.model.plan.walkstep.verticaltransportation.StairsUse;
import org.opentripplanner.model.plan.walkstep.verticaltransportation.VerticalTransportationUse;
import org.opentripplanner.routing.alertpatch.TransitAlert;

public class stepImpl implements GraphQLDataFetchers.GraphQLStep {
Expand Down Expand Up @@ -57,7 +60,22 @@ public DataFetcher<String> exit() {

@Override
public DataFetcher<Object> feature() {
return environment -> getSource(environment).entrance().orElse(null);
return environment -> {
WalkStep walkStep = getSource(environment);
if (walkStep.entrance().isPresent()) {
return walkStep.entrance().get();
} else if (walkStep.verticalTransportationUse().isPresent()) {
VerticalTransportationUse verticalTransportationUse = walkStep
.verticalTransportationUse()
.get();
if (verticalTransportationUse instanceof EscalatorUse escalatorUse) {
return escalatorUse;
} else if (verticalTransportationUse instanceof StairsUse stairsUse) {
return stairsUse;
}
}
return null;
};
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLRelativeDirection;
import org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLRoutingErrorCode;
import org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLTransitMode;
import org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLVerticalDirection;
import org.opentripplanner.apis.gtfs.model.CallRealTime;
import org.opentripplanner.apis.gtfs.model.CallSchedule;
import org.opentripplanner.apis.gtfs.model.CallScheduledTime;
Expand Down Expand Up @@ -54,6 +55,7 @@
import org.opentripplanner.routing.graphfinder.PlaceAtDistance;
import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle;
import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle.StopRelationship;
import org.opentripplanner.service.streetdetails.model.Level;
import org.opentripplanner.service.vehicleparking.model.VehicleParking;
import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces;
import org.opentripplanner.service.vehicleparking.model.VehicleParkingState;
Expand Down Expand Up @@ -389,6 +391,13 @@ public interface GraphQLDepartureRow {
public DataFetcher<Iterable<TripTimeOnDate>> stoptimes();
}

/**
* A (possibly discounted) fare product that requires another fare product to be purchased previously
* in order to be valid.
*
* For example, when taking the train into a city, you might get a discounted "transfer fare" when
* switching to the bus for the second leg.
*/
public interface GraphQLDependentFareProduct {
public DataFetcher<Iterable<FareOffer>> dependencies();

Expand Down Expand Up @@ -420,6 +429,15 @@ public interface GraphQLEntrance {
> wheelchairAccessible();
}

/** A single use of an escalator. */
public interface GraphQLEscalatorUse {
public DataFetcher<Level> from();

public DataFetcher<Level> to();

public DataFetcher<GraphQLVerticalDirection> verticalDirection();
}

/** Real-time estimates for an arrival or departure at a certain place. */
public interface GraphQLEstimatedTime {
public DataFetcher<java.time.Duration> delay();
Expand Down Expand Up @@ -614,6 +632,13 @@ public interface GraphQLLegTime {
public DataFetcher<java.time.OffsetDateTime> scheduledTime();
}

/** A level with a name and comparable number. Levels can sometimes contain half levels, e.g. '1.5'. */
public interface GraphQLLevel {
public DataFetcher<Double> level();

public DataFetcher<String> name();
}

/** A span of time. */
public interface GraphQLLocalTimeSpan {
public DataFetcher<Integer> from();
Expand Down Expand Up @@ -642,7 +667,7 @@ public interface GraphQLLocation {
}

/**
* A group of fixed stops that are visited in an arbitrary order.
* A group of fixed stops that is visited in an arbitrary order.
*
* This is mostly used by demand-responsive services.
*/
Expand Down Expand Up @@ -1099,6 +1124,15 @@ public interface GraphQLRoutingError {
public DataFetcher<GraphQLInputField> inputField();
}

/** A single use of a set of stairs. */
public interface GraphQLStairsUse {
public DataFetcher<Level> from();

public DataFetcher<Level> to();

public DataFetcher<GraphQLVerticalDirection> verticalDirection();
}

/** A feature for a step */
public interface GraphQLStepFeature extends TypeResolver {}

Expand Down Expand Up @@ -1281,7 +1315,7 @@ public interface GraphQLTicketType {
public DataFetcher<Iterable<String>> zones();
}

/** A time window when a vehicle visit a stop, area or group of stops. */
/** A time window when a vehicle visits a stop, area or group of stops. */
public interface GraphQLTimeWindow {
public DataFetcher<java.time.OffsetDateTime> end();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,15 @@ public void setGraphQLFilter(GraphQLDependentFareProductFilter filter) {
}
}

/**
* Dependent fare products can lead to many combinations of fares, however it is often not useful
* information to the passenger.
*
* This enum allows filtering of the dependencies.
*
* Since it is recognised that this is not covered well in the specification, it is discussed here:
* https://github.com/google/transit/pull/423
*/
public enum GraphQLDependentFareProductFilter {
ALL,
MATCH_CATEGORY_AND_MEDIUM,
Expand Down Expand Up @@ -4452,6 +4461,7 @@ public enum GraphQLRelativeDirection {
DEPART,
ELEVATOR,
ENTER_STATION,
ESCALATOR,
EXIT_STATION,
FOLLOW_SIGNS,
HARD_LEFT,
Expand All @@ -4460,6 +4470,7 @@ public enum GraphQLRelativeDirection {
RIGHT,
SLIGHTLY_LEFT,
SLIGHTLY_RIGHT,
STAIRS,
UTURN_LEFT,
UTURN_RIGHT,
}
Expand Down Expand Up @@ -5683,6 +5694,12 @@ public enum GraphQLVertexType {
TRANSIT,
}

/** The vertical direction e.g. for a set of stairs. */
public enum GraphQLVerticalDirection {
DOWN,
UP,
}

public static class GraphQLWalkPreferencesInput {

private org.opentripplanner.framework.model.Cost boardCost;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ config:
Itinerary: org.opentripplanner.model.plan.Itinerary#Itinerary
Leg: org.opentripplanner.model.plan.Leg#Leg
LegTime: org.opentripplanner.model.plan.leg.LegCallTime#LegCallTime
Level: org.opentripplanner.service.streetdetails.model.Level#Level
Mode: String
OccupancyStatus: org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLOccupancyStatus#GraphQLOccupancyStatus
TransitMode: org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLTransitMode#GraphQLTransitMode
Expand Down Expand Up @@ -112,6 +113,7 @@ config:
VehicleParkingSpaces: org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces#VehicleParkingSpaces
VehicleParkingState: org.opentripplanner.service.vehicleparking.model.VehicleParkingState#VehicleParkingState
VertexType: String
VerticalDirection: org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLVerticalDirection#GraphQLVerticalDirection
SystemNotice: org.opentripplanner.model.SystemNotice#SystemNotice
VehiclePosition: org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle#RealtimeVehicle
StopRelationship: org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle.StopRelationship#StopRelationship
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public static GraphQLRelativeDirection map(RelativeDirection relativeDirection)
case CIRCLE_CLOCKWISE -> GraphQLRelativeDirection.CIRCLE_CLOCKWISE;
case CIRCLE_COUNTERCLOCKWISE -> GraphQLRelativeDirection.CIRCLE_COUNTERCLOCKWISE;
case ELEVATOR -> GraphQLRelativeDirection.ELEVATOR;
case ESCALATOR -> GraphQLRelativeDirection.ESCALATOR;
case STAIRS -> GraphQLRelativeDirection.STAIRS;
case UTURN_LEFT -> GraphQLRelativeDirection.UTURN_LEFT;
case UTURN_RIGHT -> GraphQLRelativeDirection.UTURN_RIGHT;
case ENTER_STATION -> GraphQLRelativeDirection.ENTER_STATION;
Expand Down
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;
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public static RelativeDirection map(RelativeDirection relativeDirection) {
CIRCLE_CLOCKWISE,
CIRCLE_COUNTERCLOCKWISE,
ELEVATOR,
ESCALATOR,
STAIRS,
UTURN_LEFT,
UTURN_RIGHT,
ENTER_STATION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ public class EnumTypes {
.value("circleClockwise", RelativeDirection.CIRCLE_CLOCKWISE)
.value("circleCounterclockwise", RelativeDirection.CIRCLE_COUNTERCLOCKWISE)
.value("elevator", RelativeDirection.ELEVATOR)
.value("escalator", RelativeDirection.ESCALATOR)
.value("stairs", RelativeDirection.STAIRS)
.value("uturnLeft", RelativeDirection.UTURN_LEFT)
.value("uturnRight", RelativeDirection.UTURN_RIGHT)
.value("enterStation", RelativeDirection.ENTER_STATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.opentripplanner.routing.fares.FareServiceFactory;
import org.opentripplanner.routing.graph.Graph;
import org.opentripplanner.service.osminfo.OsmInfoGraphBuildRepository;
import org.opentripplanner.service.streetdetails.StreetDetailsRepository;
import org.opentripplanner.service.vehicleparking.VehicleParkingRepository;
import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository;
import org.opentripplanner.standalone.config.BuildConfig;
Expand Down Expand Up @@ -75,6 +76,7 @@ public static GraphBuilder create(
GraphBuilderDataSources dataSources,
Graph graph,
OsmInfoGraphBuildRepository osmInfoGraphBuildRepository,
StreetDetailsRepository streetDetailsRepository,
FareServiceFactory fareServiceFactory,
TimetableRepository timetableRepository,
WorldEnvelopeRepository worldEnvelopeRepository,
Expand All @@ -98,6 +100,7 @@ public static GraphBuilder create(
.config(config)
.graph(graph)
.osmInfoGraphBuildRepository(osmInfoGraphBuildRepository)
.streetDetailsRepository(streetDetailsRepository)
.timetableRepository(timetableRepository)
.worldEnvelopeRepository(worldEnvelopeRepository)
.vehicleParkingRepository(vehicleParkingService)
Expand Down
Loading