From 124f58956014f92fadc3887c3a194f9dd36b9769 Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Thu, 10 Oct 2024 16:28:11 +0100 Subject: [PATCH 001/169] add previousLegs into GTFS GraphQL API --- .../apis/gtfs/datafetchers/LegImpl.java | 11 +++- .../gtfs/generated/GraphQLDataFetchers.java | 11 ++++ .../apis/gtfs/generated/GraphQLTypes.java | 64 +++++++++++++++++++ .../opentripplanner/apis/gtfs/schema.graphqls | 18 ++++++ 4 files changed, 103 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java b/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java index 9ec83a4bf67..2fd9220cae5 100644 --- a/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java +++ b/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java @@ -271,8 +271,17 @@ private Leg getSource(DataFetchingEnvironment environment) { return environment.getSource(); } + @Override + public DataFetcher> previousLegs() { + return nextOrPreviousLegs(true); + } + @Override public DataFetcher> nextLegs() { + return nextOrPreviousLegs(false); + } + + private DataFetcher> nextOrPreviousLegs(boolean includeDepartBefore) { return environment -> { if (environment.getSource() instanceof ScheduledTransitLeg originalLeg) { var args = new GraphQLTypes.GraphQLLegNextLegsArgs(environment.getArguments()); @@ -307,7 +316,7 @@ public DataFetcher> nextLegs() { environment.getSource(), numberOfLegs, environment.getContext().transitService(), - false, + includeDepartBefore, AlternativeLegsFilter.NO_FILTER, limitToExactOriginStop, limitToExactDestinationStop diff --git a/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index 67944543580..d39be5ed728 100644 --- a/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -1,9 +1,11 @@ //THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; +import graphql.relay.Connection; import graphql.relay.Connection; import graphql.relay.DefaultEdge; import graphql.relay.Edge; +import graphql.relay.Edge; import graphql.schema.DataFetcher; import graphql.schema.TypeResolver; import java.util.Currency; @@ -24,8 +26,12 @@ import org.opentripplanner.apis.gtfs.model.FeedPublisher; import org.opentripplanner.apis.gtfs.model.PlanPageInfo; import org.opentripplanner.apis.gtfs.model.RideHailingProvider; +import org.opentripplanner.apis.gtfs.model.RouteTypeModel; +import org.opentripplanner.apis.gtfs.model.StopOnRouteModel; +import org.opentripplanner.apis.gtfs.model.StopOnTripModel; import org.opentripplanner.apis.gtfs.model.StopPosition; import org.opentripplanner.apis.gtfs.model.TripOccupancy; +import org.opentripplanner.apis.gtfs.model.UnknownModel; import org.opentripplanner.ext.fares.model.FareRuleSet; import org.opentripplanner.ext.ridehailing.model.RideEstimate; import org.opentripplanner.model.StopTimesInPattern; @@ -48,6 +54,8 @@ import org.opentripplanner.routing.graphfinder.PatternAtStop; import org.opentripplanner.routing.graphfinder.PlaceAtDistance; import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.routing.vehicle_parking.VehicleParking; import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; @@ -58,6 +66,7 @@ import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; +import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; import org.opentripplanner.service.vehiclerental.model.VehicleRentalSystem; import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; import org.opentripplanner.transit.model.basic.Money; @@ -500,6 +509,8 @@ public interface GraphQLLeg { public DataFetcher pickupType(); + public DataFetcher> previousLegs(); + public DataFetcher realTime(); public DataFetcher realtimeState(); diff --git a/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index 67051444cdf..ed9c25ae5f3 100644 --- a/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -1,6 +1,7 @@ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -1268,6 +1269,69 @@ public void setGraphQLOriginModesWithParentStation( } } + public static class GraphQLLegPreviousLegsArgs { + + private List destinationModesWithParentStation; + private Integer numberOfLegs; + private List originModesWithParentStation; + + public GraphQLLegPreviousLegsArgs(Map args) { + if (args != null) { + if (args.get("destinationModesWithParentStation") != null) { + this.destinationModesWithParentStation = + ((List) args.get("destinationModesWithParentStation")).stream() + .map(item -> + item instanceof GraphQLTransitMode + ? item + : GraphQLTransitMode.valueOf((String) item) + ) + .map(GraphQLTransitMode.class::cast) + .collect(Collectors.toList()); + } + this.numberOfLegs = (Integer) args.get("numberOfLegs"); + if (args.get("originModesWithParentStation") != null) { + this.originModesWithParentStation = + ((List) args.get("originModesWithParentStation")).stream() + .map(item -> + item instanceof GraphQLTransitMode + ? item + : GraphQLTransitMode.valueOf((String) item) + ) + .map(GraphQLTransitMode.class::cast) + .collect(Collectors.toList()); + } + } + } + + public List getGraphQLDestinationModesWithParentStation() { + return this.destinationModesWithParentStation; + } + + public Integer getGraphQLNumberOfLegs() { + return this.numberOfLegs; + } + + public List getGraphQLOriginModesWithParentStation() { + return this.originModesWithParentStation; + } + + public void setGraphQLDestinationModesWithParentStation( + List destinationModesWithParentStation + ) { + this.destinationModesWithParentStation = destinationModesWithParentStation; + } + + public void setGraphQLNumberOfLegs(Integer numberOfLegs) { + this.numberOfLegs = numberOfLegs; + } + + public void setGraphQLOriginModesWithParentStation( + List originModesWithParentStation + ) { + this.originModesWithParentStation = originModesWithParentStation; + } + } + public static class GraphQLLocalDateRangeInput { private java.time.LocalDate end; diff --git a/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index 927af19f8b1..90b40cfe9a6 100644 --- a/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -717,6 +717,24 @@ type Leg { pickupBookingInfo: BookingInfo "This is used to indicate if boarding this leg is possible only with special arrangements." pickupType: PickupDropoffType + "Previous legs with same origin and destination stops or stations" + previousLegs( + """ + Transportation modes for which all stops in the parent station are used as possible destination stops + for the previous legs. For modes not listed, only the exact destination stop of the leg is considered. + """ + destinationModesWithParentStation: [TransitMode!], + """ + The number of alternative legs searched. If fewer than the requested number are found, + then only the found legs are returned. + """ + numberOfLegs: Int!, + """ + Transportation modes for which all stops in the parent station are used as possible origin stops + for the previous legs. For modes not listed, only the exact origin stop of the leg is considered. + """ + originModesWithParentStation: [TransitMode!] + ): [Leg!] "Whether there is real-time data about this Leg" realTime: Boolean "State of real-time data" From e86996257b4729ec66e2df6f2c9356c4f2b100dc Mon Sep 17 00:00:00 2001 From: Zsombor Welker Date: Mon, 21 Nov 2022 12:05:36 +0100 Subject: [PATCH 002/169] Include serviceDate in realtime update logging --- .../updater/trip/TimetableSnapshotSource.java | 131 +++++++++++++----- 1 file changed, 100 insertions(+), 31 deletions(-) diff --git a/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java b/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java index 6273de676b5..b7c6e0122ad 100644 --- a/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java +++ b/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java @@ -172,7 +172,7 @@ public UpdateResult applyTripUpdates( int uIndex = 0; for (TripUpdate tripUpdate : updates) { if (!tripUpdate.hasTrip()) { - debug(feedId, "", "Missing TripDescriptor in gtfs-rt trip update: \n{}", tripUpdate); + debug(feedId, "Missing TripDescriptor in gtfs-rt trip update: \n{}", tripUpdate); continue; } @@ -184,7 +184,7 @@ public UpdateResult applyTripUpdates( final TripDescriptor tripDescriptor = tripUpdate.getTrip(); if (!tripDescriptor.hasTripId() || tripDescriptor.getTripId().isBlank()) { - debug(feedId, "", "No trip id found for gtfs-rt trip update: \n{}", tripUpdate); + debug(feedId, "No trip id found for gtfs-rt trip update: \n{}", tripUpdate); results.add(Result.failure(UpdateError.noTripId(INVALID_INPUT_STRUCTURE))); continue; } @@ -198,6 +198,7 @@ public UpdateResult applyTripUpdates( } catch (final ParseException e) { debug( tripId, + null, "Failed to parse start date in gtfs-rt trip update: {}", tripDescriptor.getStartDate() ); @@ -264,7 +265,7 @@ public UpdateResult applyTripUpdates( results.add(result); if (result.isFailure()) { - debug(tripId, "Failed to apply TripUpdate."); + debug(tripId, serviceDate, "Failed to apply TripUpdate."); LOG.trace(" Contents: {}", tripUpdate); if (failuresByRelationship.containsKey(scheduleRelationship)) { var c = failuresByRelationship.get(scheduleRelationship); @@ -374,12 +375,12 @@ private Result handleScheduledTrip( final TripPattern pattern = getPatternForTripId(tripId); if (pattern == null) { - debug(tripId, "No pattern found for tripId, skipping TripUpdate."); + debug(tripId, serviceDate, "No pattern found for tripId, skipping TripUpdate."); return UpdateError.result(tripId, TRIP_NOT_FOUND); } if (tripUpdate.getStopTimeUpdateCount() < 1) { - debug(tripId, "TripUpdate contains no updates, skipping."); + debug(tripId, serviceDate, "TripUpdate contains no updates, skipping."); return UpdateError.result(tripId, NO_UPDATES); } @@ -390,6 +391,7 @@ private Result handleScheduledTrip( if (!serviceDates.contains(serviceDate)) { debug( tripId, + serviceDate, "SCHEDULED trip has service date {} for which trip's service is not valid, skipping.", serviceDate.toString() ); @@ -474,18 +476,26 @@ private Result validateAndHandleAddedTrip( if (trip != null) { // TODO: should we support this and add a new instantiation of this trip (making it // frequency based)? - debug(tripId, "Graph already contains trip id of ADDED trip, skipping."); + debug(tripId, serviceDate, "Graph already contains trip id of ADDED trip, skipping."); return UpdateError.result(tripId, TRIP_ALREADY_EXISTS); } // Check whether a start date exists if (!tripDescriptor.hasStartDate()) { // TODO: should we support this and apply update to all days? - debug(tripId, "ADDED trip doesn't have a start date in TripDescriptor, skipping."); + debug( + tripId, + serviceDate, + "ADDED trip doesn't have a start date in TripDescriptor, skipping." + ); return UpdateError.result(tripId, NO_START_DATE); } - final List stopTimeUpdates = removeUnknownStops(tripUpdate, tripId); + final List stopTimeUpdates = removeUnknownStops( + tripUpdate, + tripId, + serviceDate + ); var warnings = new ArrayList(0); @@ -495,12 +505,12 @@ private Result validateAndHandleAddedTrip( // check if after filtering the stops we still have at least 2 if (stopTimeUpdates.size() < 2) { - debug(tripId, "ADDED trip has fewer than two known stops, skipping."); + debug(tripId, serviceDate, "ADDED trip has fewer than two known stops, skipping."); return UpdateError.result(tripId, TOO_FEW_STOPS); } // Check whether all stop times are available and all stops exist - final var stops = checkNewStopTimeUpdatesAndFindStops(tripId, stopTimeUpdates); + final var stops = checkNewStopTimeUpdatesAndFindStops(tripId, serviceDate, stopTimeUpdates); if (stops == null) { return UpdateError.result(tripId, NO_VALID_STOPS); } @@ -515,7 +525,11 @@ private Result validateAndHandleAddedTrip( /** * Remove any stop that is not know in the static transit data. */ - private List removeUnknownStops(TripUpdate tripUpdate, FeedScopedId tripId) { + private List removeUnknownStops( + TripUpdate tripUpdate, + FeedScopedId tripId, + LocalDate serviceDate + ) { return tripUpdate .getStopTimeUpdateList() .stream() @@ -524,7 +538,12 @@ private List removeUnknownStops(TripUpdate tripUpdate, FeedScope var stopId = new FeedScopedId(tripId.getFeedId(), st.getStopId()); var stopFound = transitEditorService.getRegularStop(stopId) != null; if (!stopFound) { - debug(tripId, "Stop '{}' not found in graph. Removing from ADDED trip.", st.getStopId()); + debug( + tripId, + serviceDate, + "Stop '{}' not found in graph. Removing from ADDED trip.", + st.getStopId() + ); } return stopFound; }) @@ -539,6 +558,7 @@ private List removeUnknownStops(TripUpdate tripUpdate, FeedScope */ private List checkNewStopTimeUpdatesAndFindStops( final FeedScopedId tripId, + LocalDate serviceDate, final List stopTimeUpdates ) { Integer previousStopSequence = null; @@ -554,13 +574,13 @@ private List checkNewStopTimeUpdatesAndFindStops( // Check non-negative if (stopSequence < 0) { - debug(tripId, "Trip update contains negative stop sequence, skipping."); + debug(tripId, serviceDate, "Trip update contains negative stop sequence, skipping."); return null; } // Check whether sequence is increasing if (previousStopSequence != null && previousStopSequence > stopSequence) { - debug(tripId, "Trip update contains decreasing stop sequence, skipping."); + debug(tripId, serviceDate, "Trip update contains decreasing stop sequence, skipping."); return null; } previousStopSequence = stopSequence; @@ -580,13 +600,19 @@ private List checkNewStopTimeUpdatesAndFindStops( } else { debug( tripId, + serviceDate, "Graph doesn't contain stop id '{}' of trip update, skipping.", stopTimeUpdate.getStopId() ); return null; } } else { - debug(tripId, "Trip update misses a stop id at stop time list index {}, skipping.", index); + debug( + tripId, + serviceDate, + "Trip update misses a stop id at stop time list index {}, skipping.", + index + ); return null; } @@ -595,12 +621,12 @@ private List checkNewStopTimeUpdatesAndFindStops( // Check for increasing time final Long time = stopTimeUpdate.getArrival().getTime(); if (previousTime != null && previousTime > time) { - debug(tripId, "Trip update contains decreasing times, skipping."); + debug(tripId, serviceDate, "Trip update contains decreasing times, skipping."); return null; } previousTime = time; } else { - debug(tripId, "Trip update misses arrival time, skipping."); + debug(tripId, serviceDate, "Trip update misses arrival time, skipping."); return null; } @@ -609,12 +635,12 @@ private List checkNewStopTimeUpdatesAndFindStops( // Check for increasing time final Long time = stopTimeUpdate.getDeparture().getTime(); if (previousTime != null && previousTime > time) { - debug(tripId, "Trip update contains decreasing times, skipping."); + debug(tripId, serviceDate, "Trip update contains decreasing times, skipping."); return null; } previousTime = time; } else { - debug(tripId, "Trip update misses departure time, skipping."); + debug(tripId, serviceDate, "Trip update misses departure time, skipping."); return null; } } @@ -670,6 +696,7 @@ private Result handleAddedTrip( // No service id exists: return error for now debug( tripId, + serviceDate, "ADDED trip has service date {} for which no service id is available, skipping.", serviceDate.toString() ); @@ -800,6 +827,7 @@ private Result addTripToGraphAndBuffer( if (arrivalTime < 0 || arrivalTime > MAX_ARRIVAL_DEPARTURE_TIME) { debug( trip.getId(), + serviceDate, "ADDED trip has invalid arrival time (compared to start date in " + "TripDescriptor), skipping." ); @@ -814,6 +842,7 @@ private Result addTripToGraphAndBuffer( if (departureTime < 0 || departureTime > MAX_ARRIVAL_DEPARTURE_TIME) { debug( trip.getId(), + serviceDate, "ADDED trip has invalid departure time (compared to start date in " + "TripDescriptor), skipping." ); @@ -916,7 +945,11 @@ private boolean cancelScheduledTrip( final Timetable timetable = pattern.getScheduledTimetable(); final int tripIndex = timetable.getTripIndex(tripId); if (tripIndex == -1) { - debug(tripId, "Could not cancel scheduled trip because it's not in the timetable"); + debug( + tripId, + serviceDate, + "Could not cancel scheduled trip because it's not in the timetable" + ); } else { final RealTimeTripTimes newTripTimes = timetable .getTripTimes(tripIndex) @@ -958,7 +991,7 @@ private boolean cancelPreviouslyAddedTrip( final Timetable timetable = snapshotManager.resolve(pattern, serviceDate); final int tripIndex = timetable.getTripIndex(tripId); if (tripIndex == -1) { - debug(tripId, "Could not cancel previously added trip on {}", serviceDate); + debug(tripId, serviceDate, "Could not cancel previously added trip on {}", serviceDate); } else { final RealTimeTripTimes newTripTimes = timetable .getTripTimes(tripIndex) @@ -1000,14 +1033,18 @@ private Result validateAndHandleModifiedTrip( if (trip == null) { // TODO: should we support this and consider it an ADDED trip? - debug(tripId, "Feed does not contain trip id of MODIFIED trip, skipping."); + debug(tripId, serviceDate, "Feed does not contain trip id of MODIFIED trip, skipping."); return UpdateError.result(tripId, TRIP_NOT_FOUND); } // Check whether a start date exists if (!tripDescriptor.hasStartDate()) { // TODO: should we support this and apply update to all days? - debug(tripId, "REPLACEMENT trip doesn't have a start date in TripDescriptor, skipping."); + debug( + tripId, + serviceDate, + "REPLACEMENT trip doesn't have a start date in TripDescriptor, skipping." + ); return UpdateError.result(tripId, NO_START_DATE); } else { // Check whether service date is served by trip @@ -1016,19 +1053,27 @@ private Result validateAndHandleModifiedTrip( .getServiceIdsOnDate(serviceDate); if (!serviceIds.contains(trip.getServiceId())) { // TODO: should we support this and change service id of trip? - debug(tripId, "REPLACEMENT trip has a service date that is not served by trip, skipping."); + debug( + tripId, + serviceDate, + "REPLACEMENT trip has a service date that is not served by trip, skipping." + ); return UpdateError.result(tripId, NO_SERVICE_ON_DATE); } } // Check whether at least two stop updates exist if (tripUpdate.getStopTimeUpdateCount() < 2) { - debug(tripId, "REPLACEMENT trip has less then two stops, skipping."); + debug(tripId, serviceDate, "REPLACEMENT trip has less then two stops, skipping."); return UpdateError.result(tripId, TOO_FEW_STOPS); } // Check whether all stop times are available and all stops exist - var stops = checkNewStopTimeUpdatesAndFindStops(tripId, tripUpdate.getStopTimeUpdateList()); + var stops = checkNewStopTimeUpdatesAndFindStops( + tripId, + serviceDate, + tripUpdate.getStopTimeUpdateList() + ); if (stops == null) { return UpdateError.result(tripId, NO_VALID_STOPS); } @@ -1100,9 +1145,12 @@ private Result handleCanceledTrip( ); if (!cancelScheduledSuccess) { - debug(tripId, "No pattern found for tripId. Skipping cancellation."); + debug(tripId, serviceDate, "No pattern found for tripId. Skipping cancellation."); return UpdateError.result(tripId, NO_TRIP_FOR_CANCELLATION_FOUND); } + + debug(tripId, serviceDate, "Canceled trip"); + return Result.success(UpdateSuccess.noWarnings()); } @@ -1117,12 +1165,33 @@ private TripPattern getPatternForTripId(FeedScopedId tripId) { return transitEditorService.getPatternForTrip(trip); } - private static void debug(FeedScopedId id, String message, Object... params) { - debug(id.getFeedId(), id.getId(), message, params); + private static void debug( + FeedScopedId id, + LocalDate serviceDate, + String message, + Object... params + ) { + debug(id.getFeedId(), id.getId(), serviceDate, message, params); + } + + private static void debug(String feedId, String message, Object... params) { + debug(feedId, null, null, message, params); } - private static void debug(String feedId, String tripId, String message, Object... params) { - String m = "[feedId: %s, tripId: %s] %s".formatted(feedId, tripId, message); + private static void debug( + String feedId, + String tripId, + LocalDate serviceDate, + String message, + Object... params + ) { + String m = + "[feedId: %s, tripId: %s, serviceDate: %s] %s".formatted( + feedId, + tripId, + serviceDate, + message + ); LOG.debug(m, params); } From 364a085cc09367ec8a86fac57f78e6d46d13b0ca Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Fri, 11 Oct 2024 15:30:55 +0100 Subject: [PATCH 003/169] remove duplicate imports from generated files --- .../apis/gtfs/generated/GraphQLDataFetchers.java | 9 --------- .../apis/gtfs/generated/GraphQLTypes.java | 1 - 2 files changed, 10 deletions(-) diff --git a/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index d39be5ed728..d501d2e5cea 100644 --- a/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -1,11 +1,9 @@ //THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; -import graphql.relay.Connection; import graphql.relay.Connection; import graphql.relay.DefaultEdge; import graphql.relay.Edge; -import graphql.relay.Edge; import graphql.schema.DataFetcher; import graphql.schema.TypeResolver; import java.util.Currency; @@ -26,12 +24,8 @@ import org.opentripplanner.apis.gtfs.model.FeedPublisher; import org.opentripplanner.apis.gtfs.model.PlanPageInfo; import org.opentripplanner.apis.gtfs.model.RideHailingProvider; -import org.opentripplanner.apis.gtfs.model.RouteTypeModel; -import org.opentripplanner.apis.gtfs.model.StopOnRouteModel; -import org.opentripplanner.apis.gtfs.model.StopOnTripModel; import org.opentripplanner.apis.gtfs.model.StopPosition; import org.opentripplanner.apis.gtfs.model.TripOccupancy; -import org.opentripplanner.apis.gtfs.model.UnknownModel; import org.opentripplanner.ext.fares.model.FareRuleSet; import org.opentripplanner.ext.ridehailing.model.RideEstimate; import org.opentripplanner.model.StopTimesInPattern; @@ -54,8 +48,6 @@ import org.opentripplanner.routing.graphfinder.PatternAtStop; import org.opentripplanner.routing.graphfinder.PlaceAtDistance; import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; @@ -66,7 +58,6 @@ import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; -import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; import org.opentripplanner.service.vehiclerental.model.VehicleRentalSystem; import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; import org.opentripplanner.transit.model.basic.Money; diff --git a/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index ed9c25ae5f3..412a8831149 100644 --- a/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -1,7 +1,6 @@ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; From aa48a324a224bc0ce0faedebf01b593db30b06df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rich=C3=A1rd=20K=C5=91szegi?= Date: Wed, 9 Oct 2024 13:02:29 +0200 Subject: [PATCH 004/169] debug client: support stop ids in from / to inputs --- .../SearchBar/LocationInputField.tsx | 50 +++++++++++++++---- client/src/components/SearchBar/SearchBar.tsx | 16 +++++- client/src/hooks/useTripQuery.ts | 8 ++- client/src/util/locationConverter.ts | 47 +++++++++++++++++ 4 files changed, 106 insertions(+), 15 deletions(-) create mode 100644 client/src/util/locationConverter.ts diff --git a/client/src/components/SearchBar/LocationInputField.tsx b/client/src/components/SearchBar/LocationInputField.tsx index bfa707776f1..5f2ae950e52 100644 --- a/client/src/components/SearchBar/LocationInputField.tsx +++ b/client/src/components/SearchBar/LocationInputField.tsx @@ -1,8 +1,37 @@ import { Form } from 'react-bootstrap'; -import { COORDINATE_PRECISION } from './constants.ts'; -import { Location } from '../../gql/graphql.ts'; +import { toString, parseLocation } from '../../util/locationConverter.ts'; +import { Location, TripQueryVariables } from '../../gql/graphql.ts'; +import { useCallback, useEffect, useState } from 'react'; + +interface Props { + id: string; + label: string; + tripQueryVariables: TripQueryVariables; + setTripQueryVariables: (tripQueryVariables: TripQueryVariables) => void; + locationFieldKey: 'from' | 'to'; +} + +export function LocationInputField({ id, label, tripQueryVariables, setTripQueryVariables, locationFieldKey }: Props) { + const [value, setValue] = useState(''); + + useEffect(() => { + const initialLocation: Location = tripQueryVariables[locationFieldKey]; + + setValue(toString(initialLocation) || ''); + }, [tripQueryVariables, locationFieldKey]); + + const onLocationChange = useCallback( + (value: string) => { + const newLocation = parseLocation(value) || {}; + + setTripQueryVariables({ + ...tripQueryVariables, + [locationFieldKey]: newLocation, + }); + }, + [tripQueryVariables, setTripQueryVariables, locationFieldKey], + ); -export function LocationInputField({ location, id, label }: { location: Location; id: string; label: string }) { return ( @@ -16,14 +45,13 @@ export function LocationInputField({ location, id, label }: { location: Location className="input-medium" // Intentionally empty for now, but needed because of // https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable - onChange={() => {}} - value={ - location.coordinates - ? `${location.coordinates?.latitude.toPrecision( - COORDINATE_PRECISION, - )} ${location.coordinates?.longitude.toPrecision(COORDINATE_PRECISION)}` - : '' - } + onChange={(e) => { + setValue(e.target.value); + }} + onBlur={(event) => { + onLocationChange(event.target.value); + }} + value={value} /> ); diff --git a/client/src/components/SearchBar/SearchBar.tsx b/client/src/components/SearchBar/SearchBar.tsx index 73df12fe103..47781532179 100644 --- a/client/src/components/SearchBar/SearchBar.tsx +++ b/client/src/components/SearchBar/SearchBar.tsx @@ -38,9 +38,21 @@ export function SearchBar({ onRoute, tripQueryVariables, setTripQueryVariables, {showServerInfo && } - + - + diff --git a/client/src/hooks/useTripQuery.ts b/client/src/hooks/useTripQuery.ts index 5ff6fc80a1f..3abb4617d2a 100644 --- a/client/src/hooks/useTripQuery.ts +++ b/client/src/hooks/useTripQuery.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useState } from 'react'; import { request } from 'graphql-request'; // eslint-disable-line import/no-unresolved -import { QueryType, TripQueryVariables } from '../gql/graphql.ts'; +import { Location, QueryType, TripQueryVariables } from '../gql/graphql.ts'; import { getApiUrl } from '../util/getApiUrl.ts'; import { query } from '../static/query/tripQuery.tsx'; @@ -37,10 +37,14 @@ export const useTripQuery: TripQueryHook = (variables) => { ); useEffect(() => { - if (variables?.from.coordinates && variables?.to.coordinates) { + if (validLocation(variables?.from) && validLocation(variables?.to)) { callback(); } // eslint-disable-next-line react-hooks/exhaustive-deps }, [variables?.from, variables?.to]); return [data, loading, callback]; }; + +function validLocation(location: Location | undefined) { + return location && (location.coordinates || location.place); +} diff --git a/client/src/util/locationConverter.ts b/client/src/util/locationConverter.ts new file mode 100644 index 00000000000..647c78582e9 --- /dev/null +++ b/client/src/util/locationConverter.ts @@ -0,0 +1,47 @@ +import { COORDINATE_PRECISION } from '../components/SearchBar/constants.ts'; +import { Location } from '../gql/graphql.ts'; + +const DOUBLE_PATTERN = '-{0,1}\\d+(\\.\\d+){0,1}'; + +const LAT_LON_PATTERN = '(' + DOUBLE_PATTERN + ')(\\s*,\\s*|\\s+)(' + DOUBLE_PATTERN + ')'; + +const ID_SEPARATOR = ':'; + +export function parseLocation(value: string): Location | null { + const latLonMatch = value.match(LAT_LON_PATTERN); + + if (latLonMatch) { + return { + coordinates: { + latitude: +latLonMatch[1], + longitude: +latLonMatch[4], + }, + }; + } + + if (validFeedScopeIdString(value)) { + return { + place: value, + }; + } + + return null; +} + +function validFeedScopeIdString(value: string): boolean { + return value.indexOf(ID_SEPARATOR) > -1; +} + +export function toString(location: Location): string | null { + if (location.coordinates) { + return `${location.coordinates?.latitude.toPrecision( + COORDINATE_PRECISION, + )} ${location.coordinates?.longitude.toPrecision(COORDINATE_PRECISION)}`; + } + + if (location.place) { + return location.place; + } + + return null; +} From 35daa0ff8be8f9076c1f01c46029055232f76358 Mon Sep 17 00:00:00 2001 From: JustCris Date: Tue, 22 Oct 2024 15:41:30 +0200 Subject: [PATCH 005/169] add vehicleRentalStationsByBbox query to gtfs graqphql schema --- .../apis/gtfs/datafetchers/QueryTypeImpl.java | 27 ++++++++++ .../gtfs/generated/GraphQLDataFetchers.java | 2 + .../apis/gtfs/generated/GraphQLTypes.java | 49 +++++++++++++++++++ .../opentripplanner/apis/gtfs/schema.graphqls | 11 +++++ 4 files changed, 89 insertions(+) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java index 95984ba6dd0..a941c0a7de8 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java @@ -928,6 +928,33 @@ public DataFetcher> vehicleRentalStations() { }; } + @Override + public DataFetcher> vehicleRentalStationsByBbox() { + return environment -> { + VehicleRentalService vehicleRentalStationService = environment + .getContext() + .vehicleRentalService(); + + var args = new GraphQLTypes.GraphQLQueryTypeVehicleRentalStationsByBboxArgs( + environment.getArguments() + ); + + Envelope envelope = new Envelope( + new Coordinate(args.getGraphQLMinLon(), args.getGraphQLMinLat()), + new Coordinate(args.getGraphQLMaxLon(), args.getGraphQLMaxLat()) + ); + + Stream stationStream = vehicleRentalStationService + .getVehicleRentalStations() + .stream() + .filter(station -> + envelope.contains(new Coordinate(station.getLongitude(), station.getLatitude())) + ); + + return stationStream.toList(); + }; + } + @Override public DataFetcher viewer() { return environment -> new Object(); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index 7532faf28bd..265a8ab5d4d 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -832,6 +832,8 @@ public interface GraphQLQueryType { public DataFetcher> vehicleRentalStations(); + public DataFetcher> vehicleRentalStationsByBbox(); + public DataFetcher viewer(); } diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index e4ecd2be02a..597de0ce38c 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -3976,6 +3976,55 @@ public void setGraphQLIds(List ids) { } } + public static class GraphQLQueryTypeVehicleRentalStationsByBboxArgs { + + private Double maxLat; + private Double maxLon; + private Double minLat; + private Double minLon; + + public GraphQLQueryTypeVehicleRentalStationsByBboxArgs(Map args) { + if (args != null) { + this.maxLat = (Double) args.get("maxLat"); + this.maxLon = (Double) args.get("maxLon"); + this.minLat = (Double) args.get("minLat"); + this.minLon = (Double) args.get("minLon"); + } + } + + public Double getGraphQLMaxLat() { + return this.maxLat; + } + + public Double getGraphQLMaxLon() { + return this.maxLon; + } + + public Double getGraphQLMinLat() { + return this.minLat; + } + + public Double getGraphQLMinLon() { + return this.minLon; + } + + public void setGraphQLMaxLat(Double maxLat) { + this.maxLat = maxLat; + } + + public void setGraphQLMaxLon(Double maxLon) { + this.maxLon = maxLon; + } + + public void setGraphQLMinLat(Double minLat) { + this.minLat = minLat; + } + + public void setGraphQLMinLon(Double minLon) { + this.minLon = minLon; + } + } + public enum GraphQLRealtimeState { ADDED, CANCELED, diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index 00eb1eac565..f606291c040 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -1731,6 +1731,17 @@ type QueryType { """ ids: [String] ): [VehicleRentalStation] + "Get all vehicle rental stations within the specified bounding box" + vehicleRentalStationsByBbox( + "Northern bound of the bounding box" + maxLat: Float!, + "Eastern bound of the bounding box" + maxLon: Float!, + "Southern bound of the bounding box" + minLat: Float!, + "Western bound of the bounding box" + minLon: Float! + ): [VehicleRentalStation] "Needed until https://github.com/facebook/relay/issues/112 is resolved" viewer: QueryType } From 55c7c23a9086b8a8c5c5c43454430bc3cbd8482a Mon Sep 17 00:00:00 2001 From: JustCris654 Date: Thu, 24 Oct 2024 16:59:36 +0200 Subject: [PATCH 006/169] rename vehicleRentalStationsByBbox query input params --- .../apis/gtfs/datafetchers/QueryTypeImpl.java | 4 +- .../apis/gtfs/generated/GraphQLTypes.java | 48 +++++++++---------- .../opentripplanner/apis/gtfs/schema.graphqls | 8 ++-- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java index a941c0a7de8..70471bcf61b 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java @@ -940,8 +940,8 @@ public DataFetcher> vehicleRentalStationsByBbox() ); Envelope envelope = new Envelope( - new Coordinate(args.getGraphQLMinLon(), args.getGraphQLMinLat()), - new Coordinate(args.getGraphQLMaxLon(), args.getGraphQLMaxLat()) + new Coordinate(args.getGraphQLMinimumLongitude(), args.getGraphQLMinimumLatitude()), + new Coordinate(args.getGraphQLMaximumLongitude(), args.getGraphQLMaximumLatitude()) ); Stream stationStream = vehicleRentalStationService diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index 597de0ce38c..3124407efe4 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -3978,50 +3978,50 @@ public void setGraphQLIds(List ids) { public static class GraphQLQueryTypeVehicleRentalStationsByBboxArgs { - private Double maxLat; - private Double maxLon; - private Double minLat; - private Double minLon; + private Double maximumLatitude; + private Double maximumLongitude; + private Double minimumLatitude; + private Double minimumLongitude; public GraphQLQueryTypeVehicleRentalStationsByBboxArgs(Map args) { if (args != null) { - this.maxLat = (Double) args.get("maxLat"); - this.maxLon = (Double) args.get("maxLon"); - this.minLat = (Double) args.get("minLat"); - this.minLon = (Double) args.get("minLon"); + this.maximumLatitude = (Double) args.get("maximumLatitude"); + this.maximumLongitude = (Double) args.get("maximumLongitude"); + this.minimumLatitude = (Double) args.get("minimumLatitude"); + this.minimumLongitude = (Double) args.get("minimumLongitude"); } } - public Double getGraphQLMaxLat() { - return this.maxLat; + public Double getGraphQLMaximumLatitude() { + return this.maximumLatitude; } - public Double getGraphQLMaxLon() { - return this.maxLon; + public Double getGraphQLMaximumLongitude() { + return this.maximumLongitude; } - public Double getGraphQLMinLat() { - return this.minLat; + public Double getGraphQLMinimumLatitude() { + return this.minimumLatitude; } - public Double getGraphQLMinLon() { - return this.minLon; + public Double getGraphQLMinimumLongitude() { + return this.minimumLongitude; } - public void setGraphQLMaxLat(Double maxLat) { - this.maxLat = maxLat; + public void setGraphQLMaximumLatitude(Double maximumLatitude) { + this.maximumLatitude = maximumLatitude; } - public void setGraphQLMaxLon(Double maxLon) { - this.maxLon = maxLon; + public void setGraphQLMaximumLongitude(Double maximumLongitude) { + this.maximumLongitude = maximumLongitude; } - public void setGraphQLMinLat(Double minLat) { - this.minLat = minLat; + public void setGraphQLMinimumLatitude(Double minimumLatitude) { + this.minimumLatitude = minimumLatitude; } - public void setGraphQLMinLon(Double minLon) { - this.minLon = minLon; + public void setGraphQLMinimumLongitude(Double minimumLongitude) { + this.minimumLongitude = minimumLongitude; } } diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index f606291c040..82bd96c03d4 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -1734,13 +1734,13 @@ type QueryType { "Get all vehicle rental stations within the specified bounding box" vehicleRentalStationsByBbox( "Northern bound of the bounding box" - maxLat: Float!, + maximumLatitude: Float!, "Eastern bound of the bounding box" - maxLon: Float!, + maximumLongitude: Float!, "Southern bound of the bounding box" - minLat: Float!, + minimumLatitude: Float!, "Western bound of the bounding box" - minLon: Float! + minimumLongitude: Float! ): [VehicleRentalStation] "Needed until https://github.com/facebook/relay/issues/112 is resolved" viewer: QueryType From afe49e674dbdf776cddc770592f67757004b0d28 Mon Sep 17 00:00:00 2001 From: JustCris Date: Mon, 28 Oct 2024 11:57:56 +0100 Subject: [PATCH 007/169] vehicleRentalStationsByBbox change query input to CoordinateValue --- .../org/opentripplanner/apis/gtfs/schema.graphqls | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index 82bd96c03d4..7bfbcc4b72f 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -1734,13 +1734,13 @@ type QueryType { "Get all vehicle rental stations within the specified bounding box" vehicleRentalStationsByBbox( "Northern bound of the bounding box" - maximumLatitude: Float!, + maximumLatitude: CoordinateValue!, "Eastern bound of the bounding box" - maximumLongitude: Float!, + maximumLongitude: CoordinateValue!, "Southern bound of the bounding box" - minimumLatitude: Float!, + minimumLatitude: CoordinateValue!, "Western bound of the bounding box" - minimumLongitude: Float! + minimumLongitude: CoordinateValue! ): [VehicleRentalStation] "Needed until https://github.com/facebook/relay/issues/112 is resolved" viewer: QueryType From 0d314d9132b97ee5702bb68a318d36e6519feb1e Mon Sep 17 00:00:00 2001 From: JustCris Date: Mon, 28 Oct 2024 14:44:02 +0100 Subject: [PATCH 008/169] add vehicleRentalStationsByBbox test --- .../vehicle-rental-stations-bybbox.json | 64 +++++++++++++++++++ .../vehicle-rental-stations-bybbox.graphql | 51 +++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-stations-bybbox.json create mode 100644 application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rental-stations-bybbox.graphql diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-stations-bybbox.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-stations-bybbox.json new file mode 100644 index 00000000000..0d80956f3ef --- /dev/null +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-stations-bybbox.json @@ -0,0 +1,64 @@ +{ + "data": { + "vehicleRentalStationsByBbox": [ + { + "stationId": "Network-1:FooStation", + "name": "FooStation", + "vehiclesAvailable": 10, + "availableVehicles": { + "byType": [ + { + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "ELECTRIC" + }, + "count": 5 + }, + { + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "HUMAN" + }, + "count": 5 + } + ], + "total": 10 + }, + "spacesAvailable": 10, + "availableSpaces": { + "byType": [ + { + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "ELECTRIC" + }, + "count": 3 + }, + { + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "HUMAN" + }, + "count": 7 + } + ], + "total": 10 + }, + "allowDropoff": false, + "allowPickup": false, + "allowDropoffNow": false, + "allowPickupNow": false, + "lon": 18.99, + "lat": 47.51, + "capacity": null, + "allowOverloading": false, + "rentalUris": null, + "operative": false, + "rentalNetwork": { + "networkId": "Network-1", + "url": "https://foo.bar" + } + } + ] + } +} \ No newline at end of file diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rental-stations-bybbox.graphql b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rental-stations-bybbox.graphql new file mode 100644 index 00000000000..abd47f02e24 --- /dev/null +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rental-stations-bybbox.graphql @@ -0,0 +1,51 @@ +{ + vehicleRentalStationsByBbox( + maximumLatitude: 48.00 + maximumLongitude: 19.00 + minimumLatitude: 47.50 + minimumLongitude: 18.80 + ) { + stationId + name + vehiclesAvailable + availableVehicles { + byType { + vehicleType { + formFactor + propulsionType + } + count + } + total + } + spacesAvailable + availableSpaces { + byType { + vehicleType { + formFactor + propulsionType + } + count + } + total + } + allowDropoff + allowPickup + allowDropoffNow + allowPickupNow + lon + lat + capacity + allowOverloading + rentalUris { + android + ios + web + } + operative + rentalNetwork { + networkId + url + } + } +} From c715329f7052b82cc6e709b525cdcc8d34ec7a64 Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Tue, 29 Oct 2024 13:51:23 +0000 Subject: [PATCH 009/169] use an enum instead of boolean to switch next / previous alternative legs --- .../apis/gtfs/datafetchers/LegImpl.java | 8 ++-- .../gtfs/generated/GraphQLDataFetchers.java | 9 +++++ .../apis/gtfs/generated/GraphQLTypes.java | 1 + .../apis/transmodel/model/plan/LegType.java | 5 ++- .../alternativelegs/AlternativeLegs.java | 40 +++++++------------ .../stoptimes/AlternativeLegsTest.java | 8 ++-- 6 files changed, 36 insertions(+), 35 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java index 22f9cc3f764..a7e7e16aaa7 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java @@ -277,15 +277,15 @@ private Leg getSource(DataFetchingEnvironment environment) { @Override public DataFetcher> previousLegs() { - return nextOrPreviousLegs(true); + return nextOrPreviousLegs(AlternativeLegs.SearchMode.PREVIOUS); } @Override public DataFetcher> nextLegs() { - return nextOrPreviousLegs(false); + return nextOrPreviousLegs(AlternativeLegs.SearchMode.NEXT); } - private DataFetcher> nextOrPreviousLegs(boolean includeDepartBefore) { + private DataFetcher> nextOrPreviousLegs(AlternativeLegs.SearchMode searchMode) { return environment -> { if (environment.getSource() instanceof ScheduledTransitLeg originalLeg) { var args = new GraphQLTypes.GraphQLLegNextLegsArgs(environment.getArguments()); @@ -320,7 +320,7 @@ private DataFetcher> nextOrPreviousLegs(boolean includeDepartBefor environment.getSource(), numberOfLegs, environment.getContext().transitService(), - includeDepartBefore, + searchMode, AlternativeLegsFilter.NO_FILTER, limitToExactOriginStop, limitToExactDestinationStop diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index 235b1d2bb14..ad686dec9a9 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -1,9 +1,11 @@ //THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; +import graphql.relay.Connection; import graphql.relay.Connection; import graphql.relay.DefaultEdge; import graphql.relay.Edge; +import graphql.relay.Edge; import graphql.schema.DataFetcher; import graphql.schema.TypeResolver; import java.util.Currency; @@ -25,8 +27,12 @@ import org.opentripplanner.apis.gtfs.model.FeedPublisher; import org.opentripplanner.apis.gtfs.model.PlanPageInfo; import org.opentripplanner.apis.gtfs.model.RideHailingProvider; +import org.opentripplanner.apis.gtfs.model.RouteTypeModel; +import org.opentripplanner.apis.gtfs.model.StopOnRouteModel; +import org.opentripplanner.apis.gtfs.model.StopOnTripModel; import org.opentripplanner.apis.gtfs.model.StopPosition; import org.opentripplanner.apis.gtfs.model.TripOccupancy; +import org.opentripplanner.apis.gtfs.model.UnknownModel; import org.opentripplanner.ext.fares.model.FareRuleSet; import org.opentripplanner.ext.ridehailing.model.RideEstimate; import org.opentripplanner.model.StopTimesInPattern; @@ -49,6 +55,8 @@ import org.opentripplanner.routing.graphfinder.PatternAtStop; import org.opentripplanner.routing.graphfinder.PlaceAtDistance; import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.routing.vehicle_parking.VehicleParking; import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; @@ -59,6 +67,7 @@ import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; +import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; import org.opentripplanner.service.vehiclerental.model.VehicleRentalSystem; import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; import org.opentripplanner.transit.model.basic.Money; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index 83d052ccb7b..a47ee0ab063 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -1,6 +1,7 @@ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java index 5bf56f75e4b..f511ca37e38 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java @@ -33,6 +33,7 @@ import org.opentripplanner.model.plan.TransitLeg; import org.opentripplanner.model.plan.legreference.LegReferenceSerializer; import org.opentripplanner.routing.alternativelegs.AlternativeLegs; +import org.opentripplanner.routing.alternativelegs.AlternativeLegs.SearchMode; public class LegType { @@ -485,7 +486,7 @@ public static GraphQLObjectType create( leg, env.getArgument("previous"), GqlUtil.getTransitService(env), - true, + SearchMode.PREVIOUS, env.getArgument("filter") ); }) @@ -525,7 +526,7 @@ public static GraphQLObjectType create( leg, env.getArgument("next"), GqlUtil.getTransitService(env), - false, + SearchMode.NEXT, env.getArgument("filter") ); }) diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java index 465ed230884..6c12fafe59f 100644 --- a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java +++ b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java @@ -39,24 +39,21 @@ */ public class AlternativeLegs { + public enum SearchMode { + NEXT, + PREVIOUS, + } + public static final int ZERO_COST = 0; public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - boolean searchBackward, + SearchMode searchMode, AlternativeLegsFilter filter ) { - return getAlternativeLegs( - leg, - numberLegs, - transitService, - searchBackward, - filter, - false, - false - ); + return getAlternativeLegs(leg, numberLegs, transitService, searchMode, filter, false, false); } /** @@ -66,9 +63,8 @@ public static List getAlternativeLegs( * @param numberLegs The number of alternative legs requested. If fewer legs are found, * only the found legs are returned. * @param transitService The transit service used for the search - * @param includeDepartBefore Boolean indicating whether the alternative legs should depart - * earlier or later than the original leg True if earlier, false if - * later. + * @param searchMode Indicating whether the alternative legs should depart + * earlier (PREVIOUS) or later (NEXT) than the original. * @param filter AlternativeLegsFilter indicating which properties of the original * leg should not change in the alternative legs * @param exactOriginStop Boolean indicating whether the exact departure stop of the original @@ -82,7 +78,7 @@ public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - boolean includeDepartBefore, + SearchMode searchMode, AlternativeLegsFilter filter, boolean exactOriginStop, boolean exactDestinationStop @@ -105,7 +101,7 @@ public static List getAlternativeLegs( ScheduledTransitLeg::getStartTime ); - if (includeDepartBefore) { + if (searchMode == SearchMode.PREVIOUS) { legComparator = legComparator.reversed(); } @@ -119,13 +115,7 @@ public static List getAlternativeLegs( .distinct() .flatMap(tripPattern -> withBoardingAlightingPositions(origins, destinations, tripPattern)) .flatMap(t -> - generateLegs( - transitService, - t, - leg.getStartTime(), - leg.getServiceDate(), - includeDepartBefore - ) + generateLegs(transitService, t, leg.getStartTime(), leg.getServiceDate(), searchMode) ) .filter(Predicate.not(leg::isPartiallySameTransitLeg)) .sorted(legComparator) @@ -142,7 +132,7 @@ private static Stream generateLegs( TripPatternBetweenStops tripPatternBetweenStops, ZonedDateTime departureTime, LocalDate originalDate, - boolean includeDepartBefore + SearchMode searchMode ) { TripPattern pattern = tripPatternBetweenStops.tripPattern; int boardingPosition = tripPatternBetweenStops.positions.boardingPosition; @@ -155,7 +145,7 @@ private static Stream generateLegs( tts.getServiceDayMidnight() + tts.getRealtimeDeparture() ); - if (includeDepartBefore) { + if (searchMode == SearchMode.PREVIOUS) { comparator = comparator.reversed(); } @@ -185,7 +175,7 @@ private static Stream generateLegs( continue; } - boolean departureTimeInRange = includeDepartBefore + boolean departureTimeInRange = searchMode == SearchMode.PREVIOUS ? tripTimes.getDepartureTime(boardingPosition) <= secondsSinceMidnight : tripTimes.getDepartureTime(boardingPosition) >= secondsSinceMidnight; diff --git a/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java b/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java index 055fba784a9..aedb98725d7 100644 --- a/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java +++ b/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java @@ -51,7 +51,7 @@ void testPreviousLegs() { originalLeg, 3, transitService, - true, + AlternativeLegs.SearchMode.PREVIOUS, AlternativeLegsFilter.NO_FILTER ); @@ -85,7 +85,7 @@ void testNextLegs() { originalLeg, 3, transitService, - false, + AlternativeLegs.SearchMode.NEXT, AlternativeLegsFilter.NO_FILTER ); @@ -119,7 +119,7 @@ void testCircularRoutes() { originalLeg, 2, transitService, - false, + AlternativeLegs.SearchMode.NEXT, AlternativeLegsFilter.NO_FILTER ); @@ -147,7 +147,7 @@ void testComplexCircularRoutes() { originalLeg, 2, transitService, - false, + AlternativeLegs.SearchMode.NEXT, AlternativeLegsFilter.NO_FILTER ); var legs = toString(alternativeLegs); From 22c1f73d5b697d6516a1f0c56b85671834576854 Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Tue, 29 Oct 2024 15:20:12 +0000 Subject: [PATCH 010/169] rename nextOrPreviousLegs to alternativeLegs --- .../org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java index a7e7e16aaa7..235de3ebf55 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java @@ -277,15 +277,15 @@ private Leg getSource(DataFetchingEnvironment environment) { @Override public DataFetcher> previousLegs() { - return nextOrPreviousLegs(AlternativeLegs.SearchMode.PREVIOUS); + return alternativeLegs(AlternativeLegs.SearchMode.PREVIOUS); } @Override public DataFetcher> nextLegs() { - return nextOrPreviousLegs(AlternativeLegs.SearchMode.NEXT); + return alternativeLegs(AlternativeLegs.SearchMode.NEXT); } - private DataFetcher> nextOrPreviousLegs(AlternativeLegs.SearchMode searchMode) { + private DataFetcher> alternativeLegs(AlternativeLegs.SearchMode searchMode) { return environment -> { if (environment.getSource() instanceof ScheduledTransitLeg originalLeg) { var args = new GraphQLTypes.GraphQLLegNextLegsArgs(environment.getArguments()); From 30c787b86c0a2729cc3b79ab5fe42bf22dfffab7 Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Tue, 29 Oct 2024 15:23:04 +0000 Subject: [PATCH 011/169] rename SearchMode to SearchDirection --- .../apis/gtfs/datafetchers/LegImpl.java | 10 ++++--- .../apis/transmodel/model/plan/LegType.java | 6 ++-- .../alternativelegs/AlternativeLegs.java | 28 ++++++++++++------- .../stoptimes/AlternativeLegsTest.java | 8 +++--- 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java index 235de3ebf55..5548ca5ff59 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java @@ -277,15 +277,17 @@ private Leg getSource(DataFetchingEnvironment environment) { @Override public DataFetcher> previousLegs() { - return alternativeLegs(AlternativeLegs.SearchMode.PREVIOUS); + return alternativeLegs(AlternativeLegs.SearchDirection.PREVIOUS); } @Override public DataFetcher> nextLegs() { - return alternativeLegs(AlternativeLegs.SearchMode.NEXT); + return alternativeLegs(AlternativeLegs.SearchDirection.NEXT); } - private DataFetcher> alternativeLegs(AlternativeLegs.SearchMode searchMode) { + private DataFetcher> alternativeLegs( + AlternativeLegs.SearchDirection searchDirection + ) { return environment -> { if (environment.getSource() instanceof ScheduledTransitLeg originalLeg) { var args = new GraphQLTypes.GraphQLLegNextLegsArgs(environment.getArguments()); @@ -320,7 +322,7 @@ private DataFetcher> alternativeLegs(AlternativeLegs.SearchMode se environment.getSource(), numberOfLegs, environment.getContext().transitService(), - searchMode, + searchDirection, AlternativeLegsFilter.NO_FILTER, limitToExactOriginStop, limitToExactDestinationStop diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java index f511ca37e38..6ba90ea8b09 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java @@ -33,7 +33,7 @@ import org.opentripplanner.model.plan.TransitLeg; import org.opentripplanner.model.plan.legreference.LegReferenceSerializer; import org.opentripplanner.routing.alternativelegs.AlternativeLegs; -import org.opentripplanner.routing.alternativelegs.AlternativeLegs.SearchMode; +import org.opentripplanner.routing.alternativelegs.AlternativeLegs.SearchDirection; public class LegType { @@ -486,7 +486,7 @@ public static GraphQLObjectType create( leg, env.getArgument("previous"), GqlUtil.getTransitService(env), - SearchMode.PREVIOUS, + SearchDirection.PREVIOUS, env.getArgument("filter") ); }) @@ -526,7 +526,7 @@ public static GraphQLObjectType create( leg, env.getArgument("next"), GqlUtil.getTransitService(env), - SearchMode.NEXT, + SearchDirection.NEXT, env.getArgument("filter") ); }) diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java index 6c12fafe59f..10ae389894f 100644 --- a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java +++ b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java @@ -39,7 +39,7 @@ */ public class AlternativeLegs { - public enum SearchMode { + public enum SearchDirection { NEXT, PREVIOUS, } @@ -50,10 +50,18 @@ public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - SearchMode searchMode, + SearchDirection searchDirection, AlternativeLegsFilter filter ) { - return getAlternativeLegs(leg, numberLegs, transitService, searchMode, filter, false, false); + return getAlternativeLegs( + leg, + numberLegs, + transitService, + searchDirection, + filter, + false, + false + ); } /** @@ -63,7 +71,7 @@ public static List getAlternativeLegs( * @param numberLegs The number of alternative legs requested. If fewer legs are found, * only the found legs are returned. * @param transitService The transit service used for the search - * @param searchMode Indicating whether the alternative legs should depart + * @param searchDirection Indicating whether the alternative legs should depart * earlier (PREVIOUS) or later (NEXT) than the original. * @param filter AlternativeLegsFilter indicating which properties of the original * leg should not change in the alternative legs @@ -78,7 +86,7 @@ public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - SearchMode searchMode, + SearchDirection searchDirection, AlternativeLegsFilter filter, boolean exactOriginStop, boolean exactDestinationStop @@ -101,7 +109,7 @@ public static List getAlternativeLegs( ScheduledTransitLeg::getStartTime ); - if (searchMode == SearchMode.PREVIOUS) { + if (searchDirection == SearchDirection.PREVIOUS) { legComparator = legComparator.reversed(); } @@ -115,7 +123,7 @@ public static List getAlternativeLegs( .distinct() .flatMap(tripPattern -> withBoardingAlightingPositions(origins, destinations, tripPattern)) .flatMap(t -> - generateLegs(transitService, t, leg.getStartTime(), leg.getServiceDate(), searchMode) + generateLegs(transitService, t, leg.getStartTime(), leg.getServiceDate(), searchDirection) ) .filter(Predicate.not(leg::isPartiallySameTransitLeg)) .sorted(legComparator) @@ -132,7 +140,7 @@ private static Stream generateLegs( TripPatternBetweenStops tripPatternBetweenStops, ZonedDateTime departureTime, LocalDate originalDate, - SearchMode searchMode + SearchDirection searchDirection ) { TripPattern pattern = tripPatternBetweenStops.tripPattern; int boardingPosition = tripPatternBetweenStops.positions.boardingPosition; @@ -145,7 +153,7 @@ private static Stream generateLegs( tts.getServiceDayMidnight() + tts.getRealtimeDeparture() ); - if (searchMode == SearchMode.PREVIOUS) { + if (searchDirection == SearchDirection.PREVIOUS) { comparator = comparator.reversed(); } @@ -175,7 +183,7 @@ private static Stream generateLegs( continue; } - boolean departureTimeInRange = searchMode == SearchMode.PREVIOUS + boolean departureTimeInRange = searchDirection == SearchDirection.PREVIOUS ? tripTimes.getDepartureTime(boardingPosition) <= secondsSinceMidnight : tripTimes.getDepartureTime(boardingPosition) >= secondsSinceMidnight; diff --git a/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java b/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java index aedb98725d7..c9833eae3a5 100644 --- a/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java +++ b/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java @@ -51,7 +51,7 @@ void testPreviousLegs() { originalLeg, 3, transitService, - AlternativeLegs.SearchMode.PREVIOUS, + AlternativeLegs.SearchDirection.PREVIOUS, AlternativeLegsFilter.NO_FILTER ); @@ -85,7 +85,7 @@ void testNextLegs() { originalLeg, 3, transitService, - AlternativeLegs.SearchMode.NEXT, + AlternativeLegs.SearchDirection.NEXT, AlternativeLegsFilter.NO_FILTER ); @@ -119,7 +119,7 @@ void testCircularRoutes() { originalLeg, 2, transitService, - AlternativeLegs.SearchMode.NEXT, + AlternativeLegs.SearchDirection.NEXT, AlternativeLegsFilter.NO_FILTER ); @@ -147,7 +147,7 @@ void testComplexCircularRoutes() { originalLeg, 2, transitService, - AlternativeLegs.SearchMode.NEXT, + AlternativeLegs.SearchDirection.NEXT, AlternativeLegsFilter.NO_FILTER ); var legs = toString(alternativeLegs); From 67bbebc6c4d541dfa4b743cb82666847b835b234 Mon Sep 17 00:00:00 2001 From: JustCris Date: Tue, 29 Oct 2024 17:41:53 +0100 Subject: [PATCH 012/169] add VehicleRental interface to gtfs graphql --- .../apis/gtfs/GtfsGraphQLIndex.java | 2 ++ .../VehicleRentalTypeResolver.java | 27 +++++++++++++++++++ .../gtfs/generated/GraphQLDataFetchers.java | 26 ++++++++++++++++++ .../opentripplanner/apis/gtfs/schema.graphqls | 19 +++++++++++-- 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/VehicleRentalTypeResolver.java diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/GtfsGraphQLIndex.java b/application/src/main/java/org/opentripplanner/apis/gtfs/GtfsGraphQLIndex.java index 43a8399e70c..4031b8625f3 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/GtfsGraphQLIndex.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/GtfsGraphQLIndex.java @@ -75,6 +75,7 @@ import org.opentripplanner.apis.gtfs.datafetchers.VehiclePositionImpl; import org.opentripplanner.apis.gtfs.datafetchers.VehicleRentalNetworkImpl; import org.opentripplanner.apis.gtfs.datafetchers.VehicleRentalStationImpl; +import org.opentripplanner.apis.gtfs.datafetchers.VehicleRentalTypeResolver; import org.opentripplanner.apis.gtfs.datafetchers.debugOutputImpl; import org.opentripplanner.apis.gtfs.datafetchers.elevationProfileComponentImpl; import org.opentripplanner.apis.gtfs.datafetchers.placeAtDistanceImpl; @@ -123,6 +124,7 @@ protected static GraphQLSchema buildSchema() { ) .type("Node", type -> type.typeResolver(new NodeTypeResolver())) .type("PlaceInterface", type -> type.typeResolver(new PlaceInterfaceTypeResolver())) + .type("VehicleRental", type -> type.typeResolver(new VehicleRentalTypeResolver())) .type("StopPosition", type -> type.typeResolver(new StopPosition() {})) .type("FareProduct", type -> type.typeResolver(new FareProductTypeResolver())) .type("AlertEntity", type -> type.typeResolver(new AlertEntityTypeResolver())) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/VehicleRentalTypeResolver.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/VehicleRentalTypeResolver.java new file mode 100644 index 00000000000..9563b2fed98 --- /dev/null +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/VehicleRentalTypeResolver.java @@ -0,0 +1,27 @@ +package org.opentripplanner.apis.gtfs.datafetchers; + +import graphql.TypeResolutionEnvironment; +import graphql.schema.GraphQLObjectType; +import graphql.schema.GraphQLSchema; +import graphql.schema.TypeResolver; +import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; +import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; + +public class VehicleRentalTypeResolver implements TypeResolver { + + @Override + public GraphQLObjectType getType(TypeResolutionEnvironment env) { + Object o = env.getObject(); + GraphQLSchema schema = env.getSchema(); + + if (o instanceof VehicleRentalStation) { + return schema.getObjectType("VehicleRentalStation"); + } + + if (o instanceof VehicleRentalVehicle) { + return schema.getObjectType("RentalVehicle"); + } + + return null; + } +} diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index 265a8ab5d4d..359e32e7159 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -1276,6 +1276,32 @@ public interface GraphQLVehiclePosition { public DataFetcher vehicleId(); } + public interface GraphQLVehicleRental extends TypeResolver { + public default DataFetcher allowPickupNow() { + return null; + } + + public default DataFetcher lat() { + return null; + } + + public default DataFetcher lon() { + return null; + } + + public default DataFetcher name() { + return null; + } + + public default DataFetcher operative() { + return null; + } + + public default DataFetcher rentalNetwork() { + return null; + } + } + /** * Vehicle rental network, which is referred as system in the GBFS terminology. Note, the same operator can operate in multiple * regions either with the same network/system or with a different one. This can contain information about either the rental brand diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index 7bfbcc4b72f..22f63adafc6 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -70,6 +70,21 @@ interface PlaceInterface { lon: Float } +interface VehicleRental { + "If true, a vehicle can be picked up." + allowPickupNow: Boolean + "Latitude of the vehicle rental object (WGS 84)" + lat: Float + "Longitude of the vehicle rental object (WGS 84)" + lon: Float + "Name of the vehicle" + name: String! + "If true, rental object is not disabled." + operative: Boolean + "The vehicle rental network information. This is referred as system in the GBFS terminology." + rentalNetwork: VehicleRentalNetwork! +} + "Entity related to an alert" union AlertEntity = Agency | Pattern | Route | RouteType | Stop | StopOnRoute | StopOnTrip | Trip | Unknown @@ -1758,7 +1773,7 @@ type RealTimeEstimate { } "Rental vehicle represents a vehicle that belongs to a rental network." -type RentalVehicle implements Node & PlaceInterface { +type RentalVehicle implements Node & PlaceInterface & VehicleRental { "If true, vehicle is currently available for renting." allowPickupNow: Boolean "Global object ID provided by Relay. This value can be used to refetch this object using **node** query." @@ -2480,7 +2495,7 @@ type VehicleRentalNetwork { } "Vehicle rental station represents a location where users can rent bicycles etc. for a fee." -type VehicleRentalStation implements Node & PlaceInterface { +type VehicleRentalStation implements Node & PlaceInterface & VehicleRental { """ If true, vehicles can be returned to this station if the station has spaces available or allows overloading. From d629516981a733a71d99c9c047e3d8456fe8d1d4 Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Tue, 29 Oct 2024 18:39:50 +0100 Subject: [PATCH 013/169] Rename RegularStop gtfsVehicleType to vehicleType - this is not GTFS specific --- .../opentripplanner/ext/geocoder/LuceneIndexTest.java | 4 ++-- .../apis/transmodel/model/stop/StopPlaceType.java | 2 +- .../opentripplanner/netex/mapping/FlexStopsMapper.java | 2 +- .../transit/model/site/RegularStop.java | 10 +++++----- .../transit/model/site/RegularStopBuilder.java | 8 ++++---- .../transit/model/site/StopLocation.java | 2 +- .../transit/service/DefaultTransitService.java | 4 ++-- .../transit/service/TransitService.java | 6 +++--- .../transit/model/site/RegularStopTest.java | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/geocoder/LuceneIndexTest.java b/application/src/ext-test/java/org/opentripplanner/ext/geocoder/LuceneIndexTest.java index 18d61a3db42..030b7fbfb1c 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/geocoder/LuceneIndexTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/geocoder/LuceneIndexTest.java @@ -136,8 +136,8 @@ static void setup() { @Override public List getModesOfStopLocation(StopLocation stop) { - if (stop.getGtfsVehicleType() != null) { - return List.of(stop.getGtfsVehicleType()); + if (stop.getVehicleType() != null) { + return List.of(stop.getVehicleType()); } else { return List.copyOf(modes.get(stop)); } diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/StopPlaceType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/StopPlaceType.java index 00ac5b0e11b..8dbc6291136 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/StopPlaceType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/StopPlaceType.java @@ -183,7 +183,7 @@ public static GraphQLObjectType create( .dataFetcher(environment -> ((MonoOrMultiModalStation) environment.getSource()).getChildStops() .stream() - .map(StopLocation::getGtfsVehicleType) + .map(StopLocation::getVehicleType) .filter(Objects::nonNull) .collect(Collectors.toSet()) ) diff --git a/application/src/main/java/org/opentripplanner/netex/mapping/FlexStopsMapper.java b/application/src/main/java/org/opentripplanner/netex/mapping/FlexStopsMapper.java index 1bbe76c0e7c..f53eb67b01a 100644 --- a/application/src/main/java/org/opentripplanner/netex/mapping/FlexStopsMapper.java +++ b/application/src/main/java/org/opentripplanner/netex/mapping/FlexStopsMapper.java @@ -140,7 +140,7 @@ List findStopsInFlexArea( List stops = stopsSpatialIndex .query(geometry.getEnvelopeInternal()) .stream() - .filter(stop -> flexibleStopTransitMode == stop.getGtfsVehicleType()) + .filter(stop -> flexibleStopTransitMode == stop.getVehicleType()) .filter(stop -> geometry.contains(stop.getGeometry())) .toList(); diff --git a/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java b/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java index 0ded9d64dab..4813790b043 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java +++ b/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java @@ -29,7 +29,7 @@ public final class RegularStop private final ZoneId timeZone; - private final TransitMode gtfsVehicleType; + private final TransitMode vehicleType; private final SubMode netexVehicleSubmode; @@ -43,7 +43,7 @@ public final class RegularStop this.platformCode = builder.platformCode(); this.url = builder.url(); this.timeZone = builder.timeZone(); - this.gtfsVehicleType = builder.vehicleType(); + this.vehicleType = builder.vehicleType(); this.netexVehicleSubmode = SubMode.getOrBuildAndCacheForever(builder.netexVehicleSubmode()); this.boardingAreas = setOfNullSafe(builder.boardingAreas()); this.fareZones = setOfNullSafe(builder.fareZones()); @@ -102,8 +102,8 @@ public ZoneId getTimeZone() { */ @Override @Nullable - public TransitMode getGtfsVehicleType() { - return gtfsVehicleType; + public TransitMode getVehicleType() { + return vehicleType; } public SubMode getNetexVehicleSubmode() { @@ -148,7 +148,7 @@ public boolean sameAs(RegularStop other) { Objects.equals(platformCode, other.platformCode) && Objects.equals(url, other.url) && Objects.equals(timeZone, other.timeZone) && - Objects.equals(gtfsVehicleType, other.gtfsVehicleType) && + Objects.equals(vehicleType, other.vehicleType) && Objects.equals(netexVehicleSubmode, other.netexVehicleSubmode) && Objects.equals(boardingAreas, other.boardingAreas) && Objects.equals(fareZones, other.fareZones) diff --git a/application/src/main/java/org/opentripplanner/transit/model/site/RegularStopBuilder.java b/application/src/main/java/org/opentripplanner/transit/model/site/RegularStopBuilder.java index 3b37a709078..5e6cd01618b 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/site/RegularStopBuilder.java +++ b/application/src/main/java/org/opentripplanner/transit/model/site/RegularStopBuilder.java @@ -26,7 +26,7 @@ public final class RegularStopBuilder private ZoneId timeZone; - private TransitMode gtfsVehicleType; + private TransitMode vehicleType; private String netexVehicleSubmode; @@ -45,7 +45,7 @@ public final class RegularStopBuilder this.platformCode = original.getPlatformCode(); this.url = original.getUrl(); this.timeZone = original.getTimeZone(); - this.gtfsVehicleType = original.getGtfsVehicleType(); + this.vehicleType = original.getVehicleType(); this.netexVehicleSubmode = original.getNetexVehicleSubmode().name(); } @@ -68,11 +68,11 @@ public RegularStopBuilder withUrl(I18NString url) { } public TransitMode vehicleType() { - return gtfsVehicleType; + return vehicleType; } public RegularStopBuilder withVehicleType(TransitMode vehicleType) { - this.gtfsVehicleType = vehicleType; + this.vehicleType = vehicleType; return this; } diff --git a/application/src/main/java/org/opentripplanner/transit/model/site/StopLocation.java b/application/src/main/java/org/opentripplanner/transit/model/site/StopLocation.java index d9c79732970..42b9385521c 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/site/StopLocation.java +++ b/application/src/main/java/org/opentripplanner/transit/model/site/StopLocation.java @@ -62,7 +62,7 @@ default String getPlatformCode() { } @Nullable - default TransitMode getGtfsVehicleType() { + default TransitMode getVehicleType() { return null; } diff --git a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java index 2ce99e7809b..5ed7b804ee0 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java @@ -731,8 +731,8 @@ public Map getServiceCodesRunningForDate() { * For each pattern visiting this {@link StopLocation} return its {@link TransitMode} */ private Stream getPatternModesOfStop(StopLocation stop) { - if (stop.getGtfsVehicleType() != null) { - return Stream.of(stop.getGtfsVehicleType()); + if (stop.getVehicleType() != null) { + return Stream.of(stop.getVehicleType()); } else { return getPatternsForStop(stop).stream().map(TripPattern::getMode); } diff --git a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java index 7be2a29065a..3b667432092 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java @@ -287,7 +287,7 @@ List stopTimesForPatternAtStop( /** * For a {@link StopLocationsGroup} get all child stops and get their modes. *

- * The mode is either taken from {@link StopLocation#getGtfsVehicleType()} (if non-null) + * The mode is either taken from {@link StopLocation#getVehicleType()} (if non-null) * or from the list of patterns that use the stop location. *

* The returning stream is ordered by the number of occurrences of the mode in the child stops. @@ -297,10 +297,10 @@ List stopTimesForPatternAtStop( /** * For a {@link StopLocation} return its modes. *

- * The mode is either taken from {@link StopLocation#getGtfsVehicleType()} (if non-null) + * The mode is either taken from {@link StopLocation#getVehicleType()} (if non-null) * or from the list of patterns that use the stop location. *

- * If {@link StopLocation#getGtfsVehicleType()} is null the returning stream is ordered by the number + * If {@link StopLocation#getVehicleType()} is null the returning stream is ordered by the number * of occurrences of the mode in the stop. *

* So, if more patterns of mode BUS than RAIL visit the stop, the result will be [BUS,RAIL]. diff --git a/application/src/test/java/org/opentripplanner/transit/model/site/RegularStopTest.java b/application/src/test/java/org/opentripplanner/transit/model/site/RegularStopTest.java index c2c50b24c9e..cfcab8a0b13 100644 --- a/application/src/test/java/org/opentripplanner/transit/model/site/RegularStopTest.java +++ b/application/src/test/java/org/opentripplanner/transit/model/site/RegularStopTest.java @@ -78,7 +78,7 @@ void copy() { assertEquals(WHEELCHAIR_ACCESSIBILITY, copy.getWheelchairAccessibility()); // TODO inconsistent naming assertEquals(NETEX_SUBMODE, copy.getNetexVehicleSubmode()); - assertEquals(VEHICLE_TYPE, copy.getGtfsVehicleType()); + assertEquals(VEHICLE_TYPE, copy.getVehicleType()); assertEquals(TIME_ZONE, copy.getTimeZone()); assertEquals(PLATFORM_CODE, copy.getPlatformCode()); } From d04ab964247195ba15c0b21d1108f61118a99bd3 Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Tue, 29 Oct 2024 19:34:55 +0100 Subject: [PATCH 014/169] Make sure unused rail stops are included when generating regular transfers. --- .../framework/application/OTPFeature.java | 11 ++++ .../PatternConsideringNearbyStopFinder.java | 25 ++++--- .../transit/model/site/RegularStop.java | 8 +++ doc/user/Configuration.md | 65 ++++++++++--------- 4 files changed, 69 insertions(+), 40 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java b/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java index 324f5397673..e81f1ecbe3b 100644 --- a/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java +++ b/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java @@ -18,6 +18,17 @@ public enum OTPFeature { APIBikeRental(true, false, "Enable the bike rental endpoint."), APIServerInfo(true, false, "Enable the server info endpoint."), APIUpdaterStatus(true, false, "Enable endpoint for graph updaters status."), + IncludeEmptyRailStopsInTransfers( + false, + false, + """ + Turning this on make sure that Rail stops without scheduled patterns still get included + when generating transfers using `ConsiderPatternsForDirectTransfers`. It is common for stops + to be assign at realtime for Rail, if so turning this on will help to avoid dropping transfers + witch is needed, when the stop become in use later. Turning this on, if + ConsiderPatternsForDirectTransfers is off have no effect. + """ + ), ConsiderPatternsForDirectTransfers( true, false, diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java b/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java index 9abf759d076..70d1aac3483 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java @@ -1,10 +1,9 @@ package org.opentripplanner.graph_builder.module.nearbystops; -import java.time.Duration; +import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; -import org.opentripplanner.ext.dataoverlay.routing.DataOverlayContext; import org.opentripplanner.ext.flex.trip.FlexTrip; import org.opentripplanner.framework.application.OTPFeature; import org.opentripplanner.routing.api.request.RouteRequest; @@ -49,6 +48,9 @@ public List findNearbyStops( /* Track the closest stop on each flex trip nearby. */ MinMap, NearbyStop> closestStopForFlexTrip = new MinMap<>(); + /* The end result */ + Set uniqueStopsResult = new HashSet<>(); + /* Iterate over nearby stops via the street network or using straight-line distance. */ for (NearbyStop nearbyStop : delegateNearbyStopFinder.findNearbyStops( vertex, @@ -58,9 +60,17 @@ public List findNearbyStops( )) { StopLocation ts1 = nearbyStop.stop; - if (ts1 instanceof RegularStop) { + if (ts1 instanceof RegularStop regularStop) { /* Consider this destination stop as a candidate for every trip pattern passing through it. */ - for (TripPattern pattern : transitService.getPatternsForStop(ts1)) { + Collection patternsForStop = transitService.getPatternsForStop(ts1); + + if (OTPFeature.IncludeEmptyRailStopsInTransfers.isOn()) { + if (patternsForStop.isEmpty() && regularStop.isRailStop()) { + uniqueStopsResult.add(nearbyStop); + } + } + + for (TripPattern pattern : patternsForStop) { if ( reverseDirection ? pattern.canAlight(nearbyStop.stop) @@ -85,10 +95,9 @@ public List findNearbyStops( } /* Make a transfer from the origin stop to each destination stop that was the closest stop on any pattern. */ - Set uniqueStops = new HashSet<>(); - uniqueStops.addAll(closestStopForFlexTrip.values()); - uniqueStops.addAll(closestStopForPattern.values()); + uniqueStopsResult.addAll(closestStopForFlexTrip.values()); + uniqueStopsResult.addAll(closestStopForPattern.values()); // TODO: don't convert to list - return uniqueStops.stream().toList(); + return uniqueStopsResult.stream().toList(); } } diff --git a/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java b/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java index 4813790b043..7c2a1aaf3c5 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java +++ b/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java @@ -106,6 +106,14 @@ public TransitMode getVehicleType() { return vehicleType; } + /** + * Return {@code true} if the vehicle type is set in the import to be RAIL. Note! This does + * not check pattens visiting the stop. + */ + public boolean isRailStop() { + return vehicleType == TransitMode.RAIL; + } + public SubMode getNetexVehicleSubmode() { return netexVehicleSubmode; } diff --git a/doc/user/Configuration.md b/doc/user/Configuration.md index bca974f8617..80704eae459 100644 --- a/doc/user/Configuration.md +++ b/doc/user/Configuration.md @@ -219,38 +219,39 @@ Here is a list of all features which can be toggled on/off and their default val -| Feature | Description | Enabled by default | Sandbox | -|--------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------:|:-------:| -| `APIBikeRental` | Enable the bike rental endpoint. | ✓️ | | -| `APIServerInfo` | Enable the server info endpoint. | ✓️ | | -| `APIUpdaterStatus` | Enable endpoint for graph updaters status. | ✓️ | | -| `ConsiderPatternsForDirectTransfers` | Enable limiting transfers so that there is only a single transfer to each pattern. | ✓️ | | -| `DebugUi` | Enable the debug GraphQL client and web UI and located at the root of the web server as well as the debug map tiles it uses. Be aware that the map tiles are not a stable API and can change without notice. Use the [vector tiles feature if](sandbox/MapboxVectorTilesApi.md) you want a stable map tiles API. | ✓️ | | -| `ExtraTransferLegOnSameStop` | Should there be a transfer leg when transferring on the very same stop. Note that for in-seat/interlined transfers no transfer leg will be generated. | | | -| `FloatingBike` | Enable floating bike routing. | ✓️ | | -| `GtfsGraphQlApi` | Enable the [GTFS GraphQL API](apis/GTFS-GraphQL-API.md). | ✓️ | | -| `GtfsGraphQlApiRentalStationFuzzyMatching` | Does vehicleRentalStation query also allow ids that are not feed scoped. | | | -| `MinimumTransferTimeIsDefinitive` | If the minimum transfer time is a lower bound (default) or the definitive time for the transfer. Set this to `true` if you want to set a transfer time lower than what OTP derives from OSM data. | | | -| `OptimizeTransfers` | OTP will inspect all itineraries found and optimize where (which stops) the transfer will happen. Waiting time, priority and guaranteed transfers are taken into account. | ✓️ | | -| `ParallelRouting` | Enable performing parts of the trip planning in parallel. | | | -| `TransferConstraints` | Enforce transfers to happen according to the _transfers.txt_ (GTFS) and Interchanges (NeTEx). Turning this _off_ will increase the routing performance a little. | ✓️ | | -| `TransmodelGraphQlApi` | Enable the [Transmodel (NeTEx) GraphQL API](apis/TransmodelApi.md). | ✓️ | ✓️ | -| `ActuatorAPI` | Endpoint for actuators (service health status). | | ✓️ | -| `AsyncGraphQLFetchers` | Whether the @async annotation in the GraphQL schema should lead to the fetch being executed asynchronously. This allows batch or alias queries to run in parallel at the cost of consuming extra threads. | | | -| `Co2Emissions` | Enable the emissions sandbox module. | | ✓️ | -| `DataOverlay` | Enable usage of data overlay when calculating costs for the street network. | | ✓️ | -| `FaresV2` | Enable import of GTFS-Fares v2 data. | | ✓️ | -| `FlexRouting` | Enable FLEX routing. | | ✓️ | -| `GoogleCloudStorage` | Enable Google Cloud Storage integration. | | ✓️ | -| `LegacyRestApi` | Enable legacy REST API. This API will be removed in the future. | | ✓️ | -| `MultiCriteriaGroupMaxFilter` | Keep the best itinerary with respect to each criteria used in the transit-routing search. For example the itinerary with the lowest cost, fewest transfers, and each unique transit-group (transit-group-priority) is kept, even if the max-limit is exceeded. This is turned off by default for now, until this feature is well tested. | | | -| `RealtimeResolver` | When routing with ignoreRealtimeUpdates=true, add an extra step which populates results with real-time data | | ✓️ | -| `ReportApi` | Enable the report API. | | ✓️ | -| `RestAPIPassInDefaultConfigAsJson` | Enable a default RouteRequest to be passed in as JSON on the REST API - FOR DEBUGGING ONLY! | | | -| `SandboxAPIGeocoder` | Enable the Geocoder API. | | ✓️ | -| `SandboxAPIMapboxVectorTilesApi` | Enable Mapbox vector tiles API. | | ✓️ | -| `SandboxAPIParkAndRideApi` | Enable park-and-ride endpoint. | | ✓️ | -| `TransferAnalyzer` | Analyze transfers during graph build. | | ✓️ | +| Feature | Description | Enabled by default | Sandbox | +|--------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------:|:-------:| +| `APIBikeRental` | Enable the bike rental endpoint. | ✓️ | | +| `APIServerInfo` | Enable the server info endpoint. | ✓️ | | +| `APIUpdaterStatus` | Enable endpoint for graph updaters status. | ✓️ | | +| `IncludeEmptyRailStopsInTransfers` | Turning this on make sure that Rail stops without scheduled patterns still get included when generating transfers using `ConsiderPatternsForDirectTransfers`. It is common for stops to be assign at realtime for Rail, if so turning this on will help to avoid dropping transfers witch is needed, when the stop become in use later. Turning this on, if ConsiderPatternsForDirectTransfers is off have no effect. | | | +| `ConsiderPatternsForDirectTransfers` | Enable limiting transfers so that there is only a single transfer to each pattern. | ✓️ | | +| `DebugUi` | Enable the debug GraphQL client and web UI and located at the root of the web server as well as the debug map tiles it uses. Be aware that the map tiles are not a stable API and can change without notice. Use the [vector tiles feature if](sandbox/MapboxVectorTilesApi.md) you want a stable map tiles API. | ✓️ | | +| `ExtraTransferLegOnSameStop` | Should there be a transfer leg when transferring on the very same stop. Note that for in-seat/interlined transfers no transfer leg will be generated. | | | +| `FloatingBike` | Enable floating bike routing. | ✓️ | | +| `GtfsGraphQlApi` | Enable the [GTFS GraphQL API](apis/GTFS-GraphQL-API.md). | ✓️ | | +| `GtfsGraphQlApiRentalStationFuzzyMatching` | Does vehicleRentalStation query also allow ids that are not feed scoped. | | | +| `MinimumTransferTimeIsDefinitive` | If the minimum transfer time is a lower bound (default) or the definitive time for the transfer. Set this to `true` if you want to set a transfer time lower than what OTP derives from OSM data. | | | +| `OptimizeTransfers` | OTP will inspect all itineraries found and optimize where (which stops) the transfer will happen. Waiting time, priority and guaranteed transfers are taken into account. | ✓️ | | +| `ParallelRouting` | Enable performing parts of the trip planning in parallel. | | | +| `TransferConstraints` | Enforce transfers to happen according to the _transfers.txt_ (GTFS) and Interchanges (NeTEx). Turning this _off_ will increase the routing performance a little. | ✓️ | | +| `TransmodelGraphQlApi` | Enable the [Transmodel (NeTEx) GraphQL API](apis/TransmodelApi.md). | ✓️ | ✓️ | +| `ActuatorAPI` | Endpoint for actuators (service health status). | | ✓️ | +| `AsyncGraphQLFetchers` | Whether the @async annotation in the GraphQL schema should lead to the fetch being executed asynchronously. This allows batch or alias queries to run in parallel at the cost of consuming extra threads. | | | +| `Co2Emissions` | Enable the emissions sandbox module. | | ✓️ | +| `DataOverlay` | Enable usage of data overlay when calculating costs for the street network. | | ✓️ | +| `FaresV2` | Enable import of GTFS-Fares v2 data. | | ✓️ | +| `FlexRouting` | Enable FLEX routing. | | ✓️ | +| `GoogleCloudStorage` | Enable Google Cloud Storage integration. | | ✓️ | +| `LegacyRestApi` | Enable legacy REST API. This API will be removed in the future. | | ✓️ | +| `MultiCriteriaGroupMaxFilter` | Keep the best itinerary with respect to each criteria used in the transit-routing search. For example the itinerary with the lowest cost, fewest transfers, and each unique transit-group (transit-group-priority) is kept, even if the max-limit is exceeded. This is turned off by default for now, until this feature is well tested. | | | +| `RealtimeResolver` | When routing with ignoreRealtimeUpdates=true, add an extra step which populates results with real-time data | | ✓️ | +| `ReportApi` | Enable the report API. | | ✓️ | +| `RestAPIPassInDefaultConfigAsJson` | Enable a default RouteRequest to be passed in as JSON on the REST API - FOR DEBUGGING ONLY! | | | +| `SandboxAPIGeocoder` | Enable the Geocoder API. | | ✓️ | +| `SandboxAPIMapboxVectorTilesApi` | Enable Mapbox vector tiles API. | | ✓️ | +| `SandboxAPIParkAndRideApi` | Enable park-and-ride endpoint. | | ✓️ | +| `TransferAnalyzer` | Analyze transfers during graph build. | | ✓️ | From 56d774279c286d7b227f41d8549480b2b91b3903 Mon Sep 17 00:00:00 2001 From: JustCris Date: Wed, 30 Oct 2024 14:35:27 +0100 Subject: [PATCH 015/169] implement vehicleRentalsByBbox in graphql gtfs schema --- .../apis/gtfs/datafetchers/QueryTypeImpl.java | 28 +++++++++++ .../gtfs/generated/GraphQLDataFetchers.java | 2 + .../apis/gtfs/generated/GraphQLTypes.java | 49 +++++++++++++++++++ .../opentripplanner/apis/gtfs/schema.graphqls | 11 +++++ 4 files changed, 90 insertions(+) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java index 70471bcf61b..16d017d0d4a 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java @@ -955,6 +955,34 @@ public DataFetcher> vehicleRentalStationsByBbox() }; } + @Override + public DataFetcher> vehicleRentalsByBbox() { + return environment -> { + VehicleRentalService vehicleRentalService = environment + .getContext() + .vehicleRentalService(); + + var args = new GraphQLTypes.GraphQLQueryTypeVehicleRentalsByBboxArgs( + environment.getArguments() + ); + + Envelope envelope = new Envelope( + new Coordinate(args.getGraphQLMinimumLongitude(), args.getGraphQLMinimumLatitude()), + new Coordinate(args.getGraphQLMaximumLongitude(), args.getGraphQLMaximumLatitude()) + ); + + Stream vehicleRental = Stream + .concat( + vehicleRentalService.getVehicleRentalStations().stream(), + vehicleRentalService.getVehicleRentalVehicles().stream() + ) + .filter(vr -> envelope.contains(new Coordinate(vr.getLongitude(), vr.getLatitude()))) + .map(e -> (Object) e); + + return vehicleRental.toList(); + }; + } + @Override public DataFetcher viewer() { return environment -> new Object(); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index 359e32e7159..ede458b1889 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -834,6 +834,8 @@ public interface GraphQLQueryType { public DataFetcher> vehicleRentalStationsByBbox(); + public DataFetcher> vehicleRentalsByBbox(); + public DataFetcher viewer(); } diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index 3124407efe4..9cbed274c0f 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -4025,6 +4025,55 @@ public void setGraphQLMinimumLongitude(Double minimumLongitude) { } } + public static class GraphQLQueryTypeVehicleRentalsByBboxArgs { + + private Double maximumLatitude; + private Double maximumLongitude; + private Double minimumLatitude; + private Double minimumLongitude; + + public GraphQLQueryTypeVehicleRentalsByBboxArgs(Map args) { + if (args != null) { + this.maximumLatitude = (Double) args.get("maximumLatitude"); + this.maximumLongitude = (Double) args.get("maximumLongitude"); + this.minimumLatitude = (Double) args.get("minimumLatitude"); + this.minimumLongitude = (Double) args.get("minimumLongitude"); + } + } + + public Double getGraphQLMaximumLatitude() { + return this.maximumLatitude; + } + + public Double getGraphQLMaximumLongitude() { + return this.maximumLongitude; + } + + public Double getGraphQLMinimumLatitude() { + return this.minimumLatitude; + } + + public Double getGraphQLMinimumLongitude() { + return this.minimumLongitude; + } + + public void setGraphQLMaximumLatitude(Double maximumLatitude) { + this.maximumLatitude = maximumLatitude; + } + + public void setGraphQLMaximumLongitude(Double maximumLongitude) { + this.maximumLongitude = maximumLongitude; + } + + public void setGraphQLMinimumLatitude(Double minimumLatitude) { + this.minimumLatitude = minimumLatitude; + } + + public void setGraphQLMinimumLongitude(Double minimumLongitude) { + this.minimumLongitude = minimumLongitude; + } + } + public enum GraphQLRealtimeState { ADDED, CANCELED, diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index 22f63adafc6..b33fb826379 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -1757,6 +1757,17 @@ type QueryType { "Western bound of the bounding box" minimumLongitude: CoordinateValue! ): [VehicleRentalStation] + "Get all rental vehicles within the specified bounding box" + vehicleRentalsByBbox( + "Northern bound of the bounding box" + maximumLatitude: CoordinateValue!, + "Eastern bound of the bounding box" + maximumLongitude: CoordinateValue!, + "Southern bound of the bounding box" + minimumLatitude: CoordinateValue!, + "Western bound of the bounding box" + minimumLongitude: CoordinateValue! + ): [VehicleRental!]! "Needed until https://github.com/facebook/relay/issues/112 is resolved" viewer: QueryType } From b2b69c92af5e53106f42d8e614f88e055d644485 Mon Sep 17 00:00:00 2001 From: JustCris Date: Wed, 30 Oct 2024 15:21:21 +0100 Subject: [PATCH 016/169] add rentalUris to VehicleRental interface --- .../apis/gtfs/generated/GraphQLDataFetchers.java | 4 ++++ .../resources/org/opentripplanner/apis/gtfs/schema.graphqls | 2 ++ 2 files changed, 6 insertions(+) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index ede458b1889..dbfc9a1ee3b 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -1302,6 +1302,10 @@ public default DataFetcher operative() { public default DataFetcher rentalNetwork() { return null; } + + public default DataFetcher rentalUris() { + return null; + } } /** diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index b33fb826379..e571ea36fb5 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -83,6 +83,8 @@ interface VehicleRental { operative: Boolean "The vehicle rental network information. This is referred as system in the GBFS terminology." rentalNetwork: VehicleRentalNetwork! + "Platform-specific URLs to begin the vehicle." + rentalUris: VehicleRentalUris } "Entity related to an alert" From 8bfa8e20f2afba9a69d9b233ccb609167590f84d Mon Sep 17 00:00:00 2001 From: JustCris Date: Wed, 30 Oct 2024 15:21:45 +0100 Subject: [PATCH 017/169] add vehicleRentalsByBbox graphql tests --- .../expectations/vehicle-rentals-bybbox.json | 83 +++++++++++++++++++ .../queries/vehicle-rentals-bybbox.graphql | 61 ++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json create mode 100644 application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json new file mode 100644 index 00000000000..bbc07a907d5 --- /dev/null +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json @@ -0,0 +1,83 @@ +{ + "data": { + "vehicleRentalsByBbox": [ + { + "__typename": "VehicleRentalStation", + "allowPickupNow": false, + "lat": 47.51, + "lon": 18.99, + "name": "FooStation", + "operative": false, + "rentalNetwork": { + "networkId": "Network-1", + "url": "https://foo.bar" + }, + "rentalUris": null, + "stationId": "Network-1:FooStation", + "vehiclesAvailable": 10, + "availableVehicles": { + "byType": [ + { + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "ELECTRIC" + }, + "count": 5 + }, + { + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "HUMAN" + }, + "count": 5 + } + ], + "total": 10 + }, + "spacesAvailable": 10, + "availableSpaces": { + "byType": [ + { + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "ELECTRIC" + }, + "count": 3 + }, + { + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "HUMAN" + }, + "count": 7 + } + ], + "total": 10 + }, + "allowDropoff": false, + "allowPickup": false, + "allowDropoffNow": false, + "capacity": null, + "allowOverloading": false + }, + { + "__typename": "RentalVehicle", + "allowPickupNow": true, + "lat": 47.52, + "lon": 19.01, + "name": "free-floating-bicycle", + "operative": true, + "rentalNetwork": { + "networkId": "Network-1", + "url": "https://foo.bar" + }, + "rentalUris": null, + "vehicleId": "Network-1:free-floating-bicycle", + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "HUMAN" + } + } + ] + } +} \ No newline at end of file diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql new file mode 100644 index 00000000000..c30a71a5ddd --- /dev/null +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql @@ -0,0 +1,61 @@ +{ + vehicleRentalsByBbox( + maximumLatitude: 48.00 + maximumLongitude: 19.10 + minimumLatitude: 47.50 + minimumLongitude: 18.80 + ) { + __typename + allowPickupNow + lat + lon + name + operative + rentalNetwork { + networkId + url + } + rentalUris { + android + ios + web + } + ... on RentalVehicle { + vehicleId + vehicleType { + formFactor + propulsionType + } + } + ... on VehicleRentalStation { + stationId + vehiclesAvailable + availableVehicles { + byType { + vehicleType { + formFactor + propulsionType + } + count + } + total + } + spacesAvailable + availableSpaces { + byType { + vehicleType { + formFactor + propulsionType + } + count + } + total + } + allowDropoff + allowPickup + allowDropoffNow + capacity + allowOverloading + } + } +} From 8399feaf651e0699addf0f2363617c271650ba50 Mon Sep 17 00:00:00 2001 From: JustCris Date: Wed, 30 Oct 2024 15:28:15 +0100 Subject: [PATCH 018/169] remove vehicleRentalStationsByBbox from gtfs graphql --- .../apis/gtfs/datafetchers/QueryTypeImpl.java | 27 -------- .../gtfs/generated/GraphQLDataFetchers.java | 2 - .../apis/gtfs/generated/GraphQLTypes.java | 49 -------------- .../opentripplanner/apis/gtfs/schema.graphqls | 11 ---- .../vehicle-rental-stations-bybbox.json | 64 ------------------- .../vehicle-rental-stations-bybbox.graphql | 51 --------------- 6 files changed, 204 deletions(-) delete mode 100644 application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-stations-bybbox.json delete mode 100644 application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rental-stations-bybbox.graphql diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java index 16d017d0d4a..8926f84f81c 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java @@ -928,33 +928,6 @@ public DataFetcher> vehicleRentalStations() { }; } - @Override - public DataFetcher> vehicleRentalStationsByBbox() { - return environment -> { - VehicleRentalService vehicleRentalStationService = environment - .getContext() - .vehicleRentalService(); - - var args = new GraphQLTypes.GraphQLQueryTypeVehicleRentalStationsByBboxArgs( - environment.getArguments() - ); - - Envelope envelope = new Envelope( - new Coordinate(args.getGraphQLMinimumLongitude(), args.getGraphQLMinimumLatitude()), - new Coordinate(args.getGraphQLMaximumLongitude(), args.getGraphQLMaximumLatitude()) - ); - - Stream stationStream = vehicleRentalStationService - .getVehicleRentalStations() - .stream() - .filter(station -> - envelope.contains(new Coordinate(station.getLongitude(), station.getLatitude())) - ); - - return stationStream.toList(); - }; - } - @Override public DataFetcher> vehicleRentalsByBbox() { return environment -> { diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index dbfc9a1ee3b..88b624abdf1 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -832,8 +832,6 @@ public interface GraphQLQueryType { public DataFetcher> vehicleRentalStations(); - public DataFetcher> vehicleRentalStationsByBbox(); - public DataFetcher> vehicleRentalsByBbox(); public DataFetcher viewer(); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index 9cbed274c0f..a1cb0a3c144 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -3976,55 +3976,6 @@ public void setGraphQLIds(List ids) { } } - public static class GraphQLQueryTypeVehicleRentalStationsByBboxArgs { - - private Double maximumLatitude; - private Double maximumLongitude; - private Double minimumLatitude; - private Double minimumLongitude; - - public GraphQLQueryTypeVehicleRentalStationsByBboxArgs(Map args) { - if (args != null) { - this.maximumLatitude = (Double) args.get("maximumLatitude"); - this.maximumLongitude = (Double) args.get("maximumLongitude"); - this.minimumLatitude = (Double) args.get("minimumLatitude"); - this.minimumLongitude = (Double) args.get("minimumLongitude"); - } - } - - public Double getGraphQLMaximumLatitude() { - return this.maximumLatitude; - } - - public Double getGraphQLMaximumLongitude() { - return this.maximumLongitude; - } - - public Double getGraphQLMinimumLatitude() { - return this.minimumLatitude; - } - - public Double getGraphQLMinimumLongitude() { - return this.minimumLongitude; - } - - public void setGraphQLMaximumLatitude(Double maximumLatitude) { - this.maximumLatitude = maximumLatitude; - } - - public void setGraphQLMaximumLongitude(Double maximumLongitude) { - this.maximumLongitude = maximumLongitude; - } - - public void setGraphQLMinimumLatitude(Double minimumLatitude) { - this.minimumLatitude = minimumLatitude; - } - - public void setGraphQLMinimumLongitude(Double minimumLongitude) { - this.minimumLongitude = minimumLongitude; - } - } - public static class GraphQLQueryTypeVehicleRentalsByBboxArgs { private Double maximumLatitude; diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index e571ea36fb5..999093ecd73 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -1748,17 +1748,6 @@ type QueryType { """ ids: [String] ): [VehicleRentalStation] - "Get all vehicle rental stations within the specified bounding box" - vehicleRentalStationsByBbox( - "Northern bound of the bounding box" - maximumLatitude: CoordinateValue!, - "Eastern bound of the bounding box" - maximumLongitude: CoordinateValue!, - "Southern bound of the bounding box" - minimumLatitude: CoordinateValue!, - "Western bound of the bounding box" - minimumLongitude: CoordinateValue! - ): [VehicleRentalStation] "Get all rental vehicles within the specified bounding box" vehicleRentalsByBbox( "Northern bound of the bounding box" diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-stations-bybbox.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-stations-bybbox.json deleted file mode 100644 index 0d80956f3ef..00000000000 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-stations-bybbox.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "data": { - "vehicleRentalStationsByBbox": [ - { - "stationId": "Network-1:FooStation", - "name": "FooStation", - "vehiclesAvailable": 10, - "availableVehicles": { - "byType": [ - { - "vehicleType": { - "formFactor": "BICYCLE", - "propulsionType": "ELECTRIC" - }, - "count": 5 - }, - { - "vehicleType": { - "formFactor": "BICYCLE", - "propulsionType": "HUMAN" - }, - "count": 5 - } - ], - "total": 10 - }, - "spacesAvailable": 10, - "availableSpaces": { - "byType": [ - { - "vehicleType": { - "formFactor": "BICYCLE", - "propulsionType": "ELECTRIC" - }, - "count": 3 - }, - { - "vehicleType": { - "formFactor": "BICYCLE", - "propulsionType": "HUMAN" - }, - "count": 7 - } - ], - "total": 10 - }, - "allowDropoff": false, - "allowPickup": false, - "allowDropoffNow": false, - "allowPickupNow": false, - "lon": 18.99, - "lat": 47.51, - "capacity": null, - "allowOverloading": false, - "rentalUris": null, - "operative": false, - "rentalNetwork": { - "networkId": "Network-1", - "url": "https://foo.bar" - } - } - ] - } -} \ No newline at end of file diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rental-stations-bybbox.graphql b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rental-stations-bybbox.graphql deleted file mode 100644 index abd47f02e24..00000000000 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rental-stations-bybbox.graphql +++ /dev/null @@ -1,51 +0,0 @@ -{ - vehicleRentalStationsByBbox( - maximumLatitude: 48.00 - maximumLongitude: 19.00 - minimumLatitude: 47.50 - minimumLongitude: 18.80 - ) { - stationId - name - vehiclesAvailable - availableVehicles { - byType { - vehicleType { - formFactor - propulsionType - } - count - } - total - } - spacesAvailable - availableSpaces { - byType { - vehicleType { - formFactor - propulsionType - } - count - } - total - } - allowDropoff - allowPickup - allowDropoffNow - allowPickupNow - lon - lat - capacity - allowOverloading - rentalUris { - android - ios - web - } - operative - rentalNetwork { - networkId - url - } - } -} From dc53513be3d0a8f640fdcead50284633c77c33df Mon Sep 17 00:00:00 2001 From: JustCris Date: Mon, 4 Nov 2024 09:29:11 +0100 Subject: [PATCH 019/169] add comment description to VehicleRental interface --- .../main/resources/org/opentripplanner/apis/gtfs/schema.graphqls | 1 + 1 file changed, 1 insertion(+) diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index 999093ecd73..2b6178ca34f 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -70,6 +70,7 @@ interface PlaceInterface { lon: Float } +"Interface for rental vehicles, e.g. free floating vehicles and rental vehicle stations" interface VehicleRental { "If true, a vehicle can be picked up." allowPickupNow: Boolean From f913a38b7410aea3efbea2fc41c99b83d64a1e0c Mon Sep 17 00:00:00 2001 From: JustCris Date: Mon, 4 Nov 2024 10:43:44 +0100 Subject: [PATCH 020/169] return VehicleRentalPlace from vehicleRentalsByBbox --- .../apis/gtfs/datafetchers/QueryTypeImpl.java | 9 +++++---- .../apis/gtfs/generated/GraphQLDataFetchers.java | 3 ++- .../apis/gtfs/generated/graphql-codegen.yml | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java index 8926f84f81c..d9e7b9e7095 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java @@ -929,7 +929,7 @@ public DataFetcher> vehicleRentalStations() { } @Override - public DataFetcher> vehicleRentalsByBbox() { + public DataFetcher> vehicleRentalsByBbox() { return environment -> { VehicleRentalService vehicleRentalService = environment .getContext() @@ -944,13 +944,14 @@ public DataFetcher> vehicleRentalsByBbox() { new Coordinate(args.getGraphQLMaximumLongitude(), args.getGraphQLMaximumLatitude()) ); - Stream vehicleRental = Stream + Stream vehicleRental = Stream .concat( vehicleRentalService.getVehicleRentalStations().stream(), vehicleRentalService.getVehicleRentalVehicles().stream() ) - .filter(vr -> envelope.contains(new Coordinate(vr.getLongitude(), vr.getLatitude()))) - .map(e -> (Object) e); + .filter(vr -> envelope.contains( + new Coordinate(vr.getLongitude(), vr.getLatitude()) + )); return vehicleRental.toList(); }; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index 88b624abdf1..cd381f1ae73 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -832,7 +832,7 @@ public interface GraphQLQueryType { public DataFetcher> vehicleRentalStations(); - public DataFetcher> vehicleRentalsByBbox(); + public DataFetcher> vehicleRentalsByBbox(); public DataFetcher viewer(); } @@ -1276,6 +1276,7 @@ public interface GraphQLVehiclePosition { public DataFetcher vehicleId(); } + /** Interface for rental vehicles, e.g. free floating vehicles and rental vehicle stations */ public interface GraphQLVehicleRental extends TypeResolver { public default DataFetcher allowPickupNow() { return null; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml index 2a7f2a95ba0..affbbd577d3 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml @@ -125,4 +125,5 @@ config: FareMedium: org.opentripplanner.model.fare.FareMedium#FareMedium RiderCategory: org.opentripplanner.model.fare.RiderCategory#RiderCategory StopPosition: org.opentripplanner.apis.gtfs.model.StopPosition#StopPosition + VehicleRental: org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace#VehicleRentalPlace From 2699bc4952cb48f41b3ad88f7f27adb470a786ee Mon Sep 17 00:00:00 2001 From: JustCris Date: Mon, 4 Nov 2024 11:51:29 +0100 Subject: [PATCH 021/169] use vehicleRentalService method to get vehicleRentalPlaces --- .../apis/gtfs/datafetchers/QueryTypeImpl.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java index d9e7b9e7095..5e510914eac 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java @@ -944,14 +944,10 @@ public DataFetcher> vehicleRentalsByBbox() { new Coordinate(args.getGraphQLMaximumLongitude(), args.getGraphQLMaximumLatitude()) ); - Stream vehicleRental = Stream - .concat( - vehicleRentalService.getVehicleRentalStations().stream(), - vehicleRentalService.getVehicleRentalVehicles().stream() - ) - .filter(vr -> envelope.contains( - new Coordinate(vr.getLongitude(), vr.getLatitude()) - )); + Stream vehicleRental = vehicleRentalService + .getVehicleRentalPlaces() + .stream() + .filter(vr -> envelope.contains(new Coordinate(vr.getLongitude(), vr.getLatitude()))); return vehicleRental.toList(); }; From 9a0e17f6d4c23f933c6a2d29ae0ead0f7cea9394 Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Tue, 5 Nov 2024 10:40:20 +0200 Subject: [PATCH 022/169] fix missing walk state in splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching --- .../street/model/edge/StreetEdge.java | 5 +- .../model/edge/StreetEdgeGeofencingTest.java | 68 +++++++++++++++++-- 2 files changed, 66 insertions(+), 7 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java index 92244fe2af2..2be43ce4395 100644 --- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java +++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java @@ -1005,7 +1005,10 @@ private State[] splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching(St } return null; }); - return State.ofStream(states); + + StateEditor walking = doTraverse(s0, TraverseMode.WALK, false); + var forkState = walking.makeState(); + return State.ofStream(Stream.concat(Stream.of(forkState), states)); } /** diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java index 3375d94f5af..4a1596d3450 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java @@ -13,10 +13,12 @@ import static org.opentripplanner.street.search.state.VehicleRentalState.HAVE_RENTED; import static org.opentripplanner.street.search.state.VehicleRentalState.RENTING_FLOATING; +import java.util.Arrays; import java.util.Set; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.opentripplanner.routing.api.request.StreetMode; +import org.opentripplanner.routing.api.request.preference.RoutingPreferences; import org.opentripplanner.service.vehiclerental.model.GeofencingZone; import org.opentripplanner.service.vehiclerental.street.BusinessAreaBorder; import org.opentripplanner.service.vehiclerental.street.GeofencingZoneExtension; @@ -259,10 +261,15 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { // we return 3 states: one for the speculative renting of a vehicle, but with the information // of which networks' no-drop-off zones it started in - assertEquals(3, states.length); + assertEquals(4, states.length); + + // first the fallback walk state + final State walkState = states[0]; + assertEquals(HAVE_RENTED, walkState.getVehicleRentalState()); + assertEquals(WALK, walkState.currentMode()); - // first the speculative renting case - final State speculativeRenting = states[0]; + // then the speculative renting case + final State speculativeRenting = states[1]; assertEquals(RENTING_FLOATING, speculativeRenting.getVehicleRentalState()); assertEquals(BICYCLE, speculativeRenting.currentMode()); // null means that the vehicle has been rented speculatively and the rest of the backwards search @@ -273,14 +280,13 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { speculativeRenting.stateData.noRentalDropOffZonesAtStartOfReverseSearch ); - // first the speculative renting case - final State tierState = states[1]; + final State tierState = states[2]; assertEquals(RENTING_FLOATING, tierState.getVehicleRentalState()); assertEquals(BICYCLE, tierState.currentMode()); assertEquals(NETWORK_TIER, tierState.getVehicleRentalNetwork()); assertEquals(Set.of(), tierState.stateData.noRentalDropOffZonesAtStartOfReverseSearch); - final State birdState = states[2]; + final State birdState = states[3]; assertEquals(RENTING_FLOATING, birdState.getVehicleRentalState()); assertEquals(BICYCLE, birdState.currentMode()); assertEquals(NETWORK_BIRD, birdState.getVehicleRentalNetwork()); @@ -294,6 +300,56 @@ private static StreetSearchRequest defaultArriveByRequest() { .withArriveBy(true) .build(); } + + @Test + public void hslFailTst() { + StreetVertex V5 = intersectionVertex("V5", 1, 1); + StreetVertex V6 = intersectionVertex("V6", 2, 2); + V6.addRentalRestriction(NO_DROP_OFF_TIER); + Edge edge = streetEdge(V5, V6); + var req = hslArriveByRequest(); + var haveRentedState = State + .getInitialStates(Set.of(V6), req) + .stream() + .filter(s -> s.getVehicleRentalState() == HAVE_RENTED) + .findAny() + .get(); + var states = edge.traverse(haveRentedState); + assertEquals(3, states.length); + State stateUnknownNetwork = Arrays + .stream(states) + .filter(s -> s.getVehicleRentalState() == RENTING_FLOATING && s.unknownRentalNetwork()) + .findAny() + .get(); + State stateTierNetwork = Arrays + .stream(states) + .filter(s -> + s.getVehicleRentalState() == RENTING_FLOATING && + s.getVehicleRentalNetwork() == NETWORK_TIER + ) + .findAny() + .get(); + State stateWalk = Arrays + .stream(states) + .filter(s -> s.getVehicleRentalState() == HAVE_RENTED) + .findAny() + .get(); + assertNotNull(stateUnknownNetwork); + assertNotNull(stateTierNetwork); + assertNotNull(stateWalk); + assertEquals(stateWalk.currentMode(), WALK); + } + + private static StreetSearchRequest hslArriveByRequest() { + return StreetSearchRequest + .of() + .withPreferences(p -> + p.withBike(b -> b.withRental(r -> r.withAllowedNetworks(Set.of(NETWORK_TIER)))) + ) + .withMode(StreetMode.BIKE_RENTAL) + .withArriveBy(true) + .build(); + } } private static GeofencingZoneExtension noDropOffRestriction(String networkTier) { From ccc614041f838cb1f23d3c133f1fb9830b3f5e6c Mon Sep 17 00:00:00 2001 From: JustCris Date: Tue, 5 Nov 2024 11:45:48 +0100 Subject: [PATCH 023/169] move getVehicleRentalPlacesByBbox filter to VehicleRentalService --- .../apis/gtfs/datafetchers/QueryTypeImpl.java | 15 +++++---------- .../vehiclerental/VehicleRentalService.java | 10 ++++++++++ .../internal/DefaultVehicleRentalService.java | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java index 5e510914eac..c7e4644bd38 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java @@ -939,17 +939,12 @@ public DataFetcher> vehicleRentalsByBbox() { environment.getArguments() ); - Envelope envelope = new Envelope( - new Coordinate(args.getGraphQLMinimumLongitude(), args.getGraphQLMinimumLatitude()), - new Coordinate(args.getGraphQLMaximumLongitude(), args.getGraphQLMaximumLatitude()) + return vehicleRentalService.getVehicleRentalPlacesForEnvelope( + args.getGraphQLMinimumLongitude(), + args.getGraphQLMinimumLatitude(), + args.getGraphQLMaximumLongitude(), + args.getGraphQLMaximumLatitude() ); - - Stream vehicleRental = vehicleRentalService - .getVehicleRentalPlaces() - .stream() - .filter(vr -> envelope.contains(new Coordinate(vr.getLongitude(), vr.getLatitude()))); - - return vehicleRental.toList(); }; } diff --git a/application/src/main/java/org/opentripplanner/service/vehiclerental/VehicleRentalService.java b/application/src/main/java/org/opentripplanner/service/vehiclerental/VehicleRentalService.java index 93fe12a1c7c..fa65dd86987 100644 --- a/application/src/main/java/org/opentripplanner/service/vehiclerental/VehicleRentalService.java +++ b/application/src/main/java/org/opentripplanner/service/vehiclerental/VehicleRentalService.java @@ -38,4 +38,14 @@ List getVehicleRentalStationForEnvelope( double maxLon, double maxLat ); + + /** + * Gets all vehicle rental places inside an envelope. + */ + List getVehicleRentalPlacesForEnvelope( + double minLon, + double minLat, + double maxLon, + double maxLat + ); } diff --git a/application/src/main/java/org/opentripplanner/service/vehiclerental/internal/DefaultVehicleRentalService.java b/application/src/main/java/org/opentripplanner/service/vehiclerental/internal/DefaultVehicleRentalService.java index 996f4cbcc9d..1f66d654cdb 100644 --- a/application/src/main/java/org/opentripplanner/service/vehiclerental/internal/DefaultVehicleRentalService.java +++ b/application/src/main/java/org/opentripplanner/service/vehiclerental/internal/DefaultVehicleRentalService.java @@ -119,4 +119,23 @@ private Stream getVehicleRentalStationsAsStream() { .filter(VehicleRentalStation.class::isInstance) .map(VehicleRentalStation.class::cast); } + + @Override + public List getVehicleRentalPlacesForEnvelope( + double minLon, + double minLat, + double maxLon, + double maxLat + ) { + Envelope envelope = new Envelope( + new Coordinate(minLon, minLat), + new Coordinate(maxLon, maxLat) + ); + + Stream vehicleRentalPlaceStream = getVehicleRentalPlaces() + .stream() + .filter(vr -> envelope.contains(new Coordinate(vr.getLongitude(), vr.getLatitude()))); + + return vehicleRentalPlaceStream.toList(); + } } From 0482fb74645c2c2701ab0eac35e6de01029a1d99 Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Tue, 5 Nov 2024 14:29:18 +0000 Subject: [PATCH 024/169] move SearchDirection to a separate class and rename to SearchTime --- .../apis/gtfs/datafetchers/LegImpl.java | 7 ++++--- .../apis/transmodel/model/plan/LegType.java | 6 +++--- .../alternativelegs/AlternativeLegs.java | 17 ++++++----------- .../routing/alternativelegs/SearchTime.java | 6 ++++++ .../routing/stoptimes/AlternativeLegsTest.java | 9 +++++---- 5 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 application/src/main/java/org/opentripplanner/routing/alternativelegs/SearchTime.java diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java index 5548ca5ff59..3f1255d9985 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java @@ -28,6 +28,7 @@ import org.opentripplanner.routing.alertpatch.TransitAlert; import org.opentripplanner.routing.alternativelegs.AlternativeLegs; import org.opentripplanner.routing.alternativelegs.AlternativeLegsFilter; +import org.opentripplanner.routing.alternativelegs.SearchTime; import org.opentripplanner.transit.model.network.Route; import org.opentripplanner.transit.model.organization.Agency; import org.opentripplanner.transit.model.timetable.Trip; @@ -277,16 +278,16 @@ private Leg getSource(DataFetchingEnvironment environment) { @Override public DataFetcher> previousLegs() { - return alternativeLegs(AlternativeLegs.SearchDirection.PREVIOUS); + return alternativeLegs(SearchTime.BEFORE); } @Override public DataFetcher> nextLegs() { - return alternativeLegs(AlternativeLegs.SearchDirection.NEXT); + return alternativeLegs(SearchTime.AFTER); } private DataFetcher> alternativeLegs( - AlternativeLegs.SearchDirection searchDirection + SearchTime searchDirection ) { return environment -> { if (environment.getSource() instanceof ScheduledTransitLeg originalLeg) { diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java index 6ba90ea8b09..6ca8c74070e 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java @@ -33,7 +33,7 @@ import org.opentripplanner.model.plan.TransitLeg; import org.opentripplanner.model.plan.legreference.LegReferenceSerializer; import org.opentripplanner.routing.alternativelegs.AlternativeLegs; -import org.opentripplanner.routing.alternativelegs.AlternativeLegs.SearchDirection; +import org.opentripplanner.routing.alternativelegs.SearchTime; public class LegType { @@ -486,7 +486,7 @@ public static GraphQLObjectType create( leg, env.getArgument("previous"), GqlUtil.getTransitService(env), - SearchDirection.PREVIOUS, + SearchTime.BEFORE, env.getArgument("filter") ); }) @@ -526,7 +526,7 @@ public static GraphQLObjectType create( leg, env.getArgument("next"), GqlUtil.getTransitService(env), - SearchDirection.NEXT, + SearchTime.AFTER, env.getArgument("filter") ); }) diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java index b7c20b4c12d..7a1c45684cd 100644 --- a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java +++ b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java @@ -39,18 +39,13 @@ */ public class AlternativeLegs { - public enum SearchDirection { - NEXT, - PREVIOUS, - } - public static final int ZERO_COST = 0; public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - SearchDirection searchDirection, + SearchTime searchDirection, AlternativeLegsFilter filter ) { return getAlternativeLegs( @@ -86,7 +81,7 @@ public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - SearchDirection searchDirection, + SearchTime searchDirection, AlternativeLegsFilter filter, boolean exactOriginStop, boolean exactDestinationStop @@ -109,7 +104,7 @@ public static List getAlternativeLegs( ScheduledTransitLeg::getStartTime ); - if (searchDirection == SearchDirection.PREVIOUS) { + if (searchDirection == SearchTime.BEFORE) { legComparator = legComparator.reversed(); } @@ -140,7 +135,7 @@ private static Stream generateLegs( TripPatternBetweenStops tripPatternBetweenStops, ZonedDateTime departureTime, LocalDate originalDate, - SearchDirection searchDirection + SearchTime searchDirection ) { TripPattern pattern = tripPatternBetweenStops.tripPattern; int boardingPosition = tripPatternBetweenStops.positions.boardingPosition; @@ -153,7 +148,7 @@ private static Stream generateLegs( tts.getServiceDayMidnight() + tts.getRealtimeDeparture() ); - if (searchDirection == SearchDirection.PREVIOUS) { + if (searchDirection == SearchTime.BEFORE) { comparator = comparator.reversed(); } @@ -183,7 +178,7 @@ private static Stream generateLegs( continue; } - boolean departureTimeInRange = searchDirection == SearchDirection.PREVIOUS + boolean departureTimeInRange = searchDirection == SearchTime.BEFORE ? tripTimes.getDepartureTime(boardingPosition) <= secondsSinceMidnight : tripTimes.getDepartureTime(boardingPosition) >= secondsSinceMidnight; diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/SearchTime.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/SearchTime.java new file mode 100644 index 00000000000..1417dba47d2 --- /dev/null +++ b/application/src/main/java/org/opentripplanner/routing/alternativelegs/SearchTime.java @@ -0,0 +1,6 @@ +package org.opentripplanner.routing.alternativelegs; + +public enum SearchTime { + AFTER, + BEFORE, +} diff --git a/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java b/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java index c9833eae3a5..3380e8deb9f 100644 --- a/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java +++ b/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java @@ -12,6 +12,7 @@ import org.opentripplanner.model.plan.legreference.ScheduledTransitLegReference; import org.opentripplanner.routing.alternativelegs.AlternativeLegs; import org.opentripplanner.routing.alternativelegs.AlternativeLegsFilter; +import org.opentripplanner.routing.alternativelegs.SearchTime; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.transit.service.DefaultTransitService; @@ -51,7 +52,7 @@ void testPreviousLegs() { originalLeg, 3, transitService, - AlternativeLegs.SearchDirection.PREVIOUS, + SearchTime.BEFORE, AlternativeLegsFilter.NO_FILTER ); @@ -85,7 +86,7 @@ void testNextLegs() { originalLeg, 3, transitService, - AlternativeLegs.SearchDirection.NEXT, + SearchTime.AFTER, AlternativeLegsFilter.NO_FILTER ); @@ -119,7 +120,7 @@ void testCircularRoutes() { originalLeg, 2, transitService, - AlternativeLegs.SearchDirection.NEXT, + SearchTime.AFTER, AlternativeLegsFilter.NO_FILTER ); @@ -147,7 +148,7 @@ void testComplexCircularRoutes() { originalLeg, 2, transitService, - AlternativeLegs.SearchDirection.NEXT, + SearchTime.AFTER, AlternativeLegsFilter.NO_FILTER ); var legs = toString(alternativeLegs); From e1299348356e0f57f53ef418322506c92a3e10ab Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Tue, 5 Nov 2024 14:33:35 +0000 Subject: [PATCH 025/169] move SearchDirection to a separate class and rename to SearchTime --- .../apis/gtfs/datafetchers/LegImpl.java | 6 ++-- .../gtfs/generated/GraphQLDataFetchers.java | 9 ------ .../apis/gtfs/generated/GraphQLTypes.java | 1 - .../alternativelegs/AlternativeLegs.java | 28 +++++++------------ 4 files changed, 12 insertions(+), 32 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java index 3f1255d9985..54a40cef843 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java @@ -286,9 +286,7 @@ public DataFetcher> nextLegs() { return alternativeLegs(SearchTime.AFTER); } - private DataFetcher> alternativeLegs( - SearchTime searchDirection - ) { + private DataFetcher> alternativeLegs(SearchTime timeLine) { return environment -> { if (environment.getSource() instanceof ScheduledTransitLeg originalLeg) { var args = new GraphQLTypes.GraphQLLegNextLegsArgs(environment.getArguments()); @@ -323,7 +321,7 @@ private DataFetcher> alternativeLegs( environment.getSource(), numberOfLegs, environment.getContext().transitService(), - searchDirection, + timeLine, AlternativeLegsFilter.NO_FILTER, limitToExactOriginStop, limitToExactDestinationStop diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index ad686dec9a9..235b1d2bb14 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -1,11 +1,9 @@ //THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; -import graphql.relay.Connection; import graphql.relay.Connection; import graphql.relay.DefaultEdge; import graphql.relay.Edge; -import graphql.relay.Edge; import graphql.schema.DataFetcher; import graphql.schema.TypeResolver; import java.util.Currency; @@ -27,12 +25,8 @@ import org.opentripplanner.apis.gtfs.model.FeedPublisher; import org.opentripplanner.apis.gtfs.model.PlanPageInfo; import org.opentripplanner.apis.gtfs.model.RideHailingProvider; -import org.opentripplanner.apis.gtfs.model.RouteTypeModel; -import org.opentripplanner.apis.gtfs.model.StopOnRouteModel; -import org.opentripplanner.apis.gtfs.model.StopOnTripModel; import org.opentripplanner.apis.gtfs.model.StopPosition; import org.opentripplanner.apis.gtfs.model.TripOccupancy; -import org.opentripplanner.apis.gtfs.model.UnknownModel; import org.opentripplanner.ext.fares.model.FareRuleSet; import org.opentripplanner.ext.ridehailing.model.RideEstimate; import org.opentripplanner.model.StopTimesInPattern; @@ -55,8 +49,6 @@ import org.opentripplanner.routing.graphfinder.PatternAtStop; import org.opentripplanner.routing.graphfinder.PlaceAtDistance; import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; @@ -67,7 +59,6 @@ import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; -import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; import org.opentripplanner.service.vehiclerental.model.VehicleRentalSystem; import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; import org.opentripplanner.transit.model.basic.Money; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index 5b55ff01fb7..675230876dc 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -1,7 +1,6 @@ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java index 7a1c45684cd..b71287a1c0e 100644 --- a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java +++ b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java @@ -45,18 +45,10 @@ public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - SearchTime searchDirection, + SearchTime timeLine, AlternativeLegsFilter filter ) { - return getAlternativeLegs( - leg, - numberLegs, - transitService, - searchDirection, - filter, - false, - false - ); + return getAlternativeLegs(leg, numberLegs, transitService, timeLine, filter, false, false); } /** @@ -66,8 +58,8 @@ public static List getAlternativeLegs( * @param numberLegs The number of alternative legs requested. If fewer legs are found, * only the found legs are returned. * @param transitService The transit service used for the search - * @param searchDirection Indicating whether the alternative legs should depart - * earlier (PREVIOUS) or later (NEXT) than the original. + * @param timeLine Indicating whether the alternative legs should depart before or + * after than the original. * @param filter AlternativeLegsFilter indicating which properties of the original * leg should not change in the alternative legs * @param exactOriginStop Boolean indicating whether the exact departure stop of the original @@ -81,7 +73,7 @@ public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - SearchTime searchDirection, + SearchTime timeLine, AlternativeLegsFilter filter, boolean exactOriginStop, boolean exactDestinationStop @@ -104,7 +96,7 @@ public static List getAlternativeLegs( ScheduledTransitLeg::getStartTime ); - if (searchDirection == SearchTime.BEFORE) { + if (timeLine == SearchTime.BEFORE) { legComparator = legComparator.reversed(); } @@ -118,7 +110,7 @@ public static List getAlternativeLegs( .distinct() .flatMap(tripPattern -> withBoardingAlightingPositions(origins, destinations, tripPattern)) .flatMap(t -> - generateLegs(transitService, t, leg.getStartTime(), leg.getServiceDate(), searchDirection) + generateLegs(transitService, t, leg.getStartTime(), leg.getServiceDate(), timeLine) ) .filter(Predicate.not(leg::isPartiallySameTransitLeg)) .sorted(legComparator) @@ -135,7 +127,7 @@ private static Stream generateLegs( TripPatternBetweenStops tripPatternBetweenStops, ZonedDateTime departureTime, LocalDate originalDate, - SearchTime searchDirection + SearchTime timeLine ) { TripPattern pattern = tripPatternBetweenStops.tripPattern; int boardingPosition = tripPatternBetweenStops.positions.boardingPosition; @@ -148,7 +140,7 @@ private static Stream generateLegs( tts.getServiceDayMidnight() + tts.getRealtimeDeparture() ); - if (searchDirection == SearchTime.BEFORE) { + if (timeLine == SearchTime.BEFORE) { comparator = comparator.reversed(); } @@ -178,7 +170,7 @@ private static Stream generateLegs( continue; } - boolean departureTimeInRange = searchDirection == SearchTime.BEFORE + boolean departureTimeInRange = timeLine == SearchTime.BEFORE ? tripTimes.getDepartureTime(boardingPosition) <= secondsSinceMidnight : tripTimes.getDepartureTime(boardingPosition) >= secondsSinceMidnight; From 3134cb5db221cdc6dd166d76f7f6c54ed2f4da11 Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Wed, 6 Nov 2024 12:24:36 +0200 Subject: [PATCH 026/169] sometimes adding walking in splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching is impossible, avoid crash then --- .../org/opentripplanner/street/model/edge/StreetEdge.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java index 2be43ce4395..8e9e63c5576 100644 --- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java +++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java @@ -1007,8 +1007,11 @@ private State[] splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching(St }); StateEditor walking = doTraverse(s0, TraverseMode.WALK, false); - var forkState = walking.makeState(); - return State.ofStream(Stream.concat(Stream.of(forkState), states)); + if (walking != null) { + var forkState = walking.makeState(); + states = Stream.concat(Stream.of(forkState), states); + } + return State.ofStream(states); } /** From 80dd2dd3f4f3972febe23d5813018862f99825f4 Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Thu, 7 Nov 2024 09:19:30 +0100 Subject: [PATCH 027/169] Apply suggestions from code review Co-authored-by: Leonard Ehrenfried --- .../org/opentripplanner/framework/application/OTPFeature.java | 4 ++-- .../org/opentripplanner/transit/model/site/RegularStop.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java b/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java index ed3afc04cc9..2e8bab44816 100644 --- a/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java +++ b/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java @@ -25,8 +25,8 @@ public enum OTPFeature { Turning this on make sure that Rail stops without scheduled patterns still get included when generating transfers using `ConsiderPatternsForDirectTransfers`. It is common for stops to be assign at realtime for Rail, if so turning this on will help to avoid dropping transfers - witch is needed, when the stop become in use later. Turning this on, if - ConsiderPatternsForDirectTransfers is off have no effect. + which are needed, when the stop become in use later. Turning this on, if + ConsiderPatternsForDirectTransfers is off has no effect. """ ), ConsiderPatternsForDirectTransfers( diff --git a/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java b/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java index 7c2a1aaf3c5..8dd581b5699 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java +++ b/application/src/main/java/org/opentripplanner/transit/model/site/RegularStop.java @@ -108,7 +108,7 @@ public TransitMode getVehicleType() { /** * Return {@code true} if the vehicle type is set in the import to be RAIL. Note! This does - * not check pattens visiting the stop. + * not check patterns visiting the stop. */ public boolean isRailStop() { return vehicleType == TransitMode.RAIL; From 1fe7f378974f7ae951ff26578c4032b0b68d4f04 Mon Sep 17 00:00:00 2001 From: Zsombor Welker Date: Thu, 7 Nov 2024 09:31:30 +0100 Subject: [PATCH 028/169] GraphBuilder: add @Nullable to optional parameter --- .../java/org/opentripplanner/graph_builder/GraphBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java b/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java index bc83ad2a8af..bf3447391bd 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java @@ -207,7 +207,7 @@ private void addModule(GraphBuilderModule module) { graphBuilderModules.add(module); } - private void addModuleOptional(GraphBuilderModule module) { + private void addModuleOptional(@Nullable GraphBuilderModule module) { if (module != null) { graphBuilderModules.add(module); } From 1ac7f39d3de1f479381f3c09dea8d061ea88198f Mon Sep 17 00:00:00 2001 From: Zsombor Welker Date: Wed, 6 Nov 2024 17:02:58 +0100 Subject: [PATCH 029/169] Portland test graph: calculate transfers between stops --- .../opentripplanner/ConstantsForTests.java | 14 +- .../__snapshots__/TransitSnapshotTest.snap | 4708 +++++++++-------- .../travelSearch-expected-results-bd.csv | 4 +- .../travelSearch-expected-results-btr.csv | 6 +- 4 files changed, 2445 insertions(+), 2287 deletions(-) diff --git a/application/src/test/java/org/opentripplanner/ConstantsForTests.java b/application/src/test/java/org/opentripplanner/ConstantsForTests.java index aeacc11eca4..6c349b4de89 100644 --- a/application/src/test/java/org/opentripplanner/ConstantsForTests.java +++ b/application/src/test/java/org/opentripplanner/ConstantsForTests.java @@ -4,6 +4,7 @@ import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.time.Duration; import java.util.List; import java.util.Map; import javax.annotation.Nullable; @@ -15,6 +16,8 @@ import org.opentripplanner.framework.i18n.NonLocalizedString; import org.opentripplanner.graph_builder.ConfiguredDataSource; import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; +import org.opentripplanner.graph_builder.issue.service.DefaultDataImportIssueStore; +import org.opentripplanner.graph_builder.module.DirectTransferGenerator; import org.opentripplanner.graph_builder.module.GtfsFeedId; import org.opentripplanner.graph_builder.module.TestStreetLinkerModule; import org.opentripplanner.graph_builder.module.ned.ElevationModule; @@ -27,6 +30,7 @@ import org.opentripplanner.netex.NetexBundle; import org.opentripplanner.netex.configure.NetexConfigure; import org.opentripplanner.osm.OsmProvider; +import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.fares.FareServiceFactory; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.linking.LinkingDirection; @@ -167,7 +171,15 @@ public static TestOtpModel buildNewPortlandGraph(boolean withElevation) { addPortlandVehicleRentals(graph); - timetableRepository.index(); + new DirectTransferGenerator( + graph, + timetableRepository, + new DefaultDataImportIssueStore(), + Duration.ofMinutes(30), + List.of(new RouteRequest()) + ) + .buildGraph(); + graph.index(timetableRepository.getSiteRepository()); return new TestOtpModel(graph, timetableRepository); diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/TransitSnapshotTest.snap b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/TransitSnapshotTest.snap index adc5ee69635..0f00b88e65b 100644 --- a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/TransitSnapshotTest.snap +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/TransitSnapshotTest.snap @@ -230,10 +230,10 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan }, { "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 2261, + "duration" : 2020, "elevationGained" : 0.0, "elevationLost" : 0.0, - "endTime" : "2009-11-17T18:38:41.000+00:00", + "endTime" : "2009-11-17T18:35:19.000+00:00", "fare" : { "details" : { }, "fare" : { }, @@ -257,42 +257,62 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "name" : "regular" } ] + }, + { + "legIndices" : [ + 3 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] } ] }, - "generalizedCost" : 4281, + "generalizedCost" : 4023, "legs" : [ { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 920.33, - "endTime" : "2009-11-17T18:12:58.000+00:00", + "distance" : 1022.47, + "endTime" : "2009-11-17T18:14:50.000+00:00", "from" : { - "departure" : "2009-11-17T18:01:00.000+00:00", + "departure" : "2009-11-17T18:01:39.000+00:00", "lat" : 45.51726, "lon" : -122.64847, "name" : "SE Morrison St. & SE 17th Ave. (P1)", "vertexType" : "NORMAL" }, - "generalizedCost" : 1398, + "generalizedCost" : 1543, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 45, - "points" : "kaytG~wqkV?T?fCAl@?RmC?oCAmCAoC?_CAM?aC??A?A?A?A??AA?AAA??AAA???A?A?A???A@A??@A@?@??A@?@?BcC?mCAmCAmC?QBIYIWOH" + "length" : 37, + "points" : "kaytG~wqkV?T?fCAl@?R?jE?rC?t@?hEAvD?R?R?|@?dBAP?PAxD?nD?X?jE?bA?t@?N?Z?ZAX?^@bBAt@?zC?N?J?NQ?O?sA@?W" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:01:00.000+00:00", + "startTime" : "2009-11-17T18:01:39.000+00:00", "steps" : [ { "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 87.68, + "distance" : 956.36, "elevation" : "", "lat" : 45.517186, "lon" : -122.6484704, @@ -305,50 +325,24 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "absoluteDirection" : "NORTH", "area" : false, "bogusName" : false, - "distance" : 641.04, - "elevation" : "", - "lat" : 45.5171903, - "lon" : -122.6495956, - "relativeDirection" : "RIGHT", - "stayOn" : false, - "streetName" : "Southeast 16th Avenue", - "walkingBike" : false - }, - { - "absoluteDirection" : "NORTH", - "area" : false, - "bogusName" : false, - "distance" : 168.89, - "elevation" : "", - "lat" : 45.5228912, - "lon" : -122.6495528, - "relativeDirection" : "CONTINUE", - "stayOn" : false, - "streetName" : "Northeast 16th Avenue", - "walkingBike" : false - }, - { - "absoluteDirection" : "NORTHEAST", - "area" : false, - "bogusName" : false, - "distance" : 22.74, + "distance" : 66.13, "elevation" : "", - "lat" : 45.524409, - "lon" : -122.6495675, + "lat" : 45.5172325, + "lon" : -122.6607432, "relativeDirection" : "RIGHT", "stayOn" : false, - "streetName" : "Northeast Sandy Boulevard", + "streetName" : "Southeast Grand Avenue", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:12:58.000+00:00", - "departure" : "2009-11-17T18:12:58.000+00:00", - "lat" : 45.524581, - "lon" : -122.649367, - "name" : "NE Sandy & 16th", - "stopCode" : "5060", - "stopId" : "prt:5060", + "arrival" : "2009-11-17T18:14:50.000+00:00", + "departure" : "2009-11-17T18:14:50.000+00:00", + "lat" : 45.517828, + "lon" : -122.660632, + "name" : "SE Grand & Alder", + "stopCode" : "11485", + "stopId" : "prt:11485", "vertexType" : "TRANSIT", "zoneId" : "1" }, @@ -362,312 +356,403 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 3602.73, - "endTime" : "2009-11-17T18:25:49.000+00:00", + "distance" : 1580.92, + "endTime" : "2009-11-17T18:18:49.000+00:00", "from" : { - "arrival" : "2009-11-17T18:12:58.000+00:00", - "departure" : "2009-11-17T18:12:58.000+00:00", - "lat" : 45.524581, - "lon" : -122.649367, - "name" : "NE Sandy & 16th", - "stopCode" : "5060", - "stopId" : "prt:5060", - "stopIndex" : 92, - "stopSequence" : 93, + "arrival" : "2009-11-17T18:14:50.000+00:00", + "departure" : "2009-11-17T18:14:50.000+00:00", + "lat" : 45.517828, + "lon" : -122.660632, + "name" : "SE Grand & Alder", + "stopCode" : "11485", + "stopId" : "prt:11485", + "stopIndex" : 11, + "stopSequence" : 12, "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1371, - "headsign" : "Beaverton TC", + "generalizedCost" : 839, + "headsign" : "Jantzen Beach", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T18:13:32.000+00:00", - "departure" : "2009-11-17T18:13:32.000+00:00", - "lat" : 45.523767, - "lon" : -122.651428, - "name" : "NE Sandy & 14th", - "stopCode" : "5058", - "stopId" : "prt:5058", - "stopIndex" : 93, - "stopSequence" : 94, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:14:00.000+00:00", - "departure" : "2009-11-17T18:14:00.000+00:00", - "lat" : 45.523103, - "lon" : -122.653064, - "name" : "NE Sandy & 12th", - "stopCode" : "5055", - "stopId" : "prt:5055", - "stopIndex" : 94, - "stopSequence" : 95, + "arrival" : "2009-11-17T18:15:25.000+00:00", + "departure" : "2009-11-17T18:15:25.000+00:00", + "lat" : 45.519986, + "lon" : -122.660636, + "name" : "SE Grand & Oak", + "stopCode" : "2174", + "stopId" : "prt:2174", + "stopIndex" : 12, + "stopSequence" : 13, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:14:47.000+00:00", - "departure" : "2009-11-17T18:14:47.000+00:00", - "lat" : 45.523024, - "lon" : -122.656526, - "name" : "E Burnside & NE 9th", - "stopCode" : "819", - "stopId" : "prt:819", - "stopIndex" : 95, - "stopSequence" : 96, + "arrival" : "2009-11-17T18:16:10.000+00:00", + "departure" : "2009-11-17T18:16:10.000+00:00", + "lat" : 45.522782, + "lon" : -122.660589, + "name" : "SE Grand & E Burnside", + "stopCode" : "2167", + "stopId" : "prt:2167", + "stopIndex" : 13, + "stopSequence" : 14, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:15:24.000+00:00", - "departure" : "2009-11-17T18:15:24.000+00:00", - "lat" : 45.523012, - "lon" : -122.659365, - "name" : "E Burnside & NE 6th", - "stopCode" : "805", - "stopId" : "prt:805", - "stopIndex" : 96, - "stopSequence" : 97, + "arrival" : "2009-11-17T18:16:39.000+00:00", + "departure" : "2009-11-17T18:16:39.000+00:00", + "lat" : 45.524582, + "lon" : -122.660578, + "name" : "NE Grand & Davis", + "stopCode" : "8829", + "stopId" : "prt:8829", + "stopIndex" : 14, + "stopSequence" : 15, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:15:52.000+00:00", - "departure" : "2009-11-17T18:15:52.000+00:00", - "lat" : 45.523015, - "lon" : -122.661534, - "name" : "E Burnside & NE M L King", - "stopCode" : "705", - "stopId" : "prt:705", - "stopIndex" : 97, - "stopSequence" : 98, + "arrival" : "2009-11-17T18:17:26.000+00:00", + "departure" : "2009-11-17T18:17:26.000+00:00", + "lat" : 45.527519, + "lon" : -122.66056, + "name" : "NE Grand & Hoyt", + "stopCode" : "2169", + "stopId" : "prt:2169", + "stopIndex" : 15, + "stopSequence" : 16, "vertexType" : "TRANSIT", "zoneId" : "1" }, { "arrival" : "2009-11-17T18:18:00.000+00:00", "departure" : "2009-11-17T18:18:00.000+00:00", - "lat" : 45.523249, - "lon" : -122.671269, - "name" : "W Burnside & Burnside Bridge", - "stopCode" : "689", - "stopId" : "prt:689", - "stopIndex" : 98, - "stopSequence" : 99, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:19:00.000+00:00", - "departure" : "2009-11-17T18:19:00.000+00:00", - "lat" : 45.523169, - "lon" : -122.675893, - "name" : "W Burnside & NW 5th", - "stopCode" : "782", - "stopId" : "prt:782", - "stopIndex" : 99, - "stopSequence" : 100, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:20:17.000+00:00", - "departure" : "2009-11-17T18:20:17.000+00:00", - "lat" : 45.523115, - "lon" : -122.678939, - "name" : "W Burnside & NW Park", - "stopCode" : "716", - "stopId" : "prt:716", - "stopIndex" : 100, - "stopSequence" : 101, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:21:25.000+00:00", - "departure" : "2009-11-17T18:21:25.000+00:00", - "lat" : 45.523048, - "lon" : -122.681606, - "name" : "W Burnside & NW 10th", - "stopCode" : "10791", - "stopId" : "prt:10791", - "stopIndex" : 101, - "stopSequence" : 102, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:22:14.000+00:00", - "departure" : "2009-11-17T18:22:14.000+00:00", - "lat" : 45.523, - "lon" : -122.683535, - "name" : "W Burnside & NW 12th", - "stopCode" : "11032", - "stopId" : "prt:11032", - "stopIndex" : 102, - "stopSequence" : 103, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:24:09.000+00:00", - "departure" : "2009-11-17T18:24:09.000+00:00", - "lat" : 45.522985, - "lon" : -122.688091, - "name" : "W Burnside & NW 17th", - "stopCode" : "10809", - "stopId" : "prt:10809", - "stopIndex" : 103, - "stopSequence" : 104, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:25:00.000+00:00", - "departure" : "2009-11-17T18:25:00.000+00:00", - "lat" : 45.523097, - "lon" : -122.690083, - "name" : "W Burnside & NW 19th", - "stopCode" : "735", - "stopId" : "prt:735", - "stopIndex" : 104, - "stopSequence" : 105, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:25:21.000+00:00", - "departure" : "2009-11-17T18:25:21.000+00:00", - "lat" : 45.523176, - "lon" : -122.692139, - "name" : "W Burnside & NW 20th", - "stopCode" : "741", - "stopId" : "prt:741", - "stopIndex" : 105, - "stopSequence" : 106, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:25:31.000+00:00", - "departure" : "2009-11-17T18:25:31.000+00:00", - "lat" : 45.52322, - "lon" : -122.69313, - "name" : "W Burnside & NW 20th Pl", - "stopCode" : "742", - "stopId" : "prt:742", - "stopIndex" : 106, - "stopSequence" : 107, + "lat" : 45.529602, + "lon" : -122.660529, + "name" : "NE Grand & Pacific", + "stopCode" : "2175", + "stopId" : "prt:2175", + "stopIndex" : 16, + "stopSequence" : 17, "vertexType" : "TRANSIT", "zoneId" : "1" } ], "legGeometry" : { - "length" : 94, - "points" : "coztGd}qkVNl@r@`CZhA`A`D??Ph@l@tBb@rARh@Pd@???BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB" + "length" : 35, + "points" : "meytGtdtkVC?OAQ?}B?mC?{BA??Q?oCAmC?mC?qBA??]?mC?mCAm@???aB?{AC[?kDAsCBq@A??uA?iCAgC?w@???yA?sCCoCAiB@" }, "mode" : "BUS", "pathway" : false, "realTime" : false, - "route" : "Burnside/Stark", - "routeId" : "prt:20", - "routeLongName" : "Burnside/Stark", - "routeShortName" : "20", + "route" : "Martin Luther King Jr Blvd", + "routeId" : "prt:6", + "routeLongName" : "Martin Luther King Jr Blvd", + "routeShortName" : "6", "routeType" : 3, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:12:58.000+00:00", + "startTime" : "2009-11-17T18:14:50.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T18:25:49.000+00:00", - "departure" : "2009-11-17T18:25:49.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", - "stopIndex" : 107, - "stopSequence" : 108, + "arrival" : "2009-11-17T18:18:49.000+00:00", + "departure" : "2009-11-17T18:18:49.000+00:00", + "lat" : 45.532047, + "lon" : -122.660537, + "name" : "NE Grand & Wasco", + "stopCode" : "10953", + "stopId" : "prt:10953", + "stopIndex" : 17, + "stopSequence" : 18, "vertexType" : "TRANSIT", "zoneId" : "1" }, "transitLeg" : true, - "tripBlockId" : "2002", - "tripId" : "prt:200W1200" + "tripBlockId" : "604", + "tripId" : "prt:60W1210" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 999.1, - "endTime" : "2009-11-17T18:38:41.000+00:00", + "distance" : 51.83, + "endTime" : "2009-11-17T18:19:32.000+00:00", "from" : { - "arrival" : "2009-11-17T18:25:49.000+00:00", - "departure" : "2009-11-17T18:25:49.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", + "arrival" : "2009-11-17T18:18:49.000+00:00", + "departure" : "2009-11-17T18:18:49.000+00:00", + "lat" : 45.532047, + "lon" : -122.660537, + "name" : "NE Grand & Wasco", + "stopCode" : "10953", + "stopId" : "prt:10953", "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1511, + "generalizedCost" : 80, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 29, - "points" : "ugztGdzzkVL?ATClAI|DK?G?mCBkCDoCDmCBoCDkCBoCB[?sBD]?Y@eA@K?C?K?W@{A@M@C@I?_CB?G" + "length" : 10, + "points" : "g~{tGjctkV?B`@?\\?R?@?@?BC???I" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:25:49.000+00:00", + "startTime" : "2009-11-17T18:18:49.000+00:00", "steps" : [ { - "absoluteDirection" : "WEST", + "absoluteDirection" : "SOUTH", "area" : false, "bogusName" : false, - "distance" : 113.27, + "distance" : 51.83, "elevation" : "", - "lat" : 45.5232491, - "lon" : -122.6949067, + "lat" : 45.532047, + "lon" : -122.6605564, "relativeDirection" : "DEPART", "stayOn" : false, - "streetName" : "West Burnside Street", + "streetName" : "Northeast Grand Avenue", "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:19:32.000+00:00", + "departure" : "2009-11-17T18:22:05.000+00:00", + "lat" : 45.531586, + "lon" : -122.660482, + "name" : "NE Multnomah & Grand", + "stopCode" : "4043", + "stopId" : "prt:4043", + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 3448.6, + "endTime" : "2009-11-17T18:34:55.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:19:32.000+00:00", + "departure" : "2009-11-17T18:22:05.000+00:00", + "lat" : 45.531586, + "lon" : -122.660482, + "name" : "NE Multnomah & Grand", + "stopCode" : "4043", + "stopId" : "prt:4043", + "stopIndex" : 82, + "stopSequence" : 83, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "generalizedCost" : 1523, + "headsign" : "Montgomery Park", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ + { + "arrival" : "2009-11-17T18:23:09.000+00:00", + "departure" : "2009-11-17T18:23:09.000+00:00", + "lat" : 45.531159, + "lon" : -122.66293, + "name" : "NE Multnomah & 3rd", + "stopCode" : "11492", + "stopId" : "prt:11492", + "stopIndex" : 83, + "stopSequence" : 84, + "vertexType" : "TRANSIT", + "zoneId" : "0" }, { - "absoluteDirection" : "NORTH", - "area" : false, - "bogusName" : false, - "distance" : 882.16, - "elevation" : "", - "lat" : 45.5233204, - "lon" : -122.696357, - "relativeDirection" : "RIGHT", - "stayOn" : false, - "streetName" : "Northwest 22nd Avenue", - "walkingBike" : false + "arrival" : "2009-11-17T18:25:00.000+00:00", + "departure" : "2009-11-17T18:25:00.000+00:00", + "lat" : 45.530005, + "lon" : -122.666476, + "name" : "Rose Quarter Transit Center", + "stopCode" : "2592", + "stopId" : "prt:2592", + "stopIndex" : 84, + "stopSequence" : 85, + "vertexType" : "TRANSIT", + "zoneId" : "0" }, { - "absoluteDirection" : "EAST", + "arrival" : "2009-11-17T18:28:20.000+00:00", + "departure" : "2009-11-17T18:28:20.000+00:00", + "lat" : 45.526655, + "lon" : -122.676462, + "name" : "NW Glisan & 6th", + "stopCode" : "10803", + "stopId" : "prt:10803", + "stopIndex" : 85, + "stopSequence" : 86, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:29:15.000+00:00", + "departure" : "2009-11-17T18:29:15.000+00:00", + "lat" : 45.528799, + "lon" : -122.677238, + "name" : "NW Station Way & Union Station", + "stopCode" : "12801", + "stopId" : "prt:12801", + "stopIndex" : 86, + "stopSequence" : 87, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:31:00.000+00:00", + "departure" : "2009-11-17T18:31:00.000+00:00", + "lat" : 45.531582, + "lon" : -122.681193, + "name" : "NW Northrup & 10th", + "stopCode" : "12802", + "stopId" : "prt:12802", + "stopIndex" : 87, + "stopSequence" : 88, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:31:33.000+00:00", + "departure" : "2009-11-17T18:31:33.000+00:00", + "lat" : 45.531534, + "lon" : -122.683319, + "name" : "NW 12th & Northrup", + "stopCode" : "12796", + "stopId" : "prt:12796", + "stopIndex" : 88, + "stopSequence" : 89, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:32:04.000+00:00", + "departure" : "2009-11-17T18:32:04.000+00:00", + "lat" : 45.531503, + "lon" : -122.685357, + "name" : "NW Northrup & 14th", + "stopCode" : "10775", + "stopId" : "prt:10775", + "stopIndex" : 89, + "stopSequence" : 90, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:33:07.000+00:00", + "departure" : "2009-11-17T18:33:07.000+00:00", + "lat" : 45.531434, + "lon" : -122.689417, + "name" : "NW Northrup & 18th", + "stopCode" : "10776", + "stopId" : "prt:10776", + "stopIndex" : 90, + "stopSequence" : 91, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:34:24.000+00:00", + "departure" : "2009-11-17T18:34:24.000+00:00", + "lat" : 45.531346, + "lon" : -122.694455, + "name" : "NW Northrup & 21st", + "stopCode" : "10777", + "stopId" : "prt:10777", + "stopIndex" : 91, + "stopSequence" : 92, + "vertexType" : "TRANSIT", + "zoneId" : "1" + } + ], + "legGeometry" : { + "length" : 101, + "points" : "}z{tG~btkV?^?nE?V@Z?PH\\Nb@`@~@Rf@??`@bANb@FV@R?P?pE?jA@h@AnAbBl@LFJN\\f@LT??NXJPPVJFf@Vf@Pp@Nd@NRLB@RNXZR\\vAhC@BhAhD`AhClAbDBrDCnG@n@@^@d@HdAP`CBjEDvD???LqCFmCDYBGDEBGJkAzAQR??KNa@b@MJuBBY?OHW@u@~@aD`EcBhBBrD@xC??@l@BlE@lD???XBjEBpD???VBlE?dA@t@?b@?h@BfEBrD???VBhEFtKDvJ??@\\DnJ" + }, + "mode" : "BUS", + "pathway" : false, + "realTime" : false, + "route" : "Broadway/Halsey", + "routeId" : "prt:77", + "routeLongName" : "Broadway/Halsey", + "routeShortName" : "77", + "routeType" : 3, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:22:05.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:34:55.000+00:00", + "departure" : "2009-11-17T18:34:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", + "stopIndex" : 92, + "stopSequence" : 93, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : true, + "tripBlockId" : "7736", + "tripId" : "prt:771W1160" + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 18.81, + "endTime" : "2009-11-17T18:35:19.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:34:55.000+00:00", + "departure" : "2009-11-17T18:34:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 37, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 7, + "points" : "sy{tGxc{kV???LABF?B??J" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:34:55.000+00:00", + "steps" : [ + { + "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 3.68, + "distance" : 18.81, "elevation" : "", - "lat" : 45.5312508, - "lon" : -122.6966386, - "relativeDirection" : "RIGHT", + "lat" : 45.5313019, + "lon" : -122.6964448, + "relativeDirection" : "DEPART", "stayOn" : false, "streetName" : "Northwest Northrup Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:38:41.000+00:00", + "arrival" : "2009-11-17T18:35:19.000+00:00", "lat" : 45.53122, "lon" : -122.69659, "name" : "NW Northrup St. & NW 22nd Ave. (P2)", @@ -677,21 +762,21 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "walkingBike" : false } ], - "startTime" : "2009-11-17T18:01:00.000+00:00", + "startTime" : "2009-11-17T18:01:39.000+00:00", "tooSloped" : false, - "transfers" : 0, - "transitTime" : 771, - "waitingTime" : 0, - "walkDistance" : 1919.43, + "transfers" : 1, + "transitTime" : 1009, + "waitingTime" : 153, + "walkDistance" : 1093.11, "walkLimitExceeded" : false, - "walkTime" : 1490 + "walkTime" : 858 }, { "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 1470, + "duration" : 2261, "elevationGained" : 0.0, "elevationLost" : 0.0, - "endTime" : "2009-11-17T18:39:22.000+00:00", + "endTime" : "2009-11-17T18:38:41.000+00:00", "fare" : { "details" : { }, "fare" : { }, @@ -718,39 +803,39 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan } ] }, - "generalizedCost" : 2315, + "generalizedCost" : 4281, "legs" : [ { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 62.01, - "endTime" : "2009-11-17T18:15:40.000+00:00", + "distance" : 920.33, + "endTime" : "2009-11-17T18:12:58.000+00:00", "from" : { - "departure" : "2009-11-17T18:14:52.000+00:00", + "departure" : "2009-11-17T18:01:00.000+00:00", "lat" : 45.51726, "lon" : -122.64847, "name" : "SE Morrison St. & SE 17th Ave. (P1)", "vertexType" : "NORMAL" }, - "generalizedCost" : 95, + "generalizedCost" : 1398, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 4, - "points" : "kaytG~wqkV?T?fCG?" + "length" : 45, + "points" : "kaytG~wqkV?T?fCAl@?RmC?oCAmCAoC?_CAM?aC??A?A?A?A??AA?AAA??AAA???A?A?A???A@A??@A@?@??A@?@?BcC?mCAmCAmC?QBIYIWOH" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:14:52.000+00:00", + "startTime" : "2009-11-17T18:01:00.000+00:00", "steps" : [ { "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 62.02, + "distance" : 87.68, "elevation" : "", "lat" : 45.517186, "lon" : -122.6484704, @@ -758,16 +843,55 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "stayOn" : false, "streetName" : "Southeast Morrison Street", "walkingBike" : false - } - ], - "to" : { - "arrival" : "2009-11-17T18:15:40.000+00:00", - "departure" : "2009-11-17T18:15:40.000+00:00", - "lat" : 45.517226, - "lon" : -122.649266, - "name" : "SE Morrison & 16th", - "stopCode" : "4019", - "stopId" : "prt:4019", + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 641.04, + "elevation" : "", + "lat" : 45.5171903, + "lon" : -122.6495956, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast 16th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 168.89, + "elevation" : "", + "lat" : 45.5228912, + "lon" : -122.6495528, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Northeast 16th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTHEAST", + "area" : false, + "bogusName" : false, + "distance" : 22.74, + "elevation" : "", + "lat" : 45.524409, + "lon" : -122.6495675, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northeast Sandy Boulevard", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:12:58.000+00:00", + "departure" : "2009-11-17T18:12:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", "vertexType" : "TRANSIT", "zoneId" : "1" }, @@ -781,416 +905,312 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 5218.86, - "endTime" : "2009-11-17T18:35:54.000+00:00", + "distance" : 3602.73, + "endTime" : "2009-11-17T18:25:49.000+00:00", "from" : { - "arrival" : "2009-11-17T18:15:40.000+00:00", - "departure" : "2009-11-17T18:15:40.000+00:00", - "lat" : 45.517226, - "lon" : -122.649266, - "name" : "SE Morrison & 16th", - "stopCode" : "4019", - "stopId" : "prt:4019", - "stopIndex" : 50, - "stopSequence" : 51, + "arrival" : "2009-11-17T18:12:58.000+00:00", + "departure" : "2009-11-17T18:12:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", + "stopIndex" : 92, + "stopSequence" : 93, "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1814, - "headsign" : "Montgomery Park", + "generalizedCost" : 1371, + "headsign" : "Beaverton TC", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T18:16:15.000+00:00", - "departure" : "2009-11-17T18:16:15.000+00:00", - "lat" : 45.517253, - "lon" : -122.651354, - "name" : "SE Morrison & 14th", - "stopCode" : "4016", - "stopId" : "prt:4016", - "stopIndex" : 51, - "stopSequence" : 52, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:17:00.000+00:00", - "departure" : "2009-11-17T18:17:00.000+00:00", - "lat" : 45.517299, - "lon" : -122.654067, - "name" : "SE Morrison & 12th", - "stopCode" : "4014", - "stopId" : "prt:4014", - "stopIndex" : 52, - "stopSequence" : 53, + "arrival" : "2009-11-17T18:13:32.000+00:00", + "departure" : "2009-11-17T18:13:32.000+00:00", + "lat" : 45.523767, + "lon" : -122.651428, + "name" : "NE Sandy & 14th", + "stopCode" : "5058", + "stopId" : "prt:5058", + "stopIndex" : 93, + "stopSequence" : 94, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:17:38.000+00:00", - "departure" : "2009-11-17T18:17:38.000+00:00", - "lat" : 45.517292, - "lon" : -122.656563, - "name" : "SE Morrison & 9th", - "stopCode" : "4026", - "stopId" : "prt:4026", - "stopIndex" : 53, - "stopSequence" : 54, + "arrival" : "2009-11-17T18:14:00.000+00:00", + "departure" : "2009-11-17T18:14:00.000+00:00", + "lat" : 45.523103, + "lon" : -122.653064, + "name" : "NE Sandy & 12th", + "stopCode" : "5055", + "stopId" : "prt:5055", + "stopIndex" : 94, + "stopSequence" : 95, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:18:08.000+00:00", - "departure" : "2009-11-17T18:18:08.000+00:00", - "lat" : 45.517322, - "lon" : -122.65847, - "name" : "SE Morrison & 7th", - "stopCode" : "4025", - "stopId" : "prt:4025", - "stopIndex" : 54, - "stopSequence" : 55, + "arrival" : "2009-11-17T18:14:47.000+00:00", + "departure" : "2009-11-17T18:14:47.000+00:00", + "lat" : 45.523024, + "lon" : -122.656526, + "name" : "E Burnside & NE 9th", + "stopCode" : "819", + "stopId" : "prt:819", + "stopIndex" : 95, + "stopSequence" : 96, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:18:39.000+00:00", - "departure" : "2009-11-17T18:18:39.000+00:00", - "lat" : 45.517298, - "lon" : -122.660523, - "name" : "SE Morrison & Grand", - "stopCode" : "4013", - "stopId" : "prt:4013", - "stopIndex" : 55, - "stopSequence" : 56, + "arrival" : "2009-11-17T18:15:24.000+00:00", + "departure" : "2009-11-17T18:15:24.000+00:00", + "lat" : 45.523012, + "lon" : -122.659365, + "name" : "E Burnside & NE 6th", + "stopCode" : "805", + "stopId" : "prt:805", + "stopIndex" : 96, + "stopSequence" : 97, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:20:03.000+00:00", - "departure" : "2009-11-17T18:20:03.000+00:00", - "lat" : 45.517351, - "lon" : -122.66601, - "name" : "Morrison Bridge", - "stopCode" : "4029", - "stopId" : "prt:4029", - "stopIndex" : 56, - "stopSequence" : 57, + "arrival" : "2009-11-17T18:15:52.000+00:00", + "departure" : "2009-11-17T18:15:52.000+00:00", + "lat" : 45.523015, + "lon" : -122.661534, + "name" : "E Burnside & NE M L King", + "stopCode" : "705", + "stopId" : "prt:705", + "stopIndex" : 97, + "stopSequence" : 98, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:22:27.000+00:00", - "departure" : "2009-11-17T18:22:27.000+00:00", - "lat" : 45.51959, - "lon" : -122.674599, - "name" : "SW Washington & 3rd", - "stopCode" : "6158", - "stopId" : "prt:6158", - "stopIndex" : 57, - "stopSequence" : 58, + "arrival" : "2009-11-17T18:18:00.000+00:00", + "departure" : "2009-11-17T18:18:00.000+00:00", + "lat" : 45.523249, + "lon" : -122.671269, + "name" : "W Burnside & Burnside Bridge", + "stopCode" : "689", + "stopId" : "prt:689", + "stopIndex" : 98, + "stopSequence" : 99, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:23:00.000+00:00", - "departure" : "2009-11-17T18:23:00.000+00:00", - "lat" : 45.520129, - "lon" : -122.676635, - "name" : "SW Washington & 5th", - "stopCode" : "6160", - "stopId" : "prt:6160", - "stopIndex" : 58, - "stopSequence" : 59, + "arrival" : "2009-11-17T18:19:00.000+00:00", + "departure" : "2009-11-17T18:19:00.000+00:00", + "lat" : 45.523169, + "lon" : -122.675893, + "name" : "W Burnside & NW 5th", + "stopCode" : "782", + "stopId" : "prt:782", + "stopIndex" : 99, + "stopSequence" : 100, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:23:52.000+00:00", - "departure" : "2009-11-17T18:23:52.000+00:00", - "lat" : 45.520695, - "lon" : -122.678657, - "name" : "SW Washington & Broadway", - "stopCode" : "6137", - "stopId" : "prt:6137", - "stopIndex" : 59, - "stopSequence" : 60, + "arrival" : "2009-11-17T18:20:17.000+00:00", + "departure" : "2009-11-17T18:20:17.000+00:00", + "lat" : 45.523115, + "lon" : -122.678939, + "name" : "W Burnside & NW Park", + "stopCode" : "716", + "stopId" : "prt:716", + "stopIndex" : 100, + "stopSequence" : 101, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:24:34.000+00:00", - "departure" : "2009-11-17T18:24:34.000+00:00", - "lat" : 45.521124, - "lon" : -122.6803, - "name" : "SW Washington & 9th", - "stopCode" : "6169", - "stopId" : "prt:6169", - "stopIndex" : 60, - "stopSequence" : 61, + "arrival" : "2009-11-17T18:21:25.000+00:00", + "departure" : "2009-11-17T18:21:25.000+00:00", + "lat" : 45.523048, + "lon" : -122.681606, + "name" : "W Burnside & NW 10th", + "stopCode" : "10791", + "stopId" : "prt:10791", + "stopIndex" : 101, + "stopSequence" : 102, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:25:47.000+00:00", - "departure" : "2009-11-17T18:25:47.000+00:00", - "lat" : 45.521094, - "lon" : -122.682819, - "name" : "SW 11th & Alder", - "stopCode" : "9600", - "stopId" : "prt:9600", - "stopIndex" : 61, - "stopSequence" : 62, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:26:36.000+00:00", - "departure" : "2009-11-17T18:26:36.000+00:00", - "lat" : 45.52055, - "lon" : -122.683933, - "name" : "SW Morrison & 12th", - "stopCode" : "9598", - "stopId" : "prt:9598", - "stopIndex" : 62, - "stopSequence" : 63, + "arrival" : "2009-11-17T18:22:14.000+00:00", + "departure" : "2009-11-17T18:22:14.000+00:00", + "lat" : 45.523, + "lon" : -122.683535, + "name" : "W Burnside & NW 12th", + "stopCode" : "11032", + "stopId" : "prt:11032", + "stopIndex" : 102, + "stopSequence" : 103, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:27:25.000+00:00", - "departure" : "2009-11-17T18:27:25.000+00:00", - "lat" : 45.521063, - "lon" : -122.685848, - "name" : "SW Morrison & 14th", - "stopCode" : "9708", - "stopId" : "prt:9708", - "stopIndex" : 63, - "stopSequence" : 64, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:28:18.000+00:00", - "departure" : "2009-11-17T18:28:18.000+00:00", - "lat" : 45.521641, - "lon" : -122.687932, - "name" : "SW Morrison & 16th", - "stopCode" : "9613", - "stopId" : "prt:9613", - "stopIndex" : 64, - "stopSequence" : 65, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:29:00.000+00:00", - "departure" : "2009-11-17T18:29:00.000+00:00", - "lat" : 45.52206, - "lon" : -122.689577, - "name" : "SW Morrison & 17th", - "stopCode" : "9599", - "stopId" : "prt:9599", - "stopIndex" : 65, - "stopSequence" : 66, + "arrival" : "2009-11-17T18:24:09.000+00:00", + "departure" : "2009-11-17T18:24:09.000+00:00", + "lat" : 45.522985, + "lon" : -122.688091, + "name" : "W Burnside & NW 17th", + "stopCode" : "10809", + "stopId" : "prt:10809", + "stopIndex" : 103, + "stopSequence" : 104, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:29:54.000+00:00", - "departure" : "2009-11-17T18:29:54.000+00:00", + "arrival" : "2009-11-17T18:25:00.000+00:00", + "departure" : "2009-11-17T18:25:00.000+00:00", "lat" : 45.523097, "lon" : -122.690083, "name" : "W Burnside & NW 19th", "stopCode" : "735", "stopId" : "prt:735", - "stopIndex" : 66, - "stopSequence" : 67, + "stopIndex" : 104, + "stopSequence" : 105, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:30:31.000+00:00", - "departure" : "2009-11-17T18:30:31.000+00:00", + "arrival" : "2009-11-17T18:25:21.000+00:00", + "departure" : "2009-11-17T18:25:21.000+00:00", "lat" : 45.523176, "lon" : -122.692139, "name" : "W Burnside & NW 20th", "stopCode" : "741", "stopId" : "prt:741", - "stopIndex" : 67, - "stopSequence" : 68, + "stopIndex" : 105, + "stopSequence" : 106, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:30:48.000+00:00", - "departure" : "2009-11-17T18:30:48.000+00:00", + "arrival" : "2009-11-17T18:25:31.000+00:00", + "departure" : "2009-11-17T18:25:31.000+00:00", "lat" : 45.52322, "lon" : -122.69313, "name" : "W Burnside & NW 20th Pl", "stopCode" : "742", "stopId" : "prt:742", - "stopIndex" : 68, - "stopSequence" : 69, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:31:20.000+00:00", - "departure" : "2009-11-17T18:31:20.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", - "stopIndex" : 69, - "stopSequence" : 70, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:32:18.000+00:00", - "departure" : "2009-11-17T18:32:18.000+00:00", - "lat" : 45.523512, - "lon" : -122.698081, - "name" : "W Burnside & NW 23rd", - "stopCode" : "755", - "stopId" : "prt:755", - "stopIndex" : 70, - "stopSequence" : 71, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:33:11.000+00:00", - "departure" : "2009-11-17T18:33:11.000+00:00", - "lat" : 45.525416, - "lon" : -122.698381, - "name" : "NW 23rd & Flanders", - "stopCode" : "7157", - "stopId" : "prt:7157", - "stopIndex" : 71, - "stopSequence" : 72, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:34:05.000+00:00", - "departure" : "2009-11-17T18:34:05.000+00:00", - "lat" : 45.527543, - "lon" : -122.698473, - "name" : "NW 23rd & Irving", - "stopCode" : "7161", - "stopId" : "prt:7161", - "stopIndex" : 72, - "stopSequence" : 73, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:35:00.000+00:00", - "departure" : "2009-11-17T18:35:00.000+00:00", - "lat" : 45.529681, - "lon" : -122.698529, - "name" : "NW 23rd & Lovejoy", - "stopCode" : "7163", - "stopId" : "prt:7163", - "stopIndex" : 73, - "stopSequence" : 74, + "stopIndex" : 106, + "stopSequence" : 107, "vertexType" : "TRANSIT", "zoneId" : "1" } ], "legGeometry" : { - "length" : 135, - "points" : "kaytG||qkVA~@?jE?tC???r@AhE?jE?rA???tBAjE?nD???X?hE?xC??Ah@?pE?~C???J?`@?vAAvBEbE?jEAlE?`BAbB@d@??@tAAj@Cx@Cb@Cp@_@dEcAtFoA`IS~@i@`BmAzDi@zAc@pAi@~C??Id@u@jEm@bD??If@u@jEk@bD??If@u@|DW`B??CPs@|Du@lElBz@??VJbCfAk@dD??Id@w@rEWvAId@AF??Q~@s@`Ei@~C??Ib@u@dEWzA??]jB]MQSe@WOKOKIIQe@GWE]GnD??AXKnEGnD???XGjD??AZEfCC`AEzB??AXCfAGxDE|AEtBIlC??APkAh@o@?sCB{BD??S?mCDmCDyBB??U?mCDmCDyBB??S?oCDmCDmCBo@@" + "length" : 94, + "points" : "coztGd}qkVNl@r@`CZhA`A`D??Ph@l@tBb@rARh@Pd@???BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB" }, "mode" : "BUS", "pathway" : false, "realTime" : false, - "route" : "Belmont/NW 23rd", - "routeId" : "prt:15", - "routeLongName" : "Belmont/NW 23rd", - "routeShortName" : "15", + "route" : "Burnside/Stark", + "routeId" : "prt:20", + "routeLongName" : "Burnside/Stark", + "routeShortName" : "20", "routeType" : 3, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:15:40.000+00:00", + "startTime" : "2009-11-17T18:12:58.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T18:35:54.000+00:00", - "departure" : "2009-11-17T18:35:54.000+00:00", - "lat" : 45.532159, - "lon" : -122.698634, - "name" : "NW 23rd & Overton", - "stopCode" : "8981", - "stopId" : "prt:8981", - "stopIndex" : 74, - "stopSequence" : 75, + "arrival" : "2009-11-17T18:25:49.000+00:00", + "departure" : "2009-11-17T18:25:49.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "stopIndex" : 107, + "stopSequence" : 108, "vertexType" : "TRANSIT", "zoneId" : "1" }, "transitLeg" : true, - "tripBlockId" : "1549", - "tripId" : "prt:150W1400" + "tripBlockId" : "2002", + "tripId" : "prt:200W1200" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 266.21, - "endTime" : "2009-11-17T18:39:22.000+00:00", + "distance" : 999.1, + "endTime" : "2009-11-17T18:38:41.000+00:00", "from" : { - "arrival" : "2009-11-17T18:35:54.000+00:00", - "departure" : "2009-11-17T18:35:54.000+00:00", - "lat" : 45.532159, - "lon" : -122.698634, - "name" : "NW 23rd & Overton", - "stopCode" : "8981", - "stopId" : "prt:8981", + "arrival" : "2009-11-17T18:25:49.000+00:00", + "departure" : "2009-11-17T18:25:49.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 405, + "generalizedCost" : 1511, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 13, - "points" : "}~{tGnq{kV?LVAF?J?L?rBCLA?Q?EAyAEcH?G" + "length" : 29, + "points" : "ugztGdzzkVL?ATClAI|DK?G?mCBkCDoCDmCBoCDkCBoCB[?sBD]?Y@eA@K?C?K?W@{A@M@C@I?_CB?G" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:35:54.000+00:00", + "startTime" : "2009-11-17T18:25:49.000+00:00", "steps" : [ { - "absoluteDirection" : "SOUTH", + "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 104.46, + "distance" : 113.27, "elevation" : "", - "lat" : 45.5321578, - "lon" : -122.6987026, + "lat" : 45.5232491, + "lon" : -122.6949067, "relativeDirection" : "DEPART", "stayOn" : false, - "streetName" : "Northwest 23rd Avenue", + "streetName" : "West Burnside Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 882.16, + "elevation" : "", + "lat" : 45.5233204, + "lon" : -122.696357, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest 22nd Avenue", "walkingBike" : false }, { "absoluteDirection" : "EAST", "area" : false, "bogusName" : false, - "distance" : 161.77, + "distance" : 3.68, "elevation" : "", - "lat" : 45.5312188, - "lon" : -122.6986675, - "relativeDirection" : "LEFT", + "lat" : 45.5312508, + "lon" : -122.6966386, + "relativeDirection" : "RIGHT", "stayOn" : false, "streetName" : "Northwest Northrup Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:39:22.000+00:00", + "arrival" : "2009-11-17T18:38:41.000+00:00", "lat" : 45.53122, "lon" : -122.69659, "name" : "NW Northrup St. & NW 22nd Ave. (P2)", @@ -1200,21 +1220,21 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "walkingBike" : false } ], - "startTime" : "2009-11-17T18:14:52.000+00:00", + "startTime" : "2009-11-17T18:01:00.000+00:00", "tooSloped" : false, "transfers" : 0, - "transitTime" : 1214, + "transitTime" : 771, "waitingTime" : 0, - "walkDistance" : 328.22, + "walkDistance" : 1919.43, "walkLimitExceeded" : false, - "walkTime" : 256 + "walkTime" : 1490 }, { "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 2275, + "duration" : 1470, "elevationGained" : 0.0, "elevationLost" : 0.0, - "endTime" : "2009-11-17T18:53:55.000+00:00", + "endTime" : "2009-11-17T18:39:22.000+00:00", "fare" : { "details" : { }, "fare" : { }, @@ -1241,39 +1261,39 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan } ] }, - "generalizedCost" : 4295, + "generalizedCost" : 2315, "legs" : [ { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 920.33, - "endTime" : "2009-11-17T18:27:58.000+00:00", + "distance" : 62.01, + "endTime" : "2009-11-17T18:15:40.000+00:00", "from" : { - "departure" : "2009-11-17T18:16:00.000+00:00", + "departure" : "2009-11-17T18:14:52.000+00:00", "lat" : 45.51726, "lon" : -122.64847, "name" : "SE Morrison St. & SE 17th Ave. (P1)", "vertexType" : "NORMAL" }, - "generalizedCost" : 1398, + "generalizedCost" : 95, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 45, - "points" : "kaytG~wqkV?T?fCAl@?RmC?oCAmCAoC?_CAM?aC??A?A?A?A??AA?AAA??AAA???A?A?A???A@A??@A@?@??A@?@?BcC?mCAmCAmC?QBIYIWOH" + "length" : 4, + "points" : "kaytG~wqkV?T?fCG?" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:16:00.000+00:00", + "startTime" : "2009-11-17T18:14:52.000+00:00", "steps" : [ { "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 87.68, + "distance" : 62.02, "elevation" : "", "lat" : 45.517186, "lon" : -122.6484704, @@ -1281,55 +1301,16 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "stayOn" : false, "streetName" : "Southeast Morrison Street", "walkingBike" : false - }, - { - "absoluteDirection" : "NORTH", - "area" : false, - "bogusName" : false, - "distance" : 641.04, - "elevation" : "", - "lat" : 45.5171903, - "lon" : -122.6495956, - "relativeDirection" : "RIGHT", - "stayOn" : false, - "streetName" : "Southeast 16th Avenue", - "walkingBike" : false - }, - { - "absoluteDirection" : "NORTH", - "area" : false, - "bogusName" : false, - "distance" : 168.89, - "elevation" : "", - "lat" : 45.5228912, - "lon" : -122.6495528, - "relativeDirection" : "CONTINUE", - "stayOn" : false, - "streetName" : "Northeast 16th Avenue", - "walkingBike" : false - }, - { - "absoluteDirection" : "NORTHEAST", - "area" : false, - "bogusName" : false, - "distance" : 22.74, - "elevation" : "", - "lat" : 45.524409, - "lon" : -122.6495675, - "relativeDirection" : "RIGHT", - "stayOn" : false, - "streetName" : "Northeast Sandy Boulevard", - "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:27:58.000+00:00", - "departure" : "2009-11-17T18:27:58.000+00:00", - "lat" : 45.524581, - "lon" : -122.649367, - "name" : "NE Sandy & 16th", - "stopCode" : "5060", - "stopId" : "prt:5060", + "arrival" : "2009-11-17T18:15:40.000+00:00", + "departure" : "2009-11-17T18:15:40.000+00:00", + "lat" : 45.517226, + "lon" : -122.649266, + "name" : "SE Morrison & 16th", + "stopCode" : "4019", + "stopId" : "prt:4019", "vertexType" : "TRANSIT", "zoneId" : "1" }, @@ -1343,312 +1324,416 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 3602.73, - "endTime" : "2009-11-17T18:41:03.000+00:00", + "distance" : 5218.86, + "endTime" : "2009-11-17T18:35:54.000+00:00", "from" : { - "arrival" : "2009-11-17T18:27:58.000+00:00", - "departure" : "2009-11-17T18:27:58.000+00:00", - "lat" : 45.524581, - "lon" : -122.649367, - "name" : "NE Sandy & 16th", - "stopCode" : "5060", - "stopId" : "prt:5060", - "stopIndex" : 92, - "stopSequence" : 93, + "arrival" : "2009-11-17T18:15:40.000+00:00", + "departure" : "2009-11-17T18:15:40.000+00:00", + "lat" : 45.517226, + "lon" : -122.649266, + "name" : "SE Morrison & 16th", + "stopCode" : "4019", + "stopId" : "prt:4019", + "stopIndex" : 50, + "stopSequence" : 51, "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1385, - "headsign" : "23rd Ave to Tichner", + "generalizedCost" : 1814, + "headsign" : "Montgomery Park", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T18:28:32.000+00:00", - "departure" : "2009-11-17T18:28:32.000+00:00", - "lat" : 45.523767, - "lon" : -122.651428, - "name" : "NE Sandy & 14th", - "stopCode" : "5058", - "stopId" : "prt:5058", - "stopIndex" : 93, - "stopSequence" : 94, + "arrival" : "2009-11-17T18:16:15.000+00:00", + "departure" : "2009-11-17T18:16:15.000+00:00", + "lat" : 45.517253, + "lon" : -122.651354, + "name" : "SE Morrison & 14th", + "stopCode" : "4016", + "stopId" : "prt:4016", + "stopIndex" : 51, + "stopSequence" : 52, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:29:00.000+00:00", - "departure" : "2009-11-17T18:29:00.000+00:00", - "lat" : 45.523103, - "lon" : -122.653064, - "name" : "NE Sandy & 12th", - "stopCode" : "5055", - "stopId" : "prt:5055", - "stopIndex" : 94, - "stopSequence" : 95, + "arrival" : "2009-11-17T18:17:00.000+00:00", + "departure" : "2009-11-17T18:17:00.000+00:00", + "lat" : 45.517299, + "lon" : -122.654067, + "name" : "SE Morrison & 12th", + "stopCode" : "4014", + "stopId" : "prt:4014", + "stopIndex" : 52, + "stopSequence" : 53, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:29:47.000+00:00", - "departure" : "2009-11-17T18:29:47.000+00:00", - "lat" : 45.523024, - "lon" : -122.656526, - "name" : "E Burnside & NE 9th", - "stopCode" : "819", - "stopId" : "prt:819", - "stopIndex" : 95, - "stopSequence" : 96, + "arrival" : "2009-11-17T18:17:38.000+00:00", + "departure" : "2009-11-17T18:17:38.000+00:00", + "lat" : 45.517292, + "lon" : -122.656563, + "name" : "SE Morrison & 9th", + "stopCode" : "4026", + "stopId" : "prt:4026", + "stopIndex" : 53, + "stopSequence" : 54, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:30:24.000+00:00", - "departure" : "2009-11-17T18:30:24.000+00:00", - "lat" : 45.523012, - "lon" : -122.659365, - "name" : "E Burnside & NE 6th", - "stopCode" : "805", - "stopId" : "prt:805", - "stopIndex" : 96, - "stopSequence" : 97, + "arrival" : "2009-11-17T18:18:08.000+00:00", + "departure" : "2009-11-17T18:18:08.000+00:00", + "lat" : 45.517322, + "lon" : -122.65847, + "name" : "SE Morrison & 7th", + "stopCode" : "4025", + "stopId" : "prt:4025", + "stopIndex" : 54, + "stopSequence" : 55, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:30:52.000+00:00", - "departure" : "2009-11-17T18:30:52.000+00:00", - "lat" : 45.523015, - "lon" : -122.661534, - "name" : "E Burnside & NE M L King", - "stopCode" : "705", - "stopId" : "prt:705", - "stopIndex" : 97, - "stopSequence" : 98, + "arrival" : "2009-11-17T18:18:39.000+00:00", + "departure" : "2009-11-17T18:18:39.000+00:00", + "lat" : 45.517298, + "lon" : -122.660523, + "name" : "SE Morrison & Grand", + "stopCode" : "4013", + "stopId" : "prt:4013", + "stopIndex" : 55, + "stopSequence" : 56, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:33:00.000+00:00", - "departure" : "2009-11-17T18:33:00.000+00:00", - "lat" : 45.523249, - "lon" : -122.671269, - "name" : "W Burnside & Burnside Bridge", - "stopCode" : "689", - "stopId" : "prt:689", - "stopIndex" : 98, - "stopSequence" : 99, + "arrival" : "2009-11-17T18:20:03.000+00:00", + "departure" : "2009-11-17T18:20:03.000+00:00", + "lat" : 45.517351, + "lon" : -122.66601, + "name" : "Morrison Bridge", + "stopCode" : "4029", + "stopId" : "prt:4029", + "stopIndex" : 56, + "stopSequence" : 57, "vertexType" : "TRANSIT", - "zoneId" : "0" + "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:34:00.000+00:00", - "departure" : "2009-11-17T18:34:00.000+00:00", - "lat" : 45.523169, - "lon" : -122.675893, - "name" : "W Burnside & NW 5th", - "stopCode" : "782", - "stopId" : "prt:782", - "stopIndex" : 99, - "stopSequence" : 100, + "arrival" : "2009-11-17T18:22:27.000+00:00", + "departure" : "2009-11-17T18:22:27.000+00:00", + "lat" : 45.51959, + "lon" : -122.674599, + "name" : "SW Washington & 3rd", + "stopCode" : "6158", + "stopId" : "prt:6158", + "stopIndex" : 57, + "stopSequence" : 58, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:35:17.000+00:00", - "departure" : "2009-11-17T18:35:17.000+00:00", - "lat" : 45.523115, - "lon" : -122.678939, - "name" : "W Burnside & NW Park", - "stopCode" : "716", - "stopId" : "prt:716", - "stopIndex" : 100, - "stopSequence" : 101, + "arrival" : "2009-11-17T18:23:00.000+00:00", + "departure" : "2009-11-17T18:23:00.000+00:00", + "lat" : 45.520129, + "lon" : -122.676635, + "name" : "SW Washington & 5th", + "stopCode" : "6160", + "stopId" : "prt:6160", + "stopIndex" : 58, + "stopSequence" : 59, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:36:25.000+00:00", - "departure" : "2009-11-17T18:36:25.000+00:00", - "lat" : 45.523048, - "lon" : -122.681606, - "name" : "W Burnside & NW 10th", - "stopCode" : "10791", - "stopId" : "prt:10791", - "stopIndex" : 101, - "stopSequence" : 102, + "arrival" : "2009-11-17T18:23:52.000+00:00", + "departure" : "2009-11-17T18:23:52.000+00:00", + "lat" : 45.520695, + "lon" : -122.678657, + "name" : "SW Washington & Broadway", + "stopCode" : "6137", + "stopId" : "prt:6137", + "stopIndex" : 59, + "stopSequence" : 60, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:37:14.000+00:00", - "departure" : "2009-11-17T18:37:14.000+00:00", - "lat" : 45.523, - "lon" : -122.683535, - "name" : "W Burnside & NW 12th", - "stopCode" : "11032", - "stopId" : "prt:11032", - "stopIndex" : 102, - "stopSequence" : 103, + "arrival" : "2009-11-17T18:24:34.000+00:00", + "departure" : "2009-11-17T18:24:34.000+00:00", + "lat" : 45.521124, + "lon" : -122.6803, + "name" : "SW Washington & 9th", + "stopCode" : "6169", + "stopId" : "prt:6169", + "stopIndex" : 60, + "stopSequence" : 61, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:39:09.000+00:00", - "departure" : "2009-11-17T18:39:09.000+00:00", - "lat" : 45.522985, - "lon" : -122.688091, - "name" : "W Burnside & NW 17th", - "stopCode" : "10809", - "stopId" : "prt:10809", - "stopIndex" : 103, - "stopSequence" : 104, + "arrival" : "2009-11-17T18:25:47.000+00:00", + "departure" : "2009-11-17T18:25:47.000+00:00", + "lat" : 45.521094, + "lon" : -122.682819, + "name" : "SW 11th & Alder", + "stopCode" : "9600", + "stopId" : "prt:9600", + "stopIndex" : 61, + "stopSequence" : 62, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:26:36.000+00:00", + "departure" : "2009-11-17T18:26:36.000+00:00", + "lat" : 45.52055, + "lon" : -122.683933, + "name" : "SW Morrison & 12th", + "stopCode" : "9598", + "stopId" : "prt:9598", + "stopIndex" : 62, + "stopSequence" : 63, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:27:25.000+00:00", + "departure" : "2009-11-17T18:27:25.000+00:00", + "lat" : 45.521063, + "lon" : -122.685848, + "name" : "SW Morrison & 14th", + "stopCode" : "9708", + "stopId" : "prt:9708", + "stopIndex" : 63, + "stopSequence" : 64, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:40:00.000+00:00", - "departure" : "2009-11-17T18:40:00.000+00:00", + "arrival" : "2009-11-17T18:28:18.000+00:00", + "departure" : "2009-11-17T18:28:18.000+00:00", + "lat" : 45.521641, + "lon" : -122.687932, + "name" : "SW Morrison & 16th", + "stopCode" : "9613", + "stopId" : "prt:9613", + "stopIndex" : 64, + "stopSequence" : 65, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:29:00.000+00:00", + "departure" : "2009-11-17T18:29:00.000+00:00", + "lat" : 45.52206, + "lon" : -122.689577, + "name" : "SW Morrison & 17th", + "stopCode" : "9599", + "stopId" : "prt:9599", + "stopIndex" : 65, + "stopSequence" : 66, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:29:54.000+00:00", + "departure" : "2009-11-17T18:29:54.000+00:00", "lat" : 45.523097, "lon" : -122.690083, "name" : "W Burnside & NW 19th", "stopCode" : "735", "stopId" : "prt:735", - "stopIndex" : 104, - "stopSequence" : 105, + "stopIndex" : 66, + "stopSequence" : 67, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:40:27.000+00:00", - "departure" : "2009-11-17T18:40:27.000+00:00", + "arrival" : "2009-11-17T18:30:31.000+00:00", + "departure" : "2009-11-17T18:30:31.000+00:00", "lat" : 45.523176, "lon" : -122.692139, "name" : "W Burnside & NW 20th", "stopCode" : "741", "stopId" : "prt:741", - "stopIndex" : 105, - "stopSequence" : 106, + "stopIndex" : 67, + "stopSequence" : 68, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:40:40.000+00:00", - "departure" : "2009-11-17T18:40:40.000+00:00", + "arrival" : "2009-11-17T18:30:48.000+00:00", + "departure" : "2009-11-17T18:30:48.000+00:00", "lat" : 45.52322, "lon" : -122.69313, "name" : "W Burnside & NW 20th Pl", "stopCode" : "742", "stopId" : "prt:742", - "stopIndex" : 106, - "stopSequence" : 107, + "stopIndex" : 68, + "stopSequence" : 69, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:31:20.000+00:00", + "departure" : "2009-11-17T18:31:20.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "stopIndex" : 69, + "stopSequence" : 70, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:32:18.000+00:00", + "departure" : "2009-11-17T18:32:18.000+00:00", + "lat" : 45.523512, + "lon" : -122.698081, + "name" : "W Burnside & NW 23rd", + "stopCode" : "755", + "stopId" : "prt:755", + "stopIndex" : 70, + "stopSequence" : 71, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:33:11.000+00:00", + "departure" : "2009-11-17T18:33:11.000+00:00", + "lat" : 45.525416, + "lon" : -122.698381, + "name" : "NW 23rd & Flanders", + "stopCode" : "7157", + "stopId" : "prt:7157", + "stopIndex" : 71, + "stopSequence" : 72, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:34:05.000+00:00", + "departure" : "2009-11-17T18:34:05.000+00:00", + "lat" : 45.527543, + "lon" : -122.698473, + "name" : "NW 23rd & Irving", + "stopCode" : "7161", + "stopId" : "prt:7161", + "stopIndex" : 72, + "stopSequence" : 73, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:35:00.000+00:00", + "departure" : "2009-11-17T18:35:00.000+00:00", + "lat" : 45.529681, + "lon" : -122.698529, + "name" : "NW 23rd & Lovejoy", + "stopCode" : "7163", + "stopId" : "prt:7163", + "stopIndex" : 73, + "stopSequence" : 74, "vertexType" : "TRANSIT", "zoneId" : "1" } ], "legGeometry" : { - "length" : 94, - "points" : "coztGd}qkVNl@r@`CZhA`A`D??Ph@l@tBb@rARh@Pd@???BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB" + "length" : 135, + "points" : "kaytG||qkVA~@?jE?tC???r@AhE?jE?rA???tBAjE?nD???X?hE?xC??Ah@?pE?~C???J?`@?vAAvBEbE?jEAlE?`BAbB@d@??@tAAj@Cx@Cb@Cp@_@dEcAtFoA`IS~@i@`BmAzDi@zAc@pAi@~C??Id@u@jEm@bD??If@u@jEk@bD??If@u@|DW`B??CPs@|Du@lElBz@??VJbCfAk@dD??Id@w@rEWvAId@AF??Q~@s@`Ei@~C??Ib@u@dEWzA??]jB]MQSe@WOKOKIIQe@GWE]GnD??AXKnEGnD???XGjD??AZEfCC`AEzB??AXCfAGxDE|AEtBIlC??APkAh@o@?sCB{BD??S?mCDmCDyBB??U?mCDmCDyBB??S?oCDmCDmCBo@@" }, "mode" : "BUS", "pathway" : false, "realTime" : false, - "route" : "Burnside/Stark", - "routeId" : "prt:20", - "routeLongName" : "Burnside/Stark", - "routeShortName" : "20", + "route" : "Belmont/NW 23rd", + "routeId" : "prt:15", + "routeLongName" : "Belmont/NW 23rd", + "routeShortName" : "15", "routeType" : 3, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:27:58.000+00:00", + "startTime" : "2009-11-17T18:15:40.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T18:41:03.000+00:00", - "departure" : "2009-11-17T18:41:03.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", - "stopIndex" : 107, - "stopSequence" : 108, + "arrival" : "2009-11-17T18:35:54.000+00:00", + "departure" : "2009-11-17T18:35:54.000+00:00", + "lat" : 45.532159, + "lon" : -122.698634, + "name" : "NW 23rd & Overton", + "stopCode" : "8981", + "stopId" : "prt:8981", + "stopIndex" : 74, + "stopSequence" : 75, "vertexType" : "TRANSIT", "zoneId" : "1" }, "transitLeg" : true, - "tripBlockId" : "2071", - "tripId" : "prt:200W1210" + "tripBlockId" : "1549", + "tripId" : "prt:150W1400" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 999.1, - "endTime" : "2009-11-17T18:53:55.000+00:00", + "distance" : 266.21, + "endTime" : "2009-11-17T18:39:22.000+00:00", "from" : { - "arrival" : "2009-11-17T18:41:03.000+00:00", - "departure" : "2009-11-17T18:41:03.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", + "arrival" : "2009-11-17T18:35:54.000+00:00", + "departure" : "2009-11-17T18:35:54.000+00:00", + "lat" : 45.532159, + "lon" : -122.698634, + "name" : "NW 23rd & Overton", + "stopCode" : "8981", + "stopId" : "prt:8981", "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1511, + "generalizedCost" : 405, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 29, - "points" : "ugztGdzzkVL?ATClAI|DK?G?mCBkCDoCDmCBoCDkCBoCB[?sBD]?Y@eA@K?C?K?W@{A@M@C@I?_CB?G" + "length" : 13, + "points" : "}~{tGnq{kV?LVAF?J?L?rBCLA?Q?EAyAEcH?G" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:41:03.000+00:00", + "startTime" : "2009-11-17T18:35:54.000+00:00", "steps" : [ { - "absoluteDirection" : "WEST", + "absoluteDirection" : "SOUTH", "area" : false, "bogusName" : false, - "distance" : 113.27, + "distance" : 104.46, "elevation" : "", - "lat" : 45.5232491, - "lon" : -122.6949067, + "lat" : 45.5321578, + "lon" : -122.6987026, "relativeDirection" : "DEPART", "stayOn" : false, - "streetName" : "West Burnside Street", - "walkingBike" : false - }, - { - "absoluteDirection" : "NORTH", - "area" : false, - "bogusName" : false, - "distance" : 882.16, - "elevation" : "", - "lat" : 45.5233204, - "lon" : -122.696357, - "relativeDirection" : "RIGHT", - "stayOn" : false, - "streetName" : "Northwest 22nd Avenue", + "streetName" : "Northwest 23rd Avenue", "walkingBike" : false }, { "absoluteDirection" : "EAST", "area" : false, "bogusName" : false, - "distance" : 3.68, + "distance" : 161.77, "elevation" : "", - "lat" : 45.5312508, - "lon" : -122.6966386, - "relativeDirection" : "RIGHT", + "lat" : 45.5312188, + "lon" : -122.6986675, + "relativeDirection" : "LEFT", "stayOn" : false, "streetName" : "Northwest Northrup Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:53:55.000+00:00", + "arrival" : "2009-11-17T18:39:22.000+00:00", "lat" : 45.53122, "lon" : -122.69659, "name" : "NW Northrup St. & NW 22nd Ave. (P2)", @@ -1658,21 +1743,21 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "walkingBike" : false } ], - "startTime" : "2009-11-17T18:16:00.000+00:00", + "startTime" : "2009-11-17T18:14:52.000+00:00", "tooSloped" : false, "transfers" : 0, - "transitTime" : 785, + "transitTime" : 1214, "waitingTime" : 0, - "walkDistance" : 1919.43, + "walkDistance" : 328.22, "walkLimitExceeded" : false, - "walkTime" : 1490 + "walkTime" : 256 }, { "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 1540, + "duration" : 2020, "elevationGained" : 0.0, "elevationLost" : 0.0, - "endTime" : "2009-11-17T18:55:32.000+00:00", + "endTime" : "2009-11-17T18:51:19.000+00:00", "fare" : { "details" : { }, "fare" : { }, @@ -1696,42 +1781,62 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "name" : "regular" } ] + }, + { + "legIndices" : [ + 3 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] } ] }, - "generalizedCost" : 2385, + "generalizedCost" : 4023, "legs" : [ { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 62.01, - "endTime" : "2009-11-17T18:30:40.000+00:00", + "distance" : 1022.47, + "endTime" : "2009-11-17T18:30:50.000+00:00", "from" : { - "departure" : "2009-11-17T18:29:52.000+00:00", + "departure" : "2009-11-17T18:17:39.000+00:00", "lat" : 45.51726, "lon" : -122.64847, "name" : "SE Morrison St. & SE 17th Ave. (P1)", "vertexType" : "NORMAL" }, - "generalizedCost" : 95, + "generalizedCost" : 1543, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 4, - "points" : "kaytG~wqkV?T?fCG?" + "length" : 37, + "points" : "kaytG~wqkV?T?fCAl@?R?jE?rC?t@?hEAvD?R?R?|@?dBAP?PAxD?nD?X?jE?bA?t@?N?Z?ZAX?^@bBAt@?zC?N?J?NQ?O?sA@?W" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:29:52.000+00:00", + "startTime" : "2009-11-17T18:17:39.000+00:00", "steps" : [ { "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 62.02, + "distance" : 956.36, "elevation" : "", "lat" : 45.517186, "lon" : -122.6484704, @@ -1739,16 +1844,29 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "stayOn" : false, "streetName" : "Southeast Morrison Street", "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 66.13, + "elevation" : "", + "lat" : 45.5172325, + "lon" : -122.6607432, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast Grand Avenue", + "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:30:40.000+00:00", - "departure" : "2009-11-17T18:30:40.000+00:00", - "lat" : 45.517226, - "lon" : -122.649266, - "name" : "SE Morrison & 16th", - "stopCode" : "4019", - "stopId" : "prt:4019", + "arrival" : "2009-11-17T18:30:50.000+00:00", + "departure" : "2009-11-17T18:30:50.000+00:00", + "lat" : 45.517828, + "lon" : -122.660632, + "name" : "SE Grand & Alder", + "stopCode" : "11485", + "stopId" : "prt:11485", "vertexType" : "TRANSIT", "zoneId" : "1" }, @@ -1762,416 +1880,403 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 5218.86, - "endTime" : "2009-11-17T18:52:04.000+00:00", + "distance" : 1580.92, + "endTime" : "2009-11-17T18:34:53.000+00:00", "from" : { - "arrival" : "2009-11-17T18:30:40.000+00:00", - "departure" : "2009-11-17T18:30:40.000+00:00", - "lat" : 45.517226, - "lon" : -122.649266, - "name" : "SE Morrison & 16th", - "stopCode" : "4019", - "stopId" : "prt:4019", - "stopIndex" : 50, - "stopSequence" : 51, + "arrival" : "2009-11-17T18:30:50.000+00:00", + "departure" : "2009-11-17T18:30:50.000+00:00", + "lat" : 45.517828, + "lon" : -122.660632, + "name" : "SE Grand & Alder", + "stopCode" : "11485", + "stopId" : "prt:11485", + "stopIndex" : 11, + "stopSequence" : 12, "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1884, - "headsign" : "NW 27th & Thurman", + "generalizedCost" : 843, + "headsign" : "Jantzen Beach", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T18:31:15.000+00:00", - "departure" : "2009-11-17T18:31:15.000+00:00", - "lat" : 45.517253, - "lon" : -122.651354, - "name" : "SE Morrison & 14th", - "stopCode" : "4016", - "stopId" : "prt:4016", - "stopIndex" : 51, - "stopSequence" : 52, + "arrival" : "2009-11-17T18:31:25.000+00:00", + "departure" : "2009-11-17T18:31:25.000+00:00", + "lat" : 45.519986, + "lon" : -122.660636, + "name" : "SE Grand & Oak", + "stopCode" : "2174", + "stopId" : "prt:2174", + "stopIndex" : 12, + "stopSequence" : 13, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:32:00.000+00:00", - "departure" : "2009-11-17T18:32:00.000+00:00", - "lat" : 45.517299, - "lon" : -122.654067, - "name" : "SE Morrison & 12th", - "stopCode" : "4014", - "stopId" : "prt:4014", - "stopIndex" : 52, - "stopSequence" : 53, + "arrival" : "2009-11-17T18:32:10.000+00:00", + "departure" : "2009-11-17T18:32:10.000+00:00", + "lat" : 45.522782, + "lon" : -122.660589, + "name" : "SE Grand & E Burnside", + "stopCode" : "2167", + "stopId" : "prt:2167", + "stopIndex" : 13, + "stopSequence" : 14, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:32:38.000+00:00", - "departure" : "2009-11-17T18:32:38.000+00:00", - "lat" : 45.517292, - "lon" : -122.656563, - "name" : "SE Morrison & 9th", - "stopCode" : "4026", - "stopId" : "prt:4026", - "stopIndex" : 53, - "stopSequence" : 54, + "arrival" : "2009-11-17T18:32:39.000+00:00", + "departure" : "2009-11-17T18:32:39.000+00:00", + "lat" : 45.524582, + "lon" : -122.660578, + "name" : "NE Grand & Davis", + "stopCode" : "8829", + "stopId" : "prt:8829", + "stopIndex" : 14, + "stopSequence" : 15, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:33:08.000+00:00", - "departure" : "2009-11-17T18:33:08.000+00:00", - "lat" : 45.517322, - "lon" : -122.65847, - "name" : "SE Morrison & 7th", - "stopCode" : "4025", - "stopId" : "prt:4025", - "stopIndex" : 54, - "stopSequence" : 55, + "arrival" : "2009-11-17T18:33:26.000+00:00", + "departure" : "2009-11-17T18:33:26.000+00:00", + "lat" : 45.527519, + "lon" : -122.66056, + "name" : "NE Grand & Hoyt", + "stopCode" : "2169", + "stopId" : "prt:2169", + "stopIndex" : 15, + "stopSequence" : 16, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:33:39.000+00:00", - "departure" : "2009-11-17T18:33:39.000+00:00", - "lat" : 45.517298, - "lon" : -122.660523, - "name" : "SE Morrison & Grand", - "stopCode" : "4013", - "stopId" : "prt:4013", - "stopIndex" : 55, - "stopSequence" : 56, + "arrival" : "2009-11-17T18:34:00.000+00:00", + "departure" : "2009-11-17T18:34:00.000+00:00", + "lat" : 45.529602, + "lon" : -122.660529, + "name" : "NE Grand & Pacific", + "stopCode" : "2175", + "stopId" : "prt:2175", + "stopIndex" : 16, + "stopSequence" : 17, "vertexType" : "TRANSIT", "zoneId" : "1" - }, + } + ], + "legGeometry" : { + "length" : 35, + "points" : "meytGtdtkVC?OAQ?}B?mC?{BA??Q?oCAmC?mC?qBA??]?mC?mCAm@???aB?{AC[?kDAsCBq@A??uA?iCAgC?w@???yA?sCCoCAiB@" + }, + "mode" : "BUS", + "pathway" : false, + "realTime" : false, + "route" : "Martin Luther King Jr Blvd", + "routeId" : "prt:6", + "routeLongName" : "Martin Luther King Jr Blvd", + "routeShortName" : "6", + "routeType" : 3, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:30:50.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:34:53.000+00:00", + "departure" : "2009-11-17T18:34:53.000+00:00", + "lat" : 45.532047, + "lon" : -122.660537, + "name" : "NE Grand & Wasco", + "stopCode" : "10953", + "stopId" : "prt:10953", + "stopIndex" : 17, + "stopSequence" : 18, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : true, + "tripBlockId" : "605", + "tripId" : "prt:60W1220" + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 51.83, + "endTime" : "2009-11-17T18:35:36.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:34:53.000+00:00", + "departure" : "2009-11-17T18:34:53.000+00:00", + "lat" : 45.532047, + "lon" : -122.660537, + "name" : "NE Grand & Wasco", + "stopCode" : "10953", + "stopId" : "prt:10953", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 80, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 10, + "points" : "g~{tGjctkV?B`@?\\?R?@?@?BC???I" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:34:53.000+00:00", + "steps" : [ { - "arrival" : "2009-11-17T18:35:03.000+00:00", - "departure" : "2009-11-17T18:35:03.000+00:00", - "lat" : 45.517351, - "lon" : -122.66601, - "name" : "Morrison Bridge", - "stopCode" : "4029", - "stopId" : "prt:4029", - "stopIndex" : 56, - "stopSequence" : 57, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, + "absoluteDirection" : "SOUTH", + "area" : false, + "bogusName" : false, + "distance" : 51.83, + "elevation" : "", + "lat" : 45.532047, + "lon" : -122.6605564, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Northeast Grand Avenue", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:35:36.000+00:00", + "departure" : "2009-11-17T18:38:05.000+00:00", + "lat" : 45.531586, + "lon" : -122.660482, + "name" : "NE Multnomah & Grand", + "stopCode" : "4043", + "stopId" : "prt:4043", + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 3448.6, + "endTime" : "2009-11-17T18:50:55.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:35:36.000+00:00", + "departure" : "2009-11-17T18:38:05.000+00:00", + "lat" : 45.531586, + "lon" : -122.660482, + "name" : "NE Multnomah & Grand", + "stopCode" : "4043", + "stopId" : "prt:4043", + "stopIndex" : 82, + "stopSequence" : 83, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "generalizedCost" : 1519, + "headsign" : "Montgomery Park", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ { - "arrival" : "2009-11-17T18:37:27.000+00:00", - "departure" : "2009-11-17T18:37:27.000+00:00", - "lat" : 45.51959, - "lon" : -122.674599, - "name" : "SW Washington & 3rd", - "stopCode" : "6158", - "stopId" : "prt:6158", - "stopIndex" : 57, - "stopSequence" : 58, + "arrival" : "2009-11-17T18:39:09.000+00:00", + "departure" : "2009-11-17T18:39:09.000+00:00", + "lat" : 45.531159, + "lon" : -122.66293, + "name" : "NE Multnomah & 3rd", + "stopCode" : "11492", + "stopId" : "prt:11492", + "stopIndex" : 83, + "stopSequence" : 84, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:38:00.000+00:00", - "departure" : "2009-11-17T18:38:00.000+00:00", - "lat" : 45.520129, - "lon" : -122.676635, - "name" : "SW Washington & 5th", - "stopCode" : "6160", - "stopId" : "prt:6160", - "stopIndex" : 58, - "stopSequence" : 59, + "arrival" : "2009-11-17T18:41:00.000+00:00", + "departure" : "2009-11-17T18:41:00.000+00:00", + "lat" : 45.530005, + "lon" : -122.666476, + "name" : "Rose Quarter Transit Center", + "stopCode" : "2592", + "stopId" : "prt:2592", + "stopIndex" : 84, + "stopSequence" : 85, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:38:52.000+00:00", - "departure" : "2009-11-17T18:38:52.000+00:00", - "lat" : 45.520695, - "lon" : -122.678657, - "name" : "SW Washington & Broadway", - "stopCode" : "6137", - "stopId" : "prt:6137", - "stopIndex" : 59, - "stopSequence" : 60, + "arrival" : "2009-11-17T18:44:20.000+00:00", + "departure" : "2009-11-17T18:44:20.000+00:00", + "lat" : 45.526655, + "lon" : -122.676462, + "name" : "NW Glisan & 6th", + "stopCode" : "10803", + "stopId" : "prt:10803", + "stopIndex" : 85, + "stopSequence" : 86, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:39:34.000+00:00", - "departure" : "2009-11-17T18:39:34.000+00:00", - "lat" : 45.521124, - "lon" : -122.6803, - "name" : "SW Washington & 9th", - "stopCode" : "6169", - "stopId" : "prt:6169", - "stopIndex" : 60, - "stopSequence" : 61, + "arrival" : "2009-11-17T18:45:15.000+00:00", + "departure" : "2009-11-17T18:45:15.000+00:00", + "lat" : 45.528799, + "lon" : -122.677238, + "name" : "NW Station Way & Union Station", + "stopCode" : "12801", + "stopId" : "prt:12801", + "stopIndex" : 86, + "stopSequence" : 87, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:40:47.000+00:00", - "departure" : "2009-11-17T18:40:47.000+00:00", - "lat" : 45.521094, - "lon" : -122.682819, - "name" : "SW 11th & Alder", - "stopCode" : "9600", - "stopId" : "prt:9600", - "stopIndex" : 61, - "stopSequence" : 62, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:41:36.000+00:00", - "departure" : "2009-11-17T18:41:36.000+00:00", - "lat" : 45.52055, - "lon" : -122.683933, - "name" : "SW Morrison & 12th", - "stopCode" : "9598", - "stopId" : "prt:9598", - "stopIndex" : 62, - "stopSequence" : 63, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:42:25.000+00:00", - "departure" : "2009-11-17T18:42:25.000+00:00", - "lat" : 45.521063, - "lon" : -122.685848, - "name" : "SW Morrison & 14th", - "stopCode" : "9708", - "stopId" : "prt:9708", - "stopIndex" : 63, - "stopSequence" : 64, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:43:18.000+00:00", - "departure" : "2009-11-17T18:43:18.000+00:00", - "lat" : 45.521641, - "lon" : -122.687932, - "name" : "SW Morrison & 16th", - "stopCode" : "9613", - "stopId" : "prt:9613", - "stopIndex" : 64, - "stopSequence" : 65, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:44:00.000+00:00", - "departure" : "2009-11-17T18:44:00.000+00:00", - "lat" : 45.52206, - "lon" : -122.689577, - "name" : "SW Morrison & 17th", - "stopCode" : "9599", - "stopId" : "prt:9599", - "stopIndex" : 65, - "stopSequence" : 66, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:45:03.000+00:00", - "departure" : "2009-11-17T18:45:03.000+00:00", - "lat" : 45.523097, - "lon" : -122.690083, - "name" : "W Burnside & NW 19th", - "stopCode" : "735", - "stopId" : "prt:735", - "stopIndex" : 66, - "stopSequence" : 67, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:45:46.000+00:00", - "departure" : "2009-11-17T18:45:46.000+00:00", - "lat" : 45.523176, - "lon" : -122.692139, - "name" : "W Burnside & NW 20th", - "stopCode" : "741", - "stopId" : "prt:741", - "stopIndex" : 67, - "stopSequence" : 68, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:46:07.000+00:00", - "departure" : "2009-11-17T18:46:07.000+00:00", - "lat" : 45.52322, - "lon" : -122.69313, - "name" : "W Burnside & NW 20th Pl", - "stopCode" : "742", - "stopId" : "prt:742", - "stopIndex" : 68, - "stopSequence" : 69, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:46:44.000+00:00", - "departure" : "2009-11-17T18:46:44.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", - "stopIndex" : 69, - "stopSequence" : 70, + "arrival" : "2009-11-17T18:47:00.000+00:00", + "departure" : "2009-11-17T18:47:00.000+00:00", + "lat" : 45.531582, + "lon" : -122.681193, + "name" : "NW Northrup & 10th", + "stopCode" : "12802", + "stopId" : "prt:12802", + "stopIndex" : 87, + "stopSequence" : 88, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:47:51.000+00:00", - "departure" : "2009-11-17T18:47:51.000+00:00", - "lat" : 45.523512, - "lon" : -122.698081, - "name" : "W Burnside & NW 23rd", - "stopCode" : "755", - "stopId" : "prt:755", - "stopIndex" : 70, - "stopSequence" : 71, + "arrival" : "2009-11-17T18:47:33.000+00:00", + "departure" : "2009-11-17T18:47:33.000+00:00", + "lat" : 45.531534, + "lon" : -122.683319, + "name" : "NW 12th & Northrup", + "stopCode" : "12796", + "stopId" : "prt:12796", + "stopIndex" : 88, + "stopSequence" : 89, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:48:53.000+00:00", - "departure" : "2009-11-17T18:48:53.000+00:00", - "lat" : 45.525416, - "lon" : -122.698381, - "name" : "NW 23rd & Flanders", - "stopCode" : "7157", - "stopId" : "prt:7157", - "stopIndex" : 71, - "stopSequence" : 72, + "arrival" : "2009-11-17T18:48:04.000+00:00", + "departure" : "2009-11-17T18:48:04.000+00:00", + "lat" : 45.531503, + "lon" : -122.685357, + "name" : "NW Northrup & 14th", + "stopCode" : "10775", + "stopId" : "prt:10775", + "stopIndex" : 89, + "stopSequence" : 90, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:49:56.000+00:00", - "departure" : "2009-11-17T18:49:56.000+00:00", - "lat" : 45.527543, - "lon" : -122.698473, - "name" : "NW 23rd & Irving", - "stopCode" : "7161", - "stopId" : "prt:7161", - "stopIndex" : 72, - "stopSequence" : 73, + "arrival" : "2009-11-17T18:49:07.000+00:00", + "departure" : "2009-11-17T18:49:07.000+00:00", + "lat" : 45.531434, + "lon" : -122.689417, + "name" : "NW Northrup & 18th", + "stopCode" : "10776", + "stopId" : "prt:10776", + "stopIndex" : 90, + "stopSequence" : 91, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:51:00.000+00:00", - "departure" : "2009-11-17T18:51:00.000+00:00", - "lat" : 45.529681, - "lon" : -122.698529, - "name" : "NW 23rd & Lovejoy", - "stopCode" : "7163", - "stopId" : "prt:7163", - "stopIndex" : 73, - "stopSequence" : 74, + "arrival" : "2009-11-17T18:50:24.000+00:00", + "departure" : "2009-11-17T18:50:24.000+00:00", + "lat" : 45.531346, + "lon" : -122.694455, + "name" : "NW Northrup & 21st", + "stopCode" : "10777", + "stopId" : "prt:10777", + "stopIndex" : 91, + "stopSequence" : 92, "vertexType" : "TRANSIT", "zoneId" : "1" } ], "legGeometry" : { - "length" : 135, - "points" : "kaytG||qkVA~@?jE?tC???r@AhE?jE?rA???tBAjE?nD???X?hE?xC??Ah@?pE?~C???J?`@?vAAvBEbE?jEAlE?`BAbB@d@??@tAAj@Cx@Cb@Cp@_@dEcAtFoA`IS~@i@`BmAzDi@zAc@pAi@~C??Id@u@jEm@bD??If@u@jEk@bD??If@u@|DW`B??CPs@|Du@lElBz@??VJbCfAk@dD??Id@w@rEWvAId@AF??Q~@s@`Ei@~C??Ib@u@dEWzA??]jB]MQSe@WOKOKIIQe@GWE]GnD??AXKnEGnD???XGjD??AZEfCC`AEzB??AXCfAGxDE|AEtBIlC??APkAh@o@?sCB{BD??S?mCDmCDyBB??U?mCDmCDyBB??S?oCDmCDmCBo@@" + "length" : 101, + "points" : "}z{tG~btkV?^?nE?V@Z?PH\\Nb@`@~@Rf@??`@bANb@FV@R?P?pE?jA@h@AnAbBl@LFJN\\f@LT??NXJPPVJFf@Vf@Pp@Nd@NRLB@RNXZR\\vAhC@BhAhD`AhClAbDBrDCnG@n@@^@d@HdAP`CBjEDvD???LqCFmCDYBGDEBGJkAzAQR??KNa@b@MJuBBY?OHW@u@~@aD`EcBhBBrD@xC??@l@BlE@lD???XBjEBpD???VBlE?dA@t@?b@?h@BfEBrD???VBhEFtKDvJ??@\\DnJ" }, "mode" : "BUS", "pathway" : false, "realTime" : false, - "route" : "Belmont/NW 23rd", - "routeId" : "prt:15", - "routeLongName" : "Belmont/NW 23rd", - "routeShortName" : "15", + "route" : "Broadway/Halsey", + "routeId" : "prt:77", + "routeLongName" : "Broadway/Halsey", + "routeShortName" : "77", "routeType" : 3, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:30:40.000+00:00", + "startTime" : "2009-11-17T18:38:05.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T18:52:04.000+00:00", - "departure" : "2009-11-17T18:52:04.000+00:00", - "lat" : 45.532159, - "lon" : -122.698634, - "name" : "NW 23rd & Overton", - "stopCode" : "8981", - "stopId" : "prt:8981", - "stopIndex" : 74, - "stopSequence" : 75, + "arrival" : "2009-11-17T18:50:55.000+00:00", + "departure" : "2009-11-17T18:50:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", + "stopIndex" : 92, + "stopSequence" : 93, "vertexType" : "TRANSIT", "zoneId" : "1" }, "transitLeg" : true, - "tripBlockId" : "1541", - "tripId" : "prt:150W1410" + "tripBlockId" : "7705", + "tripId" : "prt:771W1170" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 266.21, - "endTime" : "2009-11-17T18:55:32.000+00:00", + "distance" : 18.81, + "endTime" : "2009-11-17T18:51:19.000+00:00", "from" : { - "arrival" : "2009-11-17T18:52:04.000+00:00", - "departure" : "2009-11-17T18:52:04.000+00:00", - "lat" : 45.532159, - "lon" : -122.698634, - "name" : "NW 23rd & Overton", - "stopCode" : "8981", - "stopId" : "prt:8981", + "arrival" : "2009-11-17T18:50:55.000+00:00", + "departure" : "2009-11-17T18:50:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 405, + "generalizedCost" : 37, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 13, - "points" : "}~{tGnq{kV?LVAF?J?L?rBCLA?Q?EAyAEcH?G" + "length" : 7, + "points" : "sy{tGxc{kV???LABF?B??J" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:52:04.000+00:00", + "startTime" : "2009-11-17T18:50:55.000+00:00", "steps" : [ { - "absoluteDirection" : "SOUTH", + "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 104.46, + "distance" : 18.81, "elevation" : "", - "lat" : 45.5321578, - "lon" : -122.6987026, + "lat" : 45.5313019, + "lon" : -122.6964448, "relativeDirection" : "DEPART", "stayOn" : false, - "streetName" : "Northwest 23rd Avenue", - "walkingBike" : false - }, - { - "absoluteDirection" : "EAST", - "area" : false, - "bogusName" : false, - "distance" : 161.77, - "elevation" : "", - "lat" : 45.5312188, - "lon" : -122.6986675, - "relativeDirection" : "LEFT", - "stayOn" : false, "streetName" : "Northwest Northrup Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:55:32.000+00:00", + "arrival" : "2009-11-17T18:51:19.000+00:00", "lat" : 45.53122, "lon" : -122.69659, "name" : "NW Northrup St. & NW 22nd Ave. (P2)", @@ -2181,21 +2286,21 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "walkingBike" : false } ], - "startTime" : "2009-11-17T18:29:52.000+00:00", + "startTime" : "2009-11-17T18:17:39.000+00:00", "tooSloped" : false, - "transfers" : 0, - "transitTime" : 1284, - "waitingTime" : 0, - "walkDistance" : 328.22, + "transfers" : 1, + "transitTime" : 1013, + "waitingTime" : 149, + "walkDistance" : 1093.11, "walkLimitExceeded" : false, - "walkTime" : 256 + "walkTime" : 858 }, { "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 1849, + "duration" : 2275, "elevationGained" : 0.0, "elevationLost" : 0.0, - "endTime" : "2009-11-17T19:08:19.000+00:00", + "endTime" : "2009-11-17T18:53:55.000+00:00", "fare" : { "details" : { }, "fare" : { }, @@ -2219,62 +2324,42 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "name" : "regular" } ] - }, - { - "legIndices" : [ - 2 - ], - "products" : [ - { - "amount" : { - "cents" : 200, - "currency" : { - "currency" : "USD", - "currencyCode" : "USD", - "defaultFractionDigits" : 2, - "symbol" : "$" - } - }, - "id" : "prt:8", - "name" : "regular" - } - ] } ] }, - "generalizedCost" : 3375, + "generalizedCost" : 4295, "legs" : [ { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 419.62, - "endTime" : "2009-11-17T18:42:54.000+00:00", + "distance" : 920.33, + "endTime" : "2009-11-17T18:27:58.000+00:00", "from" : { - "departure" : "2009-11-17T18:37:30.000+00:00", + "departure" : "2009-11-17T18:16:00.000+00:00", "lat" : 45.51726, "lon" : -122.64847, "name" : "SE Morrison St. & SE 17th Ave. (P1)", "vertexType" : "NORMAL" }, - "generalizedCost" : 636, + "generalizedCost" : 1398, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 14, - "points" : "kaytG~wqkV?T?fCAl@?R?jE?rC?t@?hEAvD?RN?L??O" + "length" : 45, + "points" : "kaytG~wqkV?T?fCAl@?RmC?oCAmCAoC?_CAM?aC??A?A?A?A??AA?AAA??AAA???A?A?A???A@A??@A@?@??A@?@?BcC?mCAmCAmC?QBIYIWOH" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:37:30.000+00:00", + "startTime" : "2009-11-17T18:16:00.000+00:00", "steps" : [ { "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 403.66, + "distance" : 87.68, "elevation" : "", "lat" : 45.517186, "lon" : -122.6484704, @@ -2284,27 +2369,53 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "walkingBike" : false }, { - "absoluteDirection" : "SOUTH", + "absoluteDirection" : "NORTH", "area" : false, "bogusName" : false, - "distance" : 15.96, + "distance" : 641.04, "elevation" : "", - "lat" : 45.5172031, - "lon" : -122.6536511, - "relativeDirection" : "LEFT", + "lat" : 45.5171903, + "lon" : -122.6495956, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast 16th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 168.89, + "elevation" : "", + "lat" : 45.5228912, + "lon" : -122.6495528, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Northeast 16th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTHEAST", + "area" : false, + "bogusName" : false, + "distance" : 22.74, + "elevation" : "", + "lat" : 45.524409, + "lon" : -122.6495675, + "relativeDirection" : "RIGHT", "stayOn" : false, - "streetName" : "Southeast 12th Avenue", + "streetName" : "Northeast Sandy Boulevard", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:42:54.000+00:00", - "departure" : "2009-11-17T18:42:54.000+00:00", - "lat" : 45.517059, - "lon" : -122.65358, - "name" : "SE 12th & Morrison", - "stopCode" : "6588", - "stopId" : "prt:6588", + "arrival" : "2009-11-17T18:27:58.000+00:00", + "departure" : "2009-11-17T18:27:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", "vertexType" : "TRANSIT", "zoneId" : "1" }, @@ -2318,384 +2429,312 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 2035.62, - "endTime" : "2009-11-17T18:51:01.000+00:00", + "distance" : 3602.73, + "endTime" : "2009-11-17T18:41:03.000+00:00", "from" : { - "arrival" : "2009-11-17T18:42:54.000+00:00", - "departure" : "2009-11-17T18:42:54.000+00:00", - "lat" : 45.517059, - "lon" : -122.65358, - "name" : "SE 12th & Morrison", - "stopCode" : "6588", - "stopId" : "prt:6588", - "stopIndex" : 31, - "stopSequence" : 32, + "arrival" : "2009-11-17T18:27:58.000+00:00", + "departure" : "2009-11-17T18:27:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", + "stopIndex" : 92, + "stopSequence" : 93, "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1087, - "headsign" : "Rose Qtr TC", + "generalizedCost" : 1385, + "headsign" : "23rd Ave to Tichner", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T18:44:00.000+00:00", - "departure" : "2009-11-17T18:44:00.000+00:00", - "lat" : 45.519229, - "lon" : -122.653546, - "name" : "SE 12th & Stark", - "stopCode" : "6594", - "stopId" : "prt:6594", - "stopIndex" : 32, - "stopSequence" : 33, + "arrival" : "2009-11-17T18:28:32.000+00:00", + "departure" : "2009-11-17T18:28:32.000+00:00", + "lat" : 45.523767, + "lon" : -122.651428, + "name" : "NE Sandy & 14th", + "stopCode" : "5058", + "stopId" : "prt:5058", + "stopIndex" : 93, + "stopSequence" : 94, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:44:44.000+00:00", - "departure" : "2009-11-17T18:44:44.000+00:00", - "lat" : 45.520674, - "lon" : -122.653544, - "name" : "SE 12th & Pine", - "stopCode" : "6589", - "stopId" : "prt:6589", - "stopIndex" : 33, - "stopSequence" : 34, + "arrival" : "2009-11-17T18:29:00.000+00:00", + "departure" : "2009-11-17T18:29:00.000+00:00", + "lat" : 45.523103, + "lon" : -122.653064, + "name" : "NE Sandy & 12th", + "stopCode" : "5055", + "stopId" : "prt:5055", + "stopIndex" : 94, + "stopSequence" : 95, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:46:00.000+00:00", - "departure" : "2009-11-17T18:46:00.000+00:00", - "lat" : 45.52318, - "lon" : -122.653507, - "name" : "NE 12th & Sandy", - "stopCode" : "6592", - "stopId" : "prt:6592", - "stopIndex" : 34, - "stopSequence" : 35, + "arrival" : "2009-11-17T18:29:47.000+00:00", + "departure" : "2009-11-17T18:29:47.000+00:00", + "lat" : 45.523024, + "lon" : -122.656526, + "name" : "E Burnside & NE 9th", + "stopCode" : "819", + "stopId" : "prt:819", + "stopIndex" : 95, + "stopSequence" : 96, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:47:45.000+00:00", - "departure" : "2009-11-17T18:47:45.000+00:00", - "lat" : 45.527449, - "lon" : -122.653462, - "name" : "NE 12th & Irving", - "stopCode" : "6582", - "stopId" : "prt:6582", - "stopIndex" : 35, - "stopSequence" : 36, + "arrival" : "2009-11-17T18:30:24.000+00:00", + "departure" : "2009-11-17T18:30:24.000+00:00", + "lat" : 45.523012, + "lon" : -122.659365, + "name" : "E Burnside & NE 6th", + "stopCode" : "805", + "stopId" : "prt:805", + "stopIndex" : 96, + "stopSequence" : 97, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:49:00.000+00:00", - "departure" : "2009-11-17T18:49:00.000+00:00", - "lat" : 45.529793, - "lon" : -122.654429, - "name" : "NE 11th & Holladay", - "stopCode" : "8513", - "stopId" : "prt:8513", - "stopIndex" : 36, - "stopSequence" : 37, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:49:39.000+00:00", - "departure" : "2009-11-17T18:49:39.000+00:00", - "lat" : 45.53135, - "lon" : -122.654497, - "name" : "NE 11th & Multnomah", - "stopCode" : "8938", - "stopId" : "prt:8938", - "stopIndex" : 37, - "stopSequence" : 38, + "arrival" : "2009-11-17T18:30:52.000+00:00", + "departure" : "2009-11-17T18:30:52.000+00:00", + "lat" : 45.523015, + "lon" : -122.661534, + "name" : "E Burnside & NE M L King", + "stopCode" : "705", + "stopId" : "prt:705", + "stopIndex" : 97, + "stopSequence" : 98, "vertexType" : "TRANSIT", - "zoneId" : "0" + "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:50:15.000+00:00", - "departure" : "2009-11-17T18:50:15.000+00:00", - "lat" : 45.531573, - "lon" : -122.656408, - "name" : "NE Multnomah & 9th", - "stopCode" : "4056", - "stopId" : "prt:4056", - "stopIndex" : 38, - "stopSequence" : 39, - "vertexType" : "TRANSIT", - "zoneId" : "0" - } - ], - "legGeometry" : { - "length" : 49, - "points" : "s`ytGhxrkV[?mCAmC?wBA??W?mC?{BA??Q?oC?mC?kBAa@?w@???wA?mCAmC?oCA}C?sDC??aBAm@@k@AY?uABU@I@IBQFb@fC}@d@OFO@q@???Q?]?gGA??[??nJ???b@?vK?rA" - }, - "mode" : "BUS", - "pathway" : false, - "realTime" : false, - "route" : "12th Ave", - "routeId" : "prt:70", - "routeLongName" : "12th Ave", - "routeShortName" : "70", - "routeType" : 3, - "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:42:54.000+00:00", - "steps" : [ ], - "to" : { - "arrival" : "2009-11-17T18:51:01.000+00:00", - "departure" : "2009-11-17T18:54:29.000+00:00", - "lat" : 45.531569, - "lon" : -122.659045, - "name" : "NE Multnomah & 7th", - "stopCode" : "4054", - "stopId" : "prt:4054", - "stopIndex" : 39, - "stopSequence" : 40, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - "transitLeg" : true, - "tripBlockId" : "7002", - "tripId" : "prt:700W1170" - }, - { - "agencyId" : "prt:prt", - "agencyName" : "TriMet", - "agencyTimeZoneOffset" : -28800000, - "agencyUrl" : "http://trimet.org", - "arrivalDelay" : 0, - "departureDelay" : 0, - "distance" : 3560.24, - "endTime" : "2009-11-17T19:07:55.000+00:00", - "from" : { - "arrival" : "2009-11-17T18:51:01.000+00:00", - "departure" : "2009-11-17T18:54:29.000+00:00", - "lat" : 45.531569, - "lon" : -122.659045, - "name" : "NE Multnomah & 7th", - "stopCode" : "4054", - "stopId" : "prt:4054", - "stopIndex" : 81, - "stopSequence" : 82, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - "generalizedCost" : 1614, - "headsign" : "Montgomery Park", - "interlineWithPreviousLeg" : false, - "intermediateStops" : [ - { - "arrival" : "2009-11-17T18:55:05.000+00:00", - "departure" : "2009-11-17T18:55:05.000+00:00", - "lat" : 45.531586, - "lon" : -122.660482, - "name" : "NE Multnomah & Grand", - "stopCode" : "4043", - "stopId" : "prt:4043", - "stopIndex" : 82, - "stopSequence" : 83, + "arrival" : "2009-11-17T18:33:00.000+00:00", + "departure" : "2009-11-17T18:33:00.000+00:00", + "lat" : 45.523249, + "lon" : -122.671269, + "name" : "W Burnside & Burnside Bridge", + "stopCode" : "689", + "stopId" : "prt:689", + "stopIndex" : 98, + "stopSequence" : 99, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:56:09.000+00:00", - "departure" : "2009-11-17T18:56:09.000+00:00", - "lat" : 45.531159, - "lon" : -122.66293, - "name" : "NE Multnomah & 3rd", - "stopCode" : "11492", - "stopId" : "prt:11492", - "stopIndex" : 83, - "stopSequence" : 84, + "arrival" : "2009-11-17T18:34:00.000+00:00", + "departure" : "2009-11-17T18:34:00.000+00:00", + "lat" : 45.523169, + "lon" : -122.675893, + "name" : "W Burnside & NW 5th", + "stopCode" : "782", + "stopId" : "prt:782", + "stopIndex" : 99, + "stopSequence" : 100, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:58:00.000+00:00", - "departure" : "2009-11-17T18:58:00.000+00:00", - "lat" : 45.530005, - "lon" : -122.666476, - "name" : "Rose Quarter Transit Center", - "stopCode" : "2592", - "stopId" : "prt:2592", - "stopIndex" : 84, - "stopSequence" : 85, + "arrival" : "2009-11-17T18:35:17.000+00:00", + "departure" : "2009-11-17T18:35:17.000+00:00", + "lat" : 45.523115, + "lon" : -122.678939, + "name" : "W Burnside & NW Park", + "stopCode" : "716", + "stopId" : "prt:716", + "stopIndex" : 100, + "stopSequence" : 101, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T19:01:20.000+00:00", - "departure" : "2009-11-17T19:01:20.000+00:00", - "lat" : 45.526655, - "lon" : -122.676462, - "name" : "NW Glisan & 6th", - "stopCode" : "10803", - "stopId" : "prt:10803", - "stopIndex" : 85, - "stopSequence" : 86, + "arrival" : "2009-11-17T18:36:25.000+00:00", + "departure" : "2009-11-17T18:36:25.000+00:00", + "lat" : 45.523048, + "lon" : -122.681606, + "name" : "W Burnside & NW 10th", + "stopCode" : "10791", + "stopId" : "prt:10791", + "stopIndex" : 101, + "stopSequence" : 102, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T19:02:15.000+00:00", - "departure" : "2009-11-17T19:02:15.000+00:00", - "lat" : 45.528799, - "lon" : -122.677238, - "name" : "NW Station Way & Union Station", - "stopCode" : "12801", - "stopId" : "prt:12801", - "stopIndex" : 86, - "stopSequence" : 87, + "arrival" : "2009-11-17T18:37:14.000+00:00", + "departure" : "2009-11-17T18:37:14.000+00:00", + "lat" : 45.523, + "lon" : -122.683535, + "name" : "W Burnside & NW 12th", + "stopCode" : "11032", + "stopId" : "prt:11032", + "stopIndex" : 102, + "stopSequence" : 103, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T19:04:00.000+00:00", - "departure" : "2009-11-17T19:04:00.000+00:00", - "lat" : 45.531582, - "lon" : -122.681193, - "name" : "NW Northrup & 10th", - "stopCode" : "12802", - "stopId" : "prt:12802", - "stopIndex" : 87, - "stopSequence" : 88, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T19:04:33.000+00:00", - "departure" : "2009-11-17T19:04:33.000+00:00", - "lat" : 45.531534, - "lon" : -122.683319, - "name" : "NW 12th & Northrup", - "stopCode" : "12796", - "stopId" : "prt:12796", - "stopIndex" : 88, - "stopSequence" : 89, + "arrival" : "2009-11-17T18:39:09.000+00:00", + "departure" : "2009-11-17T18:39:09.000+00:00", + "lat" : 45.522985, + "lon" : -122.688091, + "name" : "W Burnside & NW 17th", + "stopCode" : "10809", + "stopId" : "prt:10809", + "stopIndex" : 103, + "stopSequence" : 104, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T19:05:04.000+00:00", - "departure" : "2009-11-17T19:05:04.000+00:00", - "lat" : 45.531503, - "lon" : -122.685357, - "name" : "NW Northrup & 14th", - "stopCode" : "10775", - "stopId" : "prt:10775", - "stopIndex" : 89, - "stopSequence" : 90, + "arrival" : "2009-11-17T18:40:00.000+00:00", + "departure" : "2009-11-17T18:40:00.000+00:00", + "lat" : 45.523097, + "lon" : -122.690083, + "name" : "W Burnside & NW 19th", + "stopCode" : "735", + "stopId" : "prt:735", + "stopIndex" : 104, + "stopSequence" : 105, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T19:06:07.000+00:00", - "departure" : "2009-11-17T19:06:07.000+00:00", - "lat" : 45.531434, - "lon" : -122.689417, - "name" : "NW Northrup & 18th", - "stopCode" : "10776", - "stopId" : "prt:10776", - "stopIndex" : 90, - "stopSequence" : 91, + "arrival" : "2009-11-17T18:40:27.000+00:00", + "departure" : "2009-11-17T18:40:27.000+00:00", + "lat" : 45.523176, + "lon" : -122.692139, + "name" : "W Burnside & NW 20th", + "stopCode" : "741", + "stopId" : "prt:741", + "stopIndex" : 105, + "stopSequence" : 106, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T19:07:24.000+00:00", - "departure" : "2009-11-17T19:07:24.000+00:00", - "lat" : 45.531346, - "lon" : -122.694455, - "name" : "NW Northrup & 21st", - "stopCode" : "10777", - "stopId" : "prt:10777", - "stopIndex" : 91, - "stopSequence" : 92, + "arrival" : "2009-11-17T18:40:40.000+00:00", + "departure" : "2009-11-17T18:40:40.000+00:00", + "lat" : 45.52322, + "lon" : -122.69313, + "name" : "W Burnside & NW 20th Pl", + "stopCode" : "742", + "stopId" : "prt:742", + "stopIndex" : 106, + "stopSequence" : 107, "vertexType" : "TRANSIT", "zoneId" : "1" } ], "legGeometry" : { - "length" : 104, - "points" : "yz{tG`zskV?tBCfD???^?nE?V@Z?PH\\Nb@`@~@Rf@??`@bANb@FV@R?P?pE?jA@h@AnAbBl@LFJN\\f@LT??NXJPPVJFf@Vf@Pp@Nd@NRLB@RNXZR\\vAhC@BhAhD`AhClAbDBrDCnG@n@@^@d@HdAP`CBjEDvD???LqCFmCDYBGDEBGJkAzAQR??KNa@b@MJuBBY?OHW@u@~@aD`EcBhBBrD@xC??@l@BlE@lD???XBjEBpD???VBlE?dA@t@?b@?h@BfEBrD???VBhEFtKDvJ??@\\DnJ" + "length" : 94, + "points" : "coztGd}qkVNl@r@`CZhA`A`D??Ph@l@tBb@rARh@Pd@???BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB" }, "mode" : "BUS", "pathway" : false, "realTime" : false, - "route" : "Broadway/Halsey", - "routeId" : "prt:77", - "routeLongName" : "Broadway/Halsey", - "routeShortName" : "77", + "route" : "Burnside/Stark", + "routeId" : "prt:20", + "routeLongName" : "Burnside/Stark", + "routeShortName" : "20", "routeType" : 3, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:54:29.000+00:00", + "startTime" : "2009-11-17T18:27:58.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T19:07:55.000+00:00", - "departure" : "2009-11-17T19:07:55.000+00:00", - "lat" : 45.531308, - "lon" : -122.696445, - "name" : "NW Northrup & 22nd", - "stopCode" : "10778", - "stopId" : "prt:10778", - "stopIndex" : 92, - "stopSequence" : 93, + "arrival" : "2009-11-17T18:41:03.000+00:00", + "departure" : "2009-11-17T18:41:03.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "stopIndex" : 107, + "stopSequence" : 108, "vertexType" : "TRANSIT", "zoneId" : "1" }, "transitLeg" : true, - "tripBlockId" : "7702", - "tripId" : "prt:771W1180" + "tripBlockId" : "2071", + "tripId" : "prt:200W1210" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 18.81, - "endTime" : "2009-11-17T19:08:19.000+00:00", + "distance" : 999.1, + "endTime" : "2009-11-17T18:53:55.000+00:00", "from" : { - "arrival" : "2009-11-17T19:07:55.000+00:00", - "departure" : "2009-11-17T19:07:55.000+00:00", - "lat" : 45.531308, - "lon" : -122.696445, - "name" : "NW Northrup & 22nd", - "stopCode" : "10778", - "stopId" : "prt:10778", + "arrival" : "2009-11-17T18:41:03.000+00:00", + "departure" : "2009-11-17T18:41:03.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 37, + "generalizedCost" : 1511, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 7, - "points" : "sy{tGxc{kV???LABF?B??J" + "length" : 29, + "points" : "ugztGdzzkVL?ATClAI|DK?G?mCBkCDoCDmCBoCDkCBoCB[?sBD]?Y@eA@K?C?K?W@{A@M@C@I?_CB?G" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T19:07:55.000+00:00", + "startTime" : "2009-11-17T18:41:03.000+00:00", "steps" : [ { "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 18.81, + "distance" : 113.27, "elevation" : "", - "lat" : 45.5313019, - "lon" : -122.6964448, + "lat" : 45.5232491, + "lon" : -122.6949067, "relativeDirection" : "DEPART", "stayOn" : false, + "streetName" : "West Burnside Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 882.16, + "elevation" : "", + "lat" : 45.5233204, + "lon" : -122.696357, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest 22nd Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "EAST", + "area" : false, + "bogusName" : false, + "distance" : 3.68, + "elevation" : "", + "lat" : 45.5312508, + "lon" : -122.6966386, + "relativeDirection" : "RIGHT", + "stayOn" : false, "streetName" : "Northwest Northrup Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T19:08:19.000+00:00", + "arrival" : "2009-11-17T18:53:55.000+00:00", "lat" : 45.53122, "lon" : -122.69659, "name" : "NW Northrup St. & NW 22nd Ave. (P2)", @@ -2705,14 +2744,14 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "walkingBike" : false } ], - "startTime" : "2009-11-17T18:37:30.000+00:00", + "startTime" : "2009-11-17T18:16:00.000+00:00", "tooSloped" : false, - "transfers" : 1, - "transitTime" : 1293, - "waitingTime" : 208, - "walkDistance" : 438.43, + "transfers" : 0, + "transitTime" : 785, + "waitingTime" : 0, + "walkDistance" : 1919.43, "walkLimitExceeded" : false, - "walkTime" : 348 + "walkTime" : 1490 } ] ] @@ -3836,10 +3875,10 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan }, { "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 1553, + "duration" : 2260, "elevationGained" : 0.0, "elevationLost" : 0.0, - "endTime" : "2009-11-17T19:09:40.000+00:00", + "endTime" : "2009-11-17T19:07:27.000+00:00", "fare" : { "details" : { }, "fare" : { }, @@ -3863,19 +3902,39 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "name" : "regular" } ] + }, + { + "legIndices" : [ + 3 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] } ] }, - "generalizedCost" : 2895, + "generalizedCost" : 4058, "legs" : [ { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, "distance" : 87.02, - "endTime" : "2009-11-17T18:45:00.000+00:00", + "endTime" : "2009-11-17T18:31:00.000+00:00", "from" : { - "departure" : "2009-11-17T18:43:47.000+00:00", + "departure" : "2009-11-17T18:29:47.000+00:00", "lat" : 45.52337, "lon" : -122.653725, "name" : "NE 12th & Couch", @@ -3895,7 +3954,7 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:43:47.000+00:00", + "startTime" : "2009-11-17T18:29:47.000+00:00", "steps" : [ { "absoluteDirection" : "SOUTH", @@ -3925,8 +3984,8 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan } ], "to" : { - "arrival" : "2009-11-17T18:45:00.000+00:00", - "departure" : "2009-11-17T18:45:00.000+00:00", + "arrival" : "2009-11-17T18:31:00.000+00:00", + "departure" : "2009-11-17T18:31:00.000+00:00", "lat" : 45.523103, "lon" : -122.653064, "name" : "NE Sandy & 12th", @@ -3945,338 +4004,493 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 3729.97, - "endTime" : "2009-11-17T18:57:49.000+00:00", + "distance" : 1883.59, + "endTime" : "2009-11-17T18:38:19.000+00:00", "from" : { - "arrival" : "2009-11-17T18:45:00.000+00:00", - "departure" : "2009-11-17T18:45:00.000+00:00", + "arrival" : "2009-11-17T18:31:00.000+00:00", + "departure" : "2009-11-17T18:31:00.000+00:00", "lat" : 45.523103, "lon" : -122.653064, "name" : "NE Sandy & 12th", "stopCode" : "5055", "stopId" : "prt:5055", - "stopIndex" : 94, - "stopSequence" : 95, + "stopIndex" : 84, + "stopSequence" : 85, "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1369, - "headsign" : "Beaverton TC", + "generalizedCost" : 1039, + "headsign" : "Sherwood via Portland city center", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T18:45:47.000+00:00", - "departure" : "2009-11-17T18:45:47.000+00:00", + "arrival" : "2009-11-17T18:31:47.000+00:00", + "departure" : "2009-11-17T18:31:47.000+00:00", "lat" : 45.523024, "lon" : -122.656526, "name" : "E Burnside & NE 9th", "stopCode" : "819", "stopId" : "prt:819", - "stopIndex" : 95, - "stopSequence" : 96, + "stopIndex" : 85, + "stopSequence" : 86, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:46:24.000+00:00", - "departure" : "2009-11-17T18:46:24.000+00:00", + "arrival" : "2009-11-17T18:32:24.000+00:00", + "departure" : "2009-11-17T18:32:24.000+00:00", "lat" : 45.523012, "lon" : -122.659365, "name" : "E Burnside & NE 6th", "stopCode" : "805", "stopId" : "prt:805", - "stopIndex" : 96, - "stopSequence" : 97, + "stopIndex" : 86, + "stopSequence" : 87, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:32:52.000+00:00", + "departure" : "2009-11-17T18:32:52.000+00:00", + "lat" : 45.523015, + "lon" : -122.661534, + "name" : "E Burnside & NE M L King", + "stopCode" : "705", + "stopId" : "prt:705", + "stopIndex" : 87, + "stopSequence" : 88, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:46:52.000+00:00", - "departure" : "2009-11-17T18:46:52.000+00:00", - "lat" : 45.523015, - "lon" : -122.661534, - "name" : "E Burnside & NE M L King", - "stopCode" : "705", - "stopId" : "prt:705", - "stopIndex" : 97, - "stopSequence" : 98, - "vertexType" : "TRANSIT", - "zoneId" : "1" + "arrival" : "2009-11-17T18:35:00.000+00:00", + "departure" : "2009-11-17T18:35:00.000+00:00", + "lat" : 45.523249, + "lon" : -122.671269, + "name" : "W Burnside & Burnside Bridge", + "stopCode" : "689", + "stopId" : "prt:689", + "stopIndex" : 88, + "stopSequence" : 89, + "vertexType" : "TRANSIT", + "zoneId" : "0" + } + ], + "legGeometry" : { + "length" : 43, + "points" : "weztGdtrkV?BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE\\CPBt@ZvAl@d@R" + }, + "mode" : "BUS", + "pathway" : false, + "realTime" : false, + "route" : "Barbur/Sandy Blvd", + "routeId" : "prt:12", + "routeLongName" : "Barbur/Sandy Blvd", + "routeShortName" : "12", + "routeType" : 3, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:31:00.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:38:19.000+00:00", + "departure" : "2009-11-17T18:38:19.000+00:00", + "lat" : 45.521958, + "lon" : -122.675956, + "name" : "SW 5th & Pine", + "stopCode" : "7631", + "stopId" : "prt:7631", + "stopIndex" : 89, + "stopSequence" : 90, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "transitLeg" : true, + "tripBlockId" : "1235", + "tripId" : "prt:120W1270" + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 534.33, + "endTime" : "2009-11-17T18:45:25.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:38:19.000+00:00", + "departure" : "2009-11-17T18:38:19.000+00:00", + "lat" : 45.521958, + "lon" : -122.675956, + "name" : "SW 5th & Pine", + "stopCode" : "7631", + "stopId" : "prt:7631", + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "generalizedCost" : 820, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 24, + "points" : "e_ztGvcwkVADlAl@NFi@|CAFCJCJCNi@|CCRGXm@lDdCfA]hBo@rDCPADL@H@F@JB@@@K" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:38:19.000+00:00", + "steps" : [ + { + "absoluteDirection" : "SOUTH", + "area" : false, + "bogusName" : false, + "distance" : 47.2, + "elevation" : "", + "lat" : 45.5219669, + "lon" : -122.6759883, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Southwest 5th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "SOUTH", + "area" : false, + "bogusName" : true, + "distance" : 9.01, + "elevation" : "", + "lat" : 45.5215719, + "lon" : -122.67621, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "path", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 243.52, + "elevation" : "", + "lat" : 45.5214961, + "lon" : -122.676251, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southwest Oak Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "SOUTH", + "area" : false, + "bogusName" : false, + "distance" : 79.59, + "elevation" : "", + "lat" : 45.5222784, + "lon" : -122.6791704, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southwest Park Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 129.53, + "elevation" : "", + "lat" : 45.5216085, + "lon" : -122.6795303, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southwest Stark Street", + "walkingBike" : false }, { - "arrival" : "2009-11-17T18:49:00.000+00:00", - "departure" : "2009-11-17T18:49:00.000+00:00", - "lat" : 45.523249, - "lon" : -122.671269, - "name" : "W Burnside & Burnside Bridge", - "stopCode" : "689", - "stopId" : "prt:689", - "stopIndex" : 98, - "stopSequence" : 99, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, + "absoluteDirection" : "SOUTH", + "area" : false, + "bogusName" : false, + "distance" : 25.48, + "elevation" : "", + "lat" : 45.5220244, + "lon" : -122.6810834, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southwest 10th Avenue", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:45:25.000+00:00", + "departure" : "2009-11-17T18:48:09.000+00:00", + "lat" : 45.521786, + "lon" : -122.68109, + "name" : "SW 10th & Stark", + "stopCode" : "10769", + "stopId" : "prt:10769", + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 2493.24, + "endTime" : "2009-11-17T19:05:00.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:45:25.000+00:00", + "departure" : "2009-11-17T18:48:09.000+00:00", + "lat" : 45.521786, + "lon" : -122.68109, + "name" : "SW 10th & Stark", + "stopCode" : "10769", + "stopId" : "prt:10769", + "stopIndex" : 12, + "stopSequence" : 13, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "generalizedCost" : 1775, + "headsign" : "NW 23rd Ave", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ { - "arrival" : "2009-11-17T18:50:00.000+00:00", - "departure" : "2009-11-17T18:50:00.000+00:00", - "lat" : 45.523169, - "lon" : -122.675893, - "name" : "W Burnside & NW 5th", - "stopCode" : "782", - "stopId" : "prt:782", - "stopIndex" : 99, - "stopSequence" : 100, + "arrival" : "2009-11-17T18:49:35.000+00:00", + "departure" : "2009-11-17T18:49:35.000+00:00", + "lat" : 45.523593, + "lon" : -122.681083, + "name" : "NW 10th & Couch", + "stopCode" : "10770", + "stopId" : "prt:10770", + "stopIndex" : 13, + "stopSequence" : 14, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:51:17.000+00:00", - "departure" : "2009-11-17T18:51:17.000+00:00", - "lat" : 45.523115, - "lon" : -122.678939, - "name" : "W Burnside & NW Park", - "stopCode" : "716", - "stopId" : "prt:716", - "stopIndex" : 100, - "stopSequence" : 101, + "arrival" : "2009-11-17T18:50:41.000+00:00", + "departure" : "2009-11-17T18:50:41.000+00:00", + "lat" : 45.525011, + "lon" : -122.681113, + "name" : "NW 10th & Everett", + "stopCode" : "10771", + "stopId" : "prt:10771", + "stopIndex" : 14, + "stopSequence" : 15, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:52:25.000+00:00", - "departure" : "2009-11-17T18:52:25.000+00:00", - "lat" : 45.523048, - "lon" : -122.681606, - "name" : "W Burnside & NW 10th", - "stopCode" : "10791", - "stopId" : "prt:10791", - "stopIndex" : 101, - "stopSequence" : 102, + "arrival" : "2009-11-17T18:51:49.000+00:00", + "departure" : "2009-11-17T18:51:49.000+00:00", + "lat" : 45.526446, + "lon" : -122.68118, + "name" : "NW 10th & Glisan", + "stopCode" : "10772", + "stopId" : "prt:10772", + "stopIndex" : 15, + "stopSequence" : 16, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:53:14.000+00:00", - "departure" : "2009-11-17T18:53:14.000+00:00", - "lat" : 45.523, - "lon" : -122.683535, - "name" : "W Burnside & NW 12th", - "stopCode" : "11032", - "stopId" : "prt:11032", - "stopIndex" : 102, - "stopSequence" : 103, + "arrival" : "2009-11-17T18:53:30.000+00:00", + "departure" : "2009-11-17T18:53:30.000+00:00", + "lat" : 45.528572, + "lon" : -122.68125, + "name" : "NW 10th & Johnson", + "stopCode" : "10773", + "stopId" : "prt:10773", + "stopIndex" : 16, + "stopSequence" : 17, "vertexType" : "TRANSIT", - "zoneId" : "0" + "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:55:09.000+00:00", - "departure" : "2009-11-17T18:55:09.000+00:00", - "lat" : 45.522985, - "lon" : -122.688091, - "name" : "W Burnside & NW 17th", - "stopCode" : "10809", - "stopId" : "prt:10809", - "stopIndex" : 103, - "stopSequence" : 104, + "arrival" : "2009-11-17T18:55:11.000+00:00", + "departure" : "2009-11-17T18:55:11.000+00:00", + "lat" : 45.530707, + "lon" : -122.68132, + "name" : "NW 10th & Marshall", + "stopCode" : "10774", + "stopId" : "prt:10774", + "stopIndex" : 17, + "stopSequence" : 18, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:56:00.000+00:00", - "departure" : "2009-11-17T18:56:00.000+00:00", - "lat" : 45.523097, - "lon" : -122.690083, - "name" : "W Burnside & NW 19th", - "stopCode" : "735", - "stopId" : "prt:735", - "stopIndex" : 104, - "stopSequence" : 105, + "arrival" : "2009-11-17T18:56:52.000+00:00", + "departure" : "2009-11-17T18:56:52.000+00:00", + "lat" : 45.531534, + "lon" : -122.683319, + "name" : "NW 12th & Northrup", + "stopCode" : "12796", + "stopId" : "prt:12796", + "stopIndex" : 18, + "stopSequence" : 19, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:56:21.000+00:00", - "departure" : "2009-11-17T18:56:21.000+00:00", - "lat" : 45.523176, - "lon" : -122.692139, - "name" : "W Burnside & NW 20th", - "stopCode" : "741", - "stopId" : "prt:741", - "stopIndex" : 105, - "stopSequence" : 106, + "arrival" : "2009-11-17T18:58:00.000+00:00", + "departure" : "2009-11-17T19:00:00.000+00:00", + "lat" : 45.531503, + "lon" : -122.685357, + "name" : "NW Northrup & 14th", + "stopCode" : "10775", + "stopId" : "prt:10775", + "stopIndex" : 19, + "stopSequence" : 20, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:56:31.000+00:00", - "departure" : "2009-11-17T18:56:31.000+00:00", - "lat" : 45.52322, - "lon" : -122.69313, - "name" : "W Burnside & NW 20th Pl", - "stopCode" : "742", - "stopId" : "prt:742", - "stopIndex" : 106, - "stopSequence" : 107, + "arrival" : "2009-11-17T19:01:26.000+00:00", + "departure" : "2009-11-17T19:01:26.000+00:00", + "lat" : 45.531434, + "lon" : -122.689417, + "name" : "NW Northrup & 18th", + "stopCode" : "10776", + "stopId" : "prt:10776", + "stopIndex" : 20, + "stopSequence" : 21, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:56:49.000+00:00", - "departure" : "2009-11-17T18:56:49.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", - "stopIndex" : 107, - "stopSequence" : 108, + "arrival" : "2009-11-17T19:03:13.000+00:00", + "departure" : "2009-11-17T19:03:13.000+00:00", + "lat" : 45.531346, + "lon" : -122.694455, + "name" : "NW Northrup & 21st", + "stopCode" : "10777", + "stopId" : "prt:10777", + "stopIndex" : 21, + "stopSequence" : 22, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:57:22.000+00:00", - "departure" : "2009-11-17T18:57:22.000+00:00", - "lat" : 45.523512, - "lon" : -122.698081, - "name" : "W Burnside & NW 23rd", - "stopCode" : "755", - "stopId" : "prt:755", - "stopIndex" : 108, - "stopSequence" : 109, + "arrival" : "2009-11-17T19:03:55.000+00:00", + "departure" : "2009-11-17T19:03:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", + "stopIndex" : 22, + "stopSequence" : 23, "vertexType" : "TRANSIT", "zoneId" : "1" } ], "legGeometry" : { - "length" : 95, - "points" : "weztGdtrkV?BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB??AXCfAGxDE|AEtBIlC??APu@lJMhBI`@" + "length" : 55, + "points" : "e~ytGbdxkV[OQ@{CFa@B{B@??S@mC@Q@eB@??U@mCB{BD??S?mCBmCFyBB??U?kCBsCDsBD??W?kCBBlE@lD???XBjEBpD???VBlE?dA@t@?b@?h@BfEBrD???VBhEFtKDvJ??@\\DnJ???d@FtKvBE" }, - "mode" : "BUS", + "mode" : "TRAM", "pathway" : false, "realTime" : false, - "route" : "Burnside/Stark", - "routeId" : "prt:20", - "routeLongName" : "Burnside/Stark", - "routeShortName" : "20", - "routeType" : 3, + "route" : "Portland Streetcar", + "routeId" : "prt:193", + "routeLongName" : "Portland Streetcar", + "routeType" : 0, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:45:00.000+00:00", + "startTime" : "2009-11-17T18:48:09.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T18:57:49.000+00:00", - "departure" : "2009-11-17T18:57:49.000+00:00", - "lat" : 45.523897, - "lon" : -122.700681, - "name" : "W Burnside & NW 23rd Pl", - "stopCode" : "9555", - "stopId" : "prt:9555", - "stopIndex" : 109, - "stopSequence" : 110, + "arrival" : "2009-11-17T19:05:00.000+00:00", + "departure" : "2009-11-17T19:05:00.000+00:00", + "lat" : 45.530612, + "lon" : -122.698688, + "name" : "NW 23rd & Marshall", + "stopCode" : "8989", + "stopId" : "prt:8989", + "stopIndex" : 23, + "stopSequence" : 24, "vertexType" : "TRANSIT", "zoneId" : "1" }, "transitLeg" : true, - "tripBlockId" : "2037", - "tripId" : "prt:200W1220" + "tripBlockId" : "9380", + "tripId" : "prt:1930W1240" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 913.81, - "endTime" : "2009-11-17T19:09:40.000+00:00", + "distance" : 187.24, + "endTime" : "2009-11-17T19:07:27.000+00:00", "from" : { - "arrival" : "2009-11-17T18:57:49.000+00:00", - "departure" : "2009-11-17T18:57:49.000+00:00", - "lat" : 45.523897, - "lon" : -122.700681, - "name" : "W Burnside & NW 23rd Pl", - "stopCode" : "9555", - "stopId" : "prt:9555", + "arrival" : "2009-11-17T19:05:00.000+00:00", + "departure" : "2009-11-17T19:05:00.000+00:00", + "lat" : 45.530612, + "lon" : -122.698688, + "name" : "NW 23rd & Marshall", + "stopCode" : "8989", + "stopId" : "prt:8989", "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1388, + "generalizedCost" : 286, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 39, - "points" : "ikztGh~{kVNDEVUzACPOUQO_@Yc@[QMMEOKOIECGCIAMCGCGAECECECOOMOGKIFMLk@BsABGDGBoCBkCDoC@mCBmCDoCDmCD?qA" + "length" : 7, + "points" : "iu{tGxq{kV?DK?GBwADK?DpH" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:57:49.000+00:00", + "startTime" : "2009-11-17T19:05:00.000+00:00", "steps" : [ { - "absoluteDirection" : "WEST", + "absoluteDirection" : "NORTH", "area" : false, "bogusName" : false, - "distance" : 54.63, + "distance" : 60.76, "elevation" : "", - "lat" : 45.5238156, - "lon" : -122.7007199, + "lat" : 45.5306118, + "lon" : -122.6987102, "relativeDirection" : "DEPART", "stayOn" : false, - "streetName" : "West Burnside Street", - "walkingBike" : false - }, - { - "absoluteDirection" : "NORTHEAST", - "area" : false, - "bogusName" : false, - "distance" : 176.41, - "elevation" : "", - "lat" : 45.5239733, - "lon" : -122.701384, - "relativeDirection" : "RIGHT", - "stayOn" : false, - "streetName" : "Northwest 24th Place", - "walkingBike" : false - }, - { - "absoluteDirection" : "NORTHWEST", - "area" : false, - "bogusName" : false, - "distance" : 15.26, - "elevation" : "", - "lat" : 45.5253583, - "lon" : -122.7003357, - "relativeDirection" : "LEFT", - "stayOn" : false, - "streetName" : "Northwest Westover Road", + "streetName" : "Northwest 23rd Avenue", "walkingBike" : false }, { "absoluteDirection" : "NORTH", "area" : false, - "bogusName" : false, - "distance" : 635.66, + "bogusName" : true, + "distance" : 7.29, "elevation" : "", - "lat" : 45.5254724, - "lon" : -122.7004445, - "relativeDirection" : "SLIGHTLY_RIGHT", + "lat" : 45.531153, + "lon" : -122.6987606, + "relativeDirection" : "CONTINUE", "stayOn" : false, - "streetName" : "Northwest 24th Avenue", + "streetName" : "path", "walkingBike" : false }, { - "absoluteDirection" : "EAST", + "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 31.86, + "distance" : 119.18, "elevation" : "", - "lat" : 45.531181, - "lon" : -122.7007063, - "relativeDirection" : "RIGHT", + "lat" : 45.5312184, + "lon" : -122.698768, + "relativeDirection" : "LEFT", "stayOn" : false, "streetName" : "Northwest Northrup Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T19:09:40.000+00:00", + "arrival" : "2009-11-17T19:07:27.000+00:00", "lat" : 45.531, "lon" : -122.70029, "name" : "NW Northrup St. & NW 24th Ave. (P3)", @@ -4286,21 +4500,21 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "walkingBike" : false } ], - "startTime" : "2009-11-17T18:43:47.000+00:00", + "startTime" : "2009-11-17T18:29:47.000+00:00", "tooSloped" : false, - "transfers" : 0, - "transitTime" : 769, - "waitingTime" : 0, - "walkDistance" : 1000.83, + "transfers" : 1, + "transitTime" : 1450, + "waitingTime" : 164, + "walkDistance" : 808.59, "walkLimitExceeded" : false, - "walkTime" : 784 + "walkTime" : 646 }, { "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 1567, + "duration" : 1553, "elevationGained" : 0.0, "elevationLost" : 0.0, - "endTime" : "2009-11-17T19:11:51.000+00:00", + "endTime" : "2009-11-17T19:09:40.000+00:00", "fare" : { "details" : { }, "fare" : { }, @@ -4324,39 +4538,19 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "name" : "regular" } ] - }, - { - "legIndices" : [ - 2 - ], - "products" : [ - { - "amount" : { - "cents" : 200, - "currency" : { - "currency" : "USD", - "currencyCode" : "USD", - "defaultFractionDigits" : 2, - "symbol" : "$" - } - }, - "id" : "prt:8", - "name" : "regular" - } - ] } ] }, - "generalizedCost" : 2957, + "generalizedCost" : 2895, "legs" : [ { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 20.74, - "endTime" : "2009-11-17T18:46:00.000+00:00", + "distance" : 87.02, + "endTime" : "2009-11-17T18:45:00.000+00:00", "from" : { - "departure" : "2009-11-17T18:45:44.000+00:00", + "departure" : "2009-11-17T18:43:47.000+00:00", "lat" : 45.52337, "lon" : -122.653725, "name" : "NE 12th & Couch", @@ -4365,24 +4559,24 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 33, + "generalizedCost" : 137, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 4, - "points" : "ahztGxxrkV@Sb@??W" + "length" : 9, + "points" : "ahztGxxrkV@Sb@?`@@?a@?k@GGKY@A" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:45:44.000+00:00", + "startTime" : "2009-11-17T18:43:47.000+00:00", "steps" : [ { "absoluteDirection" : "SOUTH", "area" : false, "bogusName" : false, - "distance" : 20.74, + "distance" : 39.06, "elevation" : "", "lat" : 45.5233684, "lon" : -122.6536225, @@ -4390,16 +4584,29 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "stayOn" : false, "streetName" : "Northeast 12th Avenue", "walkingBike" : false + }, + { + "absoluteDirection" : "EAST", + "area" : false, + "bogusName" : true, + "distance" : 47.96, + "elevation" : "", + "lat" : 45.5230172, + "lon" : -122.6536338, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "path", + "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:46:00.000+00:00", - "departure" : "2009-11-17T18:46:00.000+00:00", - "lat" : 45.52318, - "lon" : -122.653507, - "name" : "NE 12th & Sandy", - "stopCode" : "6592", - "stopId" : "prt:6592", + "arrival" : "2009-11-17T18:45:00.000+00:00", + "departure" : "2009-11-17T18:45:00.000+00:00", + "lat" : 45.523103, + "lon" : -122.653064, + "name" : "NE Sandy & 12th", + "stopCode" : "5055", + "stopId" : "prt:5055", "vertexType" : "TRANSIT", "zoneId" : "1" }, @@ -4413,363 +4620,330 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 1355.21, - "endTime" : "2009-11-17T18:51:01.000+00:00", + "distance" : 3729.97, + "endTime" : "2009-11-17T18:57:49.000+00:00", "from" : { - "arrival" : "2009-11-17T18:46:00.000+00:00", - "departure" : "2009-11-17T18:46:00.000+00:00", - "lat" : 45.52318, - "lon" : -122.653507, - "name" : "NE 12th & Sandy", - "stopCode" : "6592", - "stopId" : "prt:6592", - "stopIndex" : 34, - "stopSequence" : 35, + "arrival" : "2009-11-17T18:45:00.000+00:00", + "departure" : "2009-11-17T18:45:00.000+00:00", + "lat" : 45.523103, + "lon" : -122.653064, + "name" : "NE Sandy & 12th", + "stopCode" : "5055", + "stopId" : "prt:5055", + "stopIndex" : 94, + "stopSequence" : 95, "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 901, - "headsign" : "Rose Qtr TC", + "generalizedCost" : 1369, + "headsign" : "Beaverton TC", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T18:47:45.000+00:00", - "departure" : "2009-11-17T18:47:45.000+00:00", - "lat" : 45.527449, - "lon" : -122.653462, - "name" : "NE 12th & Irving", - "stopCode" : "6582", - "stopId" : "prt:6582", - "stopIndex" : 35, - "stopSequence" : 36, + "arrival" : "2009-11-17T18:45:47.000+00:00", + "departure" : "2009-11-17T18:45:47.000+00:00", + "lat" : 45.523024, + "lon" : -122.656526, + "name" : "E Burnside & NE 9th", + "stopCode" : "819", + "stopId" : "prt:819", + "stopIndex" : 95, + "stopSequence" : 96, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:49:00.000+00:00", - "departure" : "2009-11-17T18:49:00.000+00:00", - "lat" : 45.529793, - "lon" : -122.654429, - "name" : "NE 11th & Holladay", - "stopCode" : "8513", - "stopId" : "prt:8513", - "stopIndex" : 36, - "stopSequence" : 37, + "arrival" : "2009-11-17T18:46:24.000+00:00", + "departure" : "2009-11-17T18:46:24.000+00:00", + "lat" : 45.523012, + "lon" : -122.659365, + "name" : "E Burnside & NE 6th", + "stopCode" : "805", + "stopId" : "prt:805", + "stopIndex" : 96, + "stopSequence" : 97, "vertexType" : "TRANSIT", - "zoneId" : "0" + "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:49:39.000+00:00", - "departure" : "2009-11-17T18:49:39.000+00:00", - "lat" : 45.53135, - "lon" : -122.654497, - "name" : "NE 11th & Multnomah", - "stopCode" : "8938", - "stopId" : "prt:8938", - "stopIndex" : 37, - "stopSequence" : 38, + "arrival" : "2009-11-17T18:46:52.000+00:00", + "departure" : "2009-11-17T18:46:52.000+00:00", + "lat" : 45.523015, + "lon" : -122.661534, + "name" : "E Burnside & NE M L King", + "stopCode" : "705", + "stopId" : "prt:705", + "stopIndex" : 97, + "stopSequence" : 98, "vertexType" : "TRANSIT", - "zoneId" : "0" + "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:50:15.000+00:00", - "departure" : "2009-11-17T18:50:15.000+00:00", - "lat" : 45.531573, - "lon" : -122.656408, - "name" : "NE Multnomah & 9th", - "stopCode" : "4056", - "stopId" : "prt:4056", - "stopIndex" : 38, - "stopSequence" : 39, - "vertexType" : "TRANSIT", - "zoneId" : "0" - } - ], - "legGeometry" : { - "length" : 33, - "points" : "{fztG`xrkVwA?mCAmC?oCA}C?sDC??aBAm@@k@AY?uABU@I@IBQFb@fC}@d@OFO@q@???Q?]?gGA??[??nJ???b@?vK?rA" - }, - "mode" : "BUS", - "pathway" : false, - "realTime" : false, - "route" : "12th Ave", - "routeId" : "prt:70", - "routeLongName" : "12th Ave", - "routeShortName" : "70", - "routeType" : 3, - "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:46:00.000+00:00", - "steps" : [ ], - "to" : { - "arrival" : "2009-11-17T18:51:01.000+00:00", - "departure" : "2009-11-17T18:54:29.000+00:00", - "lat" : 45.531569, - "lon" : -122.659045, - "name" : "NE Multnomah & 7th", - "stopCode" : "4054", - "stopId" : "prt:4054", - "stopIndex" : 39, - "stopSequence" : 40, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - "transitLeg" : true, - "tripBlockId" : "7002", - "tripId" : "prt:700W1170" - }, - { - "agencyId" : "prt:prt", - "agencyName" : "TriMet", - "agencyTimeZoneOffset" : -28800000, - "agencyUrl" : "http://trimet.org", - "arrivalDelay" : 0, - "departureDelay" : 0, - "distance" : 3838.71, - "endTime" : "2009-11-17T19:08:50.000+00:00", - "from" : { - "arrival" : "2009-11-17T18:51:01.000+00:00", - "departure" : "2009-11-17T18:54:29.000+00:00", - "lat" : 45.531569, - "lon" : -122.659045, - "name" : "NE Multnomah & 7th", - "stopCode" : "4054", - "stopId" : "prt:4054", - "stopIndex" : 81, - "stopSequence" : 82, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - "generalizedCost" : 1669, - "headsign" : "Montgomery Park", - "interlineWithPreviousLeg" : false, - "intermediateStops" : [ - { - "arrival" : "2009-11-17T18:55:05.000+00:00", - "departure" : "2009-11-17T18:55:05.000+00:00", - "lat" : 45.531586, - "lon" : -122.660482, - "name" : "NE Multnomah & Grand", - "stopCode" : "4043", - "stopId" : "prt:4043", - "stopIndex" : 82, - "stopSequence" : 83, + "arrival" : "2009-11-17T18:49:00.000+00:00", + "departure" : "2009-11-17T18:49:00.000+00:00", + "lat" : 45.523249, + "lon" : -122.671269, + "name" : "W Burnside & Burnside Bridge", + "stopCode" : "689", + "stopId" : "prt:689", + "stopIndex" : 98, + "stopSequence" : 99, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:56:09.000+00:00", - "departure" : "2009-11-17T18:56:09.000+00:00", - "lat" : 45.531159, - "lon" : -122.66293, - "name" : "NE Multnomah & 3rd", - "stopCode" : "11492", - "stopId" : "prt:11492", - "stopIndex" : 83, - "stopSequence" : 84, + "arrival" : "2009-11-17T18:50:00.000+00:00", + "departure" : "2009-11-17T18:50:00.000+00:00", + "lat" : 45.523169, + "lon" : -122.675893, + "name" : "W Burnside & NW 5th", + "stopCode" : "782", + "stopId" : "prt:782", + "stopIndex" : 99, + "stopSequence" : 100, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:58:00.000+00:00", - "departure" : "2009-11-17T18:58:00.000+00:00", - "lat" : 45.530005, - "lon" : -122.666476, - "name" : "Rose Quarter Transit Center", - "stopCode" : "2592", - "stopId" : "prt:2592", - "stopIndex" : 84, - "stopSequence" : 85, + "arrival" : "2009-11-17T18:51:17.000+00:00", + "departure" : "2009-11-17T18:51:17.000+00:00", + "lat" : 45.523115, + "lon" : -122.678939, + "name" : "W Burnside & NW Park", + "stopCode" : "716", + "stopId" : "prt:716", + "stopIndex" : 100, + "stopSequence" : 101, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T19:01:20.000+00:00", - "departure" : "2009-11-17T19:01:20.000+00:00", - "lat" : 45.526655, - "lon" : -122.676462, - "name" : "NW Glisan & 6th", - "stopCode" : "10803", - "stopId" : "prt:10803", - "stopIndex" : 85, - "stopSequence" : 86, + "arrival" : "2009-11-17T18:52:25.000+00:00", + "departure" : "2009-11-17T18:52:25.000+00:00", + "lat" : 45.523048, + "lon" : -122.681606, + "name" : "W Burnside & NW 10th", + "stopCode" : "10791", + "stopId" : "prt:10791", + "stopIndex" : 101, + "stopSequence" : 102, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T19:02:15.000+00:00", - "departure" : "2009-11-17T19:02:15.000+00:00", - "lat" : 45.528799, - "lon" : -122.677238, - "name" : "NW Station Way & Union Station", - "stopCode" : "12801", - "stopId" : "prt:12801", - "stopIndex" : 86, - "stopSequence" : 87, + "arrival" : "2009-11-17T18:53:14.000+00:00", + "departure" : "2009-11-17T18:53:14.000+00:00", + "lat" : 45.523, + "lon" : -122.683535, + "name" : "W Burnside & NW 12th", + "stopCode" : "11032", + "stopId" : "prt:11032", + "stopIndex" : 102, + "stopSequence" : 103, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T19:04:00.000+00:00", - "departure" : "2009-11-17T19:04:00.000+00:00", - "lat" : 45.531582, - "lon" : -122.681193, - "name" : "NW Northrup & 10th", - "stopCode" : "12802", - "stopId" : "prt:12802", - "stopIndex" : 87, - "stopSequence" : 88, + "arrival" : "2009-11-17T18:55:09.000+00:00", + "departure" : "2009-11-17T18:55:09.000+00:00", + "lat" : 45.522985, + "lon" : -122.688091, + "name" : "W Burnside & NW 17th", + "stopCode" : "10809", + "stopId" : "prt:10809", + "stopIndex" : 103, + "stopSequence" : 104, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T19:04:33.000+00:00", - "departure" : "2009-11-17T19:04:33.000+00:00", - "lat" : 45.531534, - "lon" : -122.683319, - "name" : "NW 12th & Northrup", - "stopCode" : "12796", - "stopId" : "prt:12796", - "stopIndex" : 88, - "stopSequence" : 89, + "arrival" : "2009-11-17T18:56:00.000+00:00", + "departure" : "2009-11-17T18:56:00.000+00:00", + "lat" : 45.523097, + "lon" : -122.690083, + "name" : "W Burnside & NW 19th", + "stopCode" : "735", + "stopId" : "prt:735", + "stopIndex" : 104, + "stopSequence" : 105, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T19:05:04.000+00:00", - "departure" : "2009-11-17T19:05:04.000+00:00", - "lat" : 45.531503, - "lon" : -122.685357, - "name" : "NW Northrup & 14th", - "stopCode" : "10775", - "stopId" : "prt:10775", - "stopIndex" : 89, - "stopSequence" : 90, + "arrival" : "2009-11-17T18:56:21.000+00:00", + "departure" : "2009-11-17T18:56:21.000+00:00", + "lat" : 45.523176, + "lon" : -122.692139, + "name" : "W Burnside & NW 20th", + "stopCode" : "741", + "stopId" : "prt:741", + "stopIndex" : 105, + "stopSequence" : 106, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T19:06:07.000+00:00", - "departure" : "2009-11-17T19:06:07.000+00:00", - "lat" : 45.531434, - "lon" : -122.689417, - "name" : "NW Northrup & 18th", - "stopCode" : "10776", - "stopId" : "prt:10776", - "stopIndex" : 90, - "stopSequence" : 91, + "arrival" : "2009-11-17T18:56:31.000+00:00", + "departure" : "2009-11-17T18:56:31.000+00:00", + "lat" : 45.52322, + "lon" : -122.69313, + "name" : "W Burnside & NW 20th Pl", + "stopCode" : "742", + "stopId" : "prt:742", + "stopIndex" : 106, + "stopSequence" : 107, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T19:07:24.000+00:00", - "departure" : "2009-11-17T19:07:24.000+00:00", - "lat" : 45.531346, - "lon" : -122.694455, - "name" : "NW Northrup & 21st", - "stopCode" : "10777", - "stopId" : "prt:10777", - "stopIndex" : 91, - "stopSequence" : 92, + "arrival" : "2009-11-17T18:56:49.000+00:00", + "departure" : "2009-11-17T18:56:49.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "stopIndex" : 107, + "stopSequence" : 108, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T19:07:55.000+00:00", - "departure" : "2009-11-17T19:07:55.000+00:00", - "lat" : 45.531308, - "lon" : -122.696445, - "name" : "NW Northrup & 22nd", - "stopCode" : "10778", - "stopId" : "prt:10778", - "stopIndex" : 92, - "stopSequence" : 93, + "arrival" : "2009-11-17T18:57:22.000+00:00", + "departure" : "2009-11-17T18:57:22.000+00:00", + "lat" : 45.523512, + "lon" : -122.698081, + "name" : "W Burnside & NW 23rd", + "stopCode" : "755", + "stopId" : "prt:755", + "stopIndex" : 108, + "stopSequence" : 109, "vertexType" : "TRANSIT", "zoneId" : "1" } ], "legGeometry" : { - "length" : 109, - "points" : "yz{tG`zskV?tBCfD???^?nE?V@Z?PH\\Nb@`@~@Rf@??`@bANb@FV@R?P?pE?jA@h@AnAbBl@LFJN\\f@LT??NXJPPVJFf@Vf@Pp@Nd@NRLB@RNXZR\\vAhC@BhAhD`AhClAbDBrDCnG@n@@^@d@HdAP`CBjEDvD???LqCFmCDYBGDEBGJkAzAQR??KNa@b@MJuBBY?OHW@u@~@aD`EcBhBBrD@xC??@l@BlE@lD???XBjEBpD???VBlE?dA@t@?b@?h@BfEBrD???VBhEFtKDvJ??@\\DnJ???d@FtKmCBo@@" + "length" : 95, + "points" : "weztGdtrkV?BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB??AXCfAGxDE|AEtBIlC??APu@lJMhBI`@" }, "mode" : "BUS", "pathway" : false, "realTime" : false, - "route" : "Broadway/Halsey", - "routeId" : "prt:77", - "routeLongName" : "Broadway/Halsey", - "routeShortName" : "77", + "route" : "Burnside/Stark", + "routeId" : "prt:20", + "routeLongName" : "Burnside/Stark", + "routeShortName" : "20", "routeType" : 3, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:54:29.000+00:00", + "startTime" : "2009-11-17T18:45:00.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T19:08:50.000+00:00", - "departure" : "2009-11-17T19:08:50.000+00:00", - "lat" : 45.532159, - "lon" : -122.698634, - "name" : "NW 23rd & Overton", - "stopCode" : "8981", - "stopId" : "prt:8981", - "stopIndex" : 93, - "stopSequence" : 94, + "arrival" : "2009-11-17T18:57:49.000+00:00", + "departure" : "2009-11-17T18:57:49.000+00:00", + "lat" : 45.523897, + "lon" : -122.700681, + "name" : "W Burnside & NW 23rd Pl", + "stopCode" : "9555", + "stopId" : "prt:9555", + "stopIndex" : 109, + "stopSequence" : 110, "vertexType" : "TRANSIT", "zoneId" : "1" }, "transitLeg" : true, - "tripBlockId" : "7702", - "tripId" : "prt:771W1180" + "tripBlockId" : "2037", + "tripId" : "prt:200W1220" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 231.46, - "endTime" : "2009-11-17T19:11:51.000+00:00", + "distance" : 913.81, + "endTime" : "2009-11-17T19:09:40.000+00:00", "from" : { - "arrival" : "2009-11-17T19:08:50.000+00:00", - "departure" : "2009-11-17T19:08:50.000+00:00", - "lat" : 45.532159, - "lon" : -122.698634, - "name" : "NW 23rd & Overton", - "stopCode" : "8981", - "stopId" : "prt:8981", + "arrival" : "2009-11-17T18:57:49.000+00:00", + "departure" : "2009-11-17T18:57:49.000+00:00", + "lat" : 45.523897, + "lon" : -122.700681, + "name" : "W Burnside & NW 23rd Pl", + "stopCode" : "9555", + "stopId" : "prt:9555", "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 353, + "generalizedCost" : 1388, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 10, - "points" : "}~{tGnq{kV?LVAF?J?L?rBCLA?RDpH" + "length" : 39, + "points" : "ikztGh~{kVNDEVUzACPOUQO_@Yc@[QMMEOKOIECGCIAMCGCGAECECECOOMOGKIFMLk@BsABGDGBoCBkCDoC@mCBmCDoCDmCD?qA" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T19:08:50.000+00:00", + "startTime" : "2009-11-17T18:57:49.000+00:00", "steps" : [ { - "absoluteDirection" : "SOUTH", + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 54.63, + "elevation" : "", + "lat" : 45.5238156, + "lon" : -122.7007199, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "West Burnside Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTHEAST", "area" : false, "bogusName" : false, - "distance" : 104.46, + "distance" : 176.41, "elevation" : "", - "lat" : 45.5321578, - "lon" : -122.6987026, - "relativeDirection" : "DEPART", + "lat" : 45.5239733, + "lon" : -122.701384, + "relativeDirection" : "RIGHT", "stayOn" : false, - "streetName" : "Northwest 23rd Avenue", + "streetName" : "Northwest 24th Place", "walkingBike" : false }, { - "absoluteDirection" : "WEST", + "absoluteDirection" : "NORTHWEST", "area" : false, "bogusName" : false, - "distance" : 127.01, + "distance" : 15.26, "elevation" : "", - "lat" : 45.5312188, - "lon" : -122.6986675, + "lat" : 45.5253583, + "lon" : -122.7003357, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Northwest Westover Road", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 635.66, + "elevation" : "", + "lat" : 45.5254724, + "lon" : -122.7004445, + "relativeDirection" : "SLIGHTLY_RIGHT", + "stayOn" : false, + "streetName" : "Northwest 24th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "EAST", + "area" : false, + "bogusName" : false, + "distance" : 31.86, + "elevation" : "", + "lat" : 45.531181, + "lon" : -122.7007063, "relativeDirection" : "RIGHT", "stayOn" : false, "streetName" : "Northwest Northrup Street", @@ -4777,7 +4951,7 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan } ], "to" : { - "arrival" : "2009-11-17T19:11:51.000+00:00", + "arrival" : "2009-11-17T19:09:40.000+00:00", "lat" : 45.531, "lon" : -122.70029, "name" : "NW Northrup St. & NW 24th Ave. (P3)", @@ -4787,21 +4961,21 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "walkingBike" : false } ], - "startTime" : "2009-11-17T18:45:44.000+00:00", + "startTime" : "2009-11-17T18:43:47.000+00:00", "tooSloped" : false, - "transfers" : 1, - "transitTime" : 1162, - "waitingTime" : 208, - "walkDistance" : 252.2, + "transfers" : 0, + "transitTime" : 769, + "waitingTime" : 0, + "walkDistance" : 1000.83, "walkLimitExceeded" : false, - "walkTime" : 197 + "walkTime" : 784 }, { "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 1578, + "duration" : 1567, "elevationGained" : 0.0, "elevationLost" : 0.0, - "endTime" : "2009-11-17T19:25:05.000+00:00", + "endTime" : "2009-11-17T19:11:51.000+00:00", "fare" : { "details" : { }, "fare" : { }, @@ -4848,16 +5022,16 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan } ] }, - "generalizedCost" : 3015, + "generalizedCost" : 2957, "legs" : [ { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 87.02, - "endTime" : "2009-11-17T19:00:00.000+00:00", + "distance" : 20.74, + "endTime" : "2009-11-17T18:46:00.000+00:00", "from" : { - "departure" : "2009-11-17T18:58:47.000+00:00", + "departure" : "2009-11-17T18:45:44.000+00:00", "lat" : 45.52337, "lon" : -122.653725, "name" : "NE 12th & Couch", @@ -4866,24 +5040,24 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 137, + "generalizedCost" : 33, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 9, - "points" : "ahztGxxrkV@Sb@?`@@?a@?k@GGKY@A" + "length" : 4, + "points" : "ahztGxxrkV@Sb@??W" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:58:47.000+00:00", + "startTime" : "2009-11-17T18:45:44.000+00:00", "steps" : [ { "absoluteDirection" : "SOUTH", "area" : false, "bogusName" : false, - "distance" : 39.06, + "distance" : 20.74, "elevation" : "", "lat" : 45.5233684, "lon" : -122.6536225, @@ -4891,29 +5065,16 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "stayOn" : false, "streetName" : "Northeast 12th Avenue", "walkingBike" : false - }, - { - "absoluteDirection" : "EAST", - "area" : false, - "bogusName" : true, - "distance" : 47.96, - "elevation" : "", - "lat" : 45.5230172, - "lon" : -122.6536338, - "relativeDirection" : "LEFT", - "stayOn" : false, - "streetName" : "path", - "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T19:00:00.000+00:00", - "departure" : "2009-11-17T19:00:00.000+00:00", - "lat" : 45.523103, - "lon" : -122.653064, - "name" : "NE Sandy & 12th", - "stopCode" : "5055", - "stopId" : "prt:5055", + "arrival" : "2009-11-17T18:46:00.000+00:00", + "departure" : "2009-11-17T18:46:00.000+00:00", + "lat" : 45.52318, + "lon" : -122.653507, + "name" : "NE 12th & Sandy", + "stopCode" : "6592", + "stopId" : "prt:6592", "vertexType" : "TRANSIT", "zoneId" : "1" }, @@ -4927,226 +5088,109 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 3520.32, - "endTime" : "2009-11-17T19:12:44.000+00:00", + "distance" : 1355.21, + "endTime" : "2009-11-17T18:51:01.000+00:00", "from" : { - "arrival" : "2009-11-17T19:00:00.000+00:00", - "departure" : "2009-11-17T19:00:00.000+00:00", - "lat" : 45.523103, - "lon" : -122.653064, - "name" : "NE Sandy & 12th", - "stopCode" : "5055", - "stopId" : "prt:5055", - "stopIndex" : 94, - "stopSequence" : 95, + "arrival" : "2009-11-17T18:46:00.000+00:00", + "departure" : "2009-11-17T18:46:00.000+00:00", + "lat" : 45.52318, + "lon" : -122.653507, + "name" : "NE 12th & Sandy", + "stopCode" : "6592", + "stopId" : "prt:6592", + "stopIndex" : 34, + "stopSequence" : 35, "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1364, - "headsign" : "23rd Ave to Tichner", + "generalizedCost" : 901, + "headsign" : "Rose Qtr TC", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T19:00:47.000+00:00", - "departure" : "2009-11-17T19:00:47.000+00:00", - "lat" : 45.523024, - "lon" : -122.656526, - "name" : "E Burnside & NE 9th", - "stopCode" : "819", - "stopId" : "prt:819", - "stopIndex" : 95, - "stopSequence" : 96, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T19:01:24.000+00:00", - "departure" : "2009-11-17T19:01:24.000+00:00", - "lat" : 45.523012, - "lon" : -122.659365, - "name" : "E Burnside & NE 6th", - "stopCode" : "805", - "stopId" : "prt:805", - "stopIndex" : 96, - "stopSequence" : 97, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T19:01:52.000+00:00", - "departure" : "2009-11-17T19:01:52.000+00:00", - "lat" : 45.523015, - "lon" : -122.661534, - "name" : "E Burnside & NE M L King", - "stopCode" : "705", - "stopId" : "prt:705", - "stopIndex" : 97, - "stopSequence" : 98, + "arrival" : "2009-11-17T18:47:45.000+00:00", + "departure" : "2009-11-17T18:47:45.000+00:00", + "lat" : 45.527449, + "lon" : -122.653462, + "name" : "NE 12th & Irving", + "stopCode" : "6582", + "stopId" : "prt:6582", + "stopIndex" : 35, + "stopSequence" : 36, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T19:04:00.000+00:00", - "departure" : "2009-11-17T19:04:00.000+00:00", - "lat" : 45.523249, - "lon" : -122.671269, - "name" : "W Burnside & Burnside Bridge", - "stopCode" : "689", - "stopId" : "prt:689", - "stopIndex" : 98, - "stopSequence" : 99, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T19:05:00.000+00:00", - "departure" : "2009-11-17T19:05:00.000+00:00", - "lat" : 45.523169, - "lon" : -122.675893, - "name" : "W Burnside & NW 5th", - "stopCode" : "782", - "stopId" : "prt:782", - "stopIndex" : 99, - "stopSequence" : 100, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T19:06:17.000+00:00", - "departure" : "2009-11-17T19:06:17.000+00:00", - "lat" : 45.523115, - "lon" : -122.678939, - "name" : "W Burnside & NW Park", - "stopCode" : "716", - "stopId" : "prt:716", - "stopIndex" : 100, - "stopSequence" : 101, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T19:07:25.000+00:00", - "departure" : "2009-11-17T19:07:25.000+00:00", - "lat" : 45.523048, - "lon" : -122.681606, - "name" : "W Burnside & NW 10th", - "stopCode" : "10791", - "stopId" : "prt:10791", - "stopIndex" : 101, - "stopSequence" : 102, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T19:08:14.000+00:00", - "departure" : "2009-11-17T19:08:14.000+00:00", - "lat" : 45.523, - "lon" : -122.683535, - "name" : "W Burnside & NW 12th", - "stopCode" : "11032", - "stopId" : "prt:11032", - "stopIndex" : 102, - "stopSequence" : 103, + "arrival" : "2009-11-17T18:49:00.000+00:00", + "departure" : "2009-11-17T18:49:00.000+00:00", + "lat" : 45.529793, + "lon" : -122.654429, + "name" : "NE 11th & Holladay", + "stopCode" : "8513", + "stopId" : "prt:8513", + "stopIndex" : 36, + "stopSequence" : 37, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T19:10:09.000+00:00", - "departure" : "2009-11-17T19:10:09.000+00:00", - "lat" : 45.522985, - "lon" : -122.688091, - "name" : "W Burnside & NW 17th", - "stopCode" : "10809", - "stopId" : "prt:10809", - "stopIndex" : 103, - "stopSequence" : 104, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T19:11:00.000+00:00", - "departure" : "2009-11-17T19:11:00.000+00:00", - "lat" : 45.523097, - "lon" : -122.690083, - "name" : "W Burnside & NW 19th", - "stopCode" : "735", - "stopId" : "prt:735", - "stopIndex" : 104, - "stopSequence" : 105, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T19:11:27.000+00:00", - "departure" : "2009-11-17T19:11:27.000+00:00", - "lat" : 45.523176, - "lon" : -122.692139, - "name" : "W Burnside & NW 20th", - "stopCode" : "741", - "stopId" : "prt:741", - "stopIndex" : 105, - "stopSequence" : 106, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T19:11:40.000+00:00", - "departure" : "2009-11-17T19:11:40.000+00:00", - "lat" : 45.52322, - "lon" : -122.69313, - "name" : "W Burnside & NW 20th Pl", - "stopCode" : "742", - "stopId" : "prt:742", - "stopIndex" : 106, - "stopSequence" : 107, + "arrival" : "2009-11-17T18:49:39.000+00:00", + "departure" : "2009-11-17T18:49:39.000+00:00", + "lat" : 45.53135, + "lon" : -122.654497, + "name" : "NE 11th & Multnomah", + "stopCode" : "8938", + "stopId" : "prt:8938", + "stopIndex" : 37, + "stopSequence" : 38, "vertexType" : "TRANSIT", - "zoneId" : "1" + "zoneId" : "0" }, { - "arrival" : "2009-11-17T19:12:03.000+00:00", - "departure" : "2009-11-17T19:12:03.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", - "stopIndex" : 107, - "stopSequence" : 108, + "arrival" : "2009-11-17T18:50:15.000+00:00", + "departure" : "2009-11-17T18:50:15.000+00:00", + "lat" : 45.531573, + "lon" : -122.656408, + "name" : "NE Multnomah & 9th", + "stopCode" : "4056", + "stopId" : "prt:4056", + "stopIndex" : 38, + "stopSequence" : 39, "vertexType" : "TRANSIT", - "zoneId" : "1" + "zoneId" : "0" } ], "legGeometry" : { - "length" : 90, - "points" : "weztGdtrkV?BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB??AXCfAGxDE|AEtBIlC" + "length" : 33, + "points" : "{fztG`xrkVwA?mCAmC?oCA}C?sDC??aBAm@@k@AY?uABU@I@IBQFb@fC}@d@OFO@q@???Q?]?gGA??[??nJ???b@?vK?rA" }, "mode" : "BUS", "pathway" : false, "realTime" : false, - "route" : "Burnside/Stark", - "routeId" : "prt:20", - "routeLongName" : "Burnside/Stark", - "routeShortName" : "20", + "route" : "12th Ave", + "routeId" : "prt:70", + "routeLongName" : "12th Ave", + "routeShortName" : "70", "routeType" : 3, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T19:00:00.000+00:00", + "startTime" : "2009-11-17T18:46:00.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T19:12:44.000+00:00", - "departure" : "2009-11-17T19:17:51.000+00:00", - "lat" : 45.523512, - "lon" : -122.698081, - "name" : "W Burnside & NW 23rd", - "stopCode" : "755", - "stopId" : "prt:755", - "stopIndex" : 108, - "stopSequence" : 109, + "arrival" : "2009-11-17T18:51:01.000+00:00", + "departure" : "2009-11-17T18:54:29.000+00:00", + "lat" : 45.531569, + "lon" : -122.659045, + "name" : "NE Multnomah & 7th", + "stopCode" : "4054", + "stopId" : "prt:4054", + "stopIndex" : 39, + "stopSequence" : 40, "vertexType" : "TRANSIT", - "zoneId" : "1" + "zoneId" : "0" }, "transitLeg" : true, - "tripBlockId" : "2038", - "tripId" : "prt:200W1230" + "tripBlockId" : "7002", + "tripId" : "prt:700W1170" }, { "agencyId" : "prt:prt", @@ -5155,106 +5199,210 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 981.85, - "endTime" : "2009-11-17T19:22:04.000+00:00", + "distance" : 3838.71, + "endTime" : "2009-11-17T19:08:50.000+00:00", "from" : { - "arrival" : "2009-11-17T19:12:44.000+00:00", - "departure" : "2009-11-17T19:17:51.000+00:00", - "lat" : 45.523512, - "lon" : -122.698081, - "name" : "W Burnside & NW 23rd", - "stopCode" : "755", - "stopId" : "prt:755", - "stopIndex" : 70, - "stopSequence" : 71, + "arrival" : "2009-11-17T18:51:01.000+00:00", + "departure" : "2009-11-17T18:54:29.000+00:00", + "lat" : 45.531569, + "lon" : -122.659045, + "name" : "NE Multnomah & 7th", + "stopCode" : "4054", + "stopId" : "prt:4054", + "stopIndex" : 81, + "stopSequence" : 82, "vertexType" : "TRANSIT", - "zoneId" : "1" + "zoneId" : "0" }, - "generalizedCost" : 1160, - "headsign" : "27th & Thurman", + "generalizedCost" : 1669, + "headsign" : "Montgomery Park", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T19:18:53.000+00:00", - "departure" : "2009-11-17T19:18:53.000+00:00", - "lat" : 45.525416, - "lon" : -122.698381, - "name" : "NW 23rd & Flanders", - "stopCode" : "7157", - "stopId" : "prt:7157", - "stopIndex" : 71, - "stopSequence" : 72, + "arrival" : "2009-11-17T18:55:05.000+00:00", + "departure" : "2009-11-17T18:55:05.000+00:00", + "lat" : 45.531586, + "lon" : -122.660482, + "name" : "NE Multnomah & Grand", + "stopCode" : "4043", + "stopId" : "prt:4043", + "stopIndex" : 82, + "stopSequence" : 83, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:56:09.000+00:00", + "departure" : "2009-11-17T18:56:09.000+00:00", + "lat" : 45.531159, + "lon" : -122.66293, + "name" : "NE Multnomah & 3rd", + "stopCode" : "11492", + "stopId" : "prt:11492", + "stopIndex" : 83, + "stopSequence" : 84, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:58:00.000+00:00", + "departure" : "2009-11-17T18:58:00.000+00:00", + "lat" : 45.530005, + "lon" : -122.666476, + "name" : "Rose Quarter Transit Center", + "stopCode" : "2592", + "stopId" : "prt:2592", + "stopIndex" : 84, + "stopSequence" : 85, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T19:01:20.000+00:00", + "departure" : "2009-11-17T19:01:20.000+00:00", + "lat" : 45.526655, + "lon" : -122.676462, + "name" : "NW Glisan & 6th", + "stopCode" : "10803", + "stopId" : "prt:10803", + "stopIndex" : 85, + "stopSequence" : 86, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T19:02:15.000+00:00", + "departure" : "2009-11-17T19:02:15.000+00:00", + "lat" : 45.528799, + "lon" : -122.677238, + "name" : "NW Station Way & Union Station", + "stopCode" : "12801", + "stopId" : "prt:12801", + "stopIndex" : 86, + "stopSequence" : 87, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T19:04:00.000+00:00", + "departure" : "2009-11-17T19:04:00.000+00:00", + "lat" : 45.531582, + "lon" : -122.681193, + "name" : "NW Northrup & 10th", + "stopCode" : "12802", + "stopId" : "prt:12802", + "stopIndex" : 87, + "stopSequence" : 88, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T19:19:56.000+00:00", - "departure" : "2009-11-17T19:19:56.000+00:00", - "lat" : 45.527543, - "lon" : -122.698473, - "name" : "NW 23rd & Irving", - "stopCode" : "7161", - "stopId" : "prt:7161", - "stopIndex" : 72, - "stopSequence" : 73, + "arrival" : "2009-11-17T19:04:33.000+00:00", + "departure" : "2009-11-17T19:04:33.000+00:00", + "lat" : 45.531534, + "lon" : -122.683319, + "name" : "NW 12th & Northrup", + "stopCode" : "12796", + "stopId" : "prt:12796", + "stopIndex" : 88, + "stopSequence" : 89, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T19:21:00.000+00:00", - "departure" : "2009-11-17T19:21:00.000+00:00", - "lat" : 45.529681, - "lon" : -122.698529, - "name" : "NW 23rd & Lovejoy", - "stopCode" : "7163", - "stopId" : "prt:7163", - "stopIndex" : 73, - "stopSequence" : 74, + "arrival" : "2009-11-17T19:05:04.000+00:00", + "departure" : "2009-11-17T19:05:04.000+00:00", + "lat" : 45.531503, + "lon" : -122.685357, + "name" : "NW Northrup & 14th", + "stopCode" : "10775", + "stopId" : "prt:10775", + "stopIndex" : 89, + "stopSequence" : 90, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T19:06:07.000+00:00", + "departure" : "2009-11-17T19:06:07.000+00:00", + "lat" : 45.531434, + "lon" : -122.689417, + "name" : "NW Northrup & 18th", + "stopCode" : "10776", + "stopId" : "prt:10776", + "stopIndex" : 90, + "stopSequence" : 91, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T19:07:24.000+00:00", + "departure" : "2009-11-17T19:07:24.000+00:00", + "lat" : 45.531346, + "lon" : -122.694455, + "name" : "NW Northrup & 21st", + "stopCode" : "10777", + "stopId" : "prt:10777", + "stopIndex" : 91, + "stopSequence" : 92, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T19:07:55.000+00:00", + "departure" : "2009-11-17T19:07:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", + "stopIndex" : 92, + "stopSequence" : 93, "vertexType" : "TRANSIT", "zoneId" : "1" } ], "legGeometry" : { - "length" : 22, - "points" : "khztGbn{kVAPkAh@o@?sCB{BD??S?mCDmCDyBB??U?mCDmCDyBB??S?oCDmCDmCBo@@" + "length" : 109, + "points" : "yz{tG`zskV?tBCfD???^?nE?V@Z?PH\\Nb@`@~@Rf@??`@bANb@FV@R?P?pE?jA@h@AnAbBl@LFJN\\f@LT??NXJPPVJFf@Vf@Pp@Nd@NRLB@RNXZR\\vAhC@BhAhD`AhClAbDBrDCnG@n@@^@d@HdAP`CBjEDvD???LqCFmCDYBGDEBGJkAzAQR??KNa@b@MJuBBY?OHW@u@~@aD`EcBhBBrD@xC??@l@BlE@lD???XBjEBpD???VBlE?dA@t@?b@?h@BfEBrD???VBhEFtKDvJ??@\\DnJ???d@FtKmCBo@@" }, "mode" : "BUS", "pathway" : false, "realTime" : false, - "route" : "Belmont/NW 23rd", - "routeId" : "prt:15", - "routeLongName" : "Belmont/NW 23rd", - "routeShortName" : "15", + "route" : "Broadway/Halsey", + "routeId" : "prt:77", + "routeLongName" : "Broadway/Halsey", + "routeShortName" : "77", "routeType" : 3, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T19:17:51.000+00:00", + "startTime" : "2009-11-17T18:54:29.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T19:22:04.000+00:00", - "departure" : "2009-11-17T19:22:04.000+00:00", + "arrival" : "2009-11-17T19:08:50.000+00:00", + "departure" : "2009-11-17T19:08:50.000+00:00", "lat" : 45.532159, "lon" : -122.698634, "name" : "NW 23rd & Overton", "stopCode" : "8981", "stopId" : "prt:8981", - "stopIndex" : 74, - "stopSequence" : 75, + "stopIndex" : 93, + "stopSequence" : 94, "vertexType" : "TRANSIT", "zoneId" : "1" }, "transitLeg" : true, - "tripBlockId" : "1550", - "tripId" : "prt:150W1430" + "tripBlockId" : "7702", + "tripId" : "prt:771W1180" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, "distance" : 231.46, - "endTime" : "2009-11-17T19:25:05.000+00:00", + "endTime" : "2009-11-17T19:11:51.000+00:00", "from" : { - "arrival" : "2009-11-17T19:22:04.000+00:00", - "departure" : "2009-11-17T19:22:04.000+00:00", + "arrival" : "2009-11-17T19:08:50.000+00:00", + "departure" : "2009-11-17T19:08:50.000+00:00", "lat" : 45.532159, "lon" : -122.698634, "name" : "NW 23rd & Overton", @@ -5274,7 +5422,7 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T19:22:04.000+00:00", + "startTime" : "2009-11-17T19:08:50.000+00:00", "steps" : [ { "absoluteDirection" : "SOUTH", @@ -5304,7 +5452,7 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan } ], "to" : { - "arrival" : "2009-11-17T19:25:05.000+00:00", + "arrival" : "2009-11-17T19:11:51.000+00:00", "lat" : 45.531, "lon" : -122.70029, "name" : "NW Northrup St. & NW 24th Ave. (P3)", @@ -5314,14 +5462,14 @@ org.opentripplanner.routing.algorithm.mapping.TransitSnapshotTest.test_trip_plan "walkingBike" : false } ], - "startTime" : "2009-11-17T18:58:47.000+00:00", + "startTime" : "2009-11-17T18:45:44.000+00:00", "tooSloped" : false, "transfers" : 1, - "transitTime" : 1017, - "waitingTime" : 307, - "walkDistance" : 318.48, + "transitTime" : 1162, + "waitingTime" : 208, + "walkDistance" : 252.2, "walkLimitExceeded" : false, - "walkTime" : 254 + "walkTime" : 197 } ] ] diff --git a/application/src/test/resources/speedtest/travelSearch-expected-results-bd.csv b/application/src/test/resources/speedtest/travelSearch-expected-results-bd.csv index 117eecc4a12..b38e60d5edb 100644 --- a/application/src/test/resources/speedtest/travelSearch-expected-results-bd.csv +++ b/application/src/test/resources/speedtest/travelSearch-expected-results-bd.csv @@ -1,3 +1,3 @@ tcId,nTransfers,duration,cost,walkDistance,startTime,endTime,agencies,modes,routes,stops,details -1,0,43m25s,-1,0,12:00:00,12:43:25,,,,,Unknown transit 0tx 43m25s -2,0,43m25s,-1,0,12:00:00,12:43:25,,,,,Unknown transit 0tx 43m25s +1,0,42m16s,-1,0,12:00:00,12:42:16,,,,,Unknown transit 0tx 42m16s +2,0,42m16s,-1,0,12:00:00,12:42:16,,,,,Unknown transit 0tx 42m16s diff --git a/application/src/test/resources/speedtest/travelSearch-expected-results-btr.csv b/application/src/test/resources/speedtest/travelSearch-expected-results-btr.csv index 634b7b15b1e..db49235d649 100644 --- a/application/src/test/resources/speedtest/travelSearch-expected-results-btr.csv +++ b/application/src/test/resources/speedtest/travelSearch-expected-results-btr.csv @@ -1,5 +1,3 @@ tcId,nTransfers,duration,cost,walkDistance,startTime,endTime,agencies,modes,routes,stops,details -1,0,1h11m14s,-1,0,12:48:46,14:00:00,,,,,Unknown transit 0tx 1h11m14s -1,1,1h9m14s,-1,0,12:50:46,14:00:00,,,,,Unknown transit 1tx 1h9m14s -2,0,1h11m14s,-1,0,12:48:46,14:00:00,,,,,Unknown transit 0tx 1h11m14s -2,1,1h9m14s,-1,0,12:50:46,14:00:00,,,,,Unknown transit 1tx 1h9m14s +1,0,1h9m14s,-1,0,12:50:46,14:00:00,,,,,Unknown transit 0tx 1h9m14s +2,0,1h9m14s,-1,0,12:50:46,14:00:00,,,,,Unknown transit 0tx 1h9m14s From 3a1f3deb111b44c5320a0dc44cf61d9521453e5f Mon Sep 17 00:00:00 2001 From: sharhio Date: Thu, 7 Nov 2024 11:59:50 +0200 Subject: [PATCH 030/169] filter data from an updater --- .../SmooveBikeRentalDataSourceTest.java | 7 +- .../SmooveBikeRentalDataSourceParameters.java | 9 +- .../VehicleRentalServiceDirectoryFetcher.java | 4 +- .../sources/VehicleRentalSourceFactory.java | 25 ++++- .../updater/AllowedRentalType.java | 7 ++ .../GbfsVehicleRentalDataSource.java | 93 +++++++++++-------- ...GbfsVehicleRentalDataSourceParameters.java | 9 +- .../VehicleRentalDataSourceParameters.java | 3 + .../VehicleRentalUpdaterTest.java | 6 ++ .../GbfsVehicleRentalDataSourceTest.java | 10 +- 10 files changed, 123 insertions(+), 50 deletions(-) create mode 100644 application/src/main/java/org/opentripplanner/updater/AllowedRentalType.java diff --git a/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java b/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java index 761971bc56f..c9a327bea13 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java @@ -7,6 +7,7 @@ import java.util.List; import org.junit.jupiter.api.Test; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; +import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; class SmooveBikeRentalDataSourceTest { @@ -18,7 +19,8 @@ void makeStation() { "file:src/ext-test/resources/smoovebikerental/smoove.json", null, true, - HttpHeaders.empty() + HttpHeaders.empty(), + AllowedRentalType.ALL ) ); assertTrue(source.update()); @@ -84,7 +86,8 @@ void makeStationWithoutOverloading() { "file:src/ext-test/resources/smoovebikerental/smoove.json", null, false, - HttpHeaders.empty() + HttpHeaders.empty(), + AllowedRentalType.ALL ) ); assertTrue(source.update()); diff --git a/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java b/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java index 5aa834554c7..d509fa97b75 100644 --- a/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java +++ b/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java @@ -1,6 +1,7 @@ package org.opentripplanner.ext.smoovebikerental; import javax.annotation.Nullable; +import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; import org.opentripplanner.updater.vehicle_rental.datasources.params.VehicleRentalDataSourceParameters; @@ -12,7 +13,8 @@ public record SmooveBikeRentalDataSourceParameters( String url, String network, boolean overloadingAllowed, - HttpHeaders httpHeaders + HttpHeaders httpHeaders, + AllowedRentalType allowedRentalType ) implements VehicleRentalDataSourceParameters { /** @@ -29,4 +31,9 @@ public String getNetwork(String defaultValue) { public VehicleRentalSourceType sourceType() { return VehicleRentalSourceType.SMOOVE; } + + @Override + public AllowedRentalType allowedRentalType() { + return allowedRentalType; + } } diff --git a/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java b/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java index 03b0acd59cd..8cd0ac0ebc5 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java @@ -110,7 +110,9 @@ private static List buildListOfNetworksFr networkName, networkParams.geofencingZones(), // overloadingAllowed - not part of GBFS, not supported here - false + false, + // allowedRentalType not supported + null ) ); } else { diff --git a/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java b/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java index aa548977c7e..5906b7ffc33 100644 --- a/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java @@ -4,10 +4,12 @@ import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V2_1; import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V2_2; import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V2_3; +import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V2_7; import org.opentripplanner.ext.smoovebikerental.SmooveBikeRentalDataSourceParameters; import org.opentripplanner.standalone.config.framework.json.NodeAdapter; import org.opentripplanner.standalone.config.routerconfig.updaters.HttpHeadersConfig; +import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters; @@ -43,13 +45,15 @@ public VehicleRentalDataSourceParameters create() { headers(), network(), geofencingZones(), - overloadingAllowed() + overloadingAllowed(), + allowedRentalType() ); case SMOOVE -> new SmooveBikeRentalDataSourceParameters( url(), network(), overloadingAllowed(), - headers() + headers(), + allowedRentalType() ); }; } @@ -121,4 +125,21 @@ private boolean geofencingZones() { ) .asBoolean(false); } + + private AllowedRentalType allowedRentalType() { + return c + .of("allowedRentalType") + .since(V2_7) + .summary("The type of rental data to include.") + .description( + """ + The type of rental data to include. This can be one of the following: + + - `ALL`: Include all data types. + - `STATIONS`: Include station data only. + - `VEHICLES`: Include floating vehicle data only. + """ + ) + .asEnum(AllowedRentalType.ALL); + } } diff --git a/application/src/main/java/org/opentripplanner/updater/AllowedRentalType.java b/application/src/main/java/org/opentripplanner/updater/AllowedRentalType.java new file mode 100644 index 00000000000..dff4cdcedae --- /dev/null +++ b/application/src/main/java/org/opentripplanner/updater/AllowedRentalType.java @@ -0,0 +1,7 @@ +package org.opentripplanner.updater; + +public enum AllowedRentalType { + STATIONS, + VEHICLES, + ALL, +} diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java index c441efb974a..aa766b5eb48 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java @@ -22,6 +22,7 @@ import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalSystem; +import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -76,60 +77,72 @@ public List getUpdates() { List stations = new LinkedList<>(); - // Both station information and status are required for all systems using stations - GBFSStationInformation stationInformation = loader.getFeed(GBFSStationInformation.class); - GBFSStationStatus stationStatus = loader.getFeed(GBFSStationStatus.class); - if (stationInformation != null && stationStatus != null) { - // Index all the station status entries on their station ID. - Map statusLookup = stationStatus - .getData() - .getStations() - .stream() - .collect(Collectors.toMap(GBFSStation::getStationId, Function.identity())); - GbfsStationStatusMapper stationStatusMapper = new GbfsStationStatusMapper( - statusLookup, - vehicleTypes - ); - GbfsStationInformationMapper stationInformationMapper = new GbfsStationInformationMapper( - system, - vehicleTypes, - params.allowKeepingRentedVehicleAtDestination(), - params.overloadingAllowed() - ); - - // Iterate over all known stations, and if we have any status information add it to those station objects. - stations.addAll( - stationInformation + if ( + params.allowedRentalType() == null || + params.allowedRentalType() == AllowedRentalType.ALL || + params.allowedRentalType() == AllowedRentalType.STATIONS + ) { + // Both station information and status are required for all systems using stations + GBFSStationInformation stationInformation = loader.getFeed(GBFSStationInformation.class); + GBFSStationStatus stationStatus = loader.getFeed(GBFSStationStatus.class); + if (stationInformation != null && stationStatus != null) { + // Index all the station status entries on their station ID. + Map statusLookup = stationStatus .getData() .getStations() .stream() - .map(stationInformationMapper::mapStationInformation) - .filter(Objects::nonNull) - .peek(stationStatusMapper::fillStationStatus) - .toList() - ); - } - - // Append the floating bike stations. - if (OTPFeature.FloatingBike.isOn()) { - GBFSFreeBikeStatus freeBikeStatus = loader.getFeed(GBFSFreeBikeStatus.class); - if (freeBikeStatus != null) { - GbfsFreeVehicleStatusMapper freeVehicleStatusMapper = new GbfsFreeVehicleStatusMapper( - system, + .collect(Collectors.toMap(GBFSStation::getStationId, Function.identity())); + GbfsStationStatusMapper stationStatusMapper = new GbfsStationStatusMapper( + statusLookup, vehicleTypes ); + GbfsStationInformationMapper stationInformationMapper = new GbfsStationInformationMapper( + system, + vehicleTypes, + params.allowKeepingRentedVehicleAtDestination(), + params.overloadingAllowed() + ); + + // Iterate over all known stations, and if we have any status information add it to those station objects. stations.addAll( - freeBikeStatus + stationInformation .getData() - .getBikes() + .getStations() .stream() - .map(freeVehicleStatusMapper::mapFreeVehicleStatus) + .map(stationInformationMapper::mapStationInformation) .filter(Objects::nonNull) + .peek(stationStatusMapper::fillStationStatus) .toList() ); } } + if ( + params.allowedRentalType() == null || + params.allowedRentalType() == AllowedRentalType.ALL || + params.allowedRentalType() == AllowedRentalType.VEHICLES + ) { + // Append the floating bike stations. + if (OTPFeature.FloatingBike.isOn()) { + GBFSFreeBikeStatus freeBikeStatus = loader.getFeed(GBFSFreeBikeStatus.class); + if (freeBikeStatus != null) { + GbfsFreeVehicleStatusMapper freeVehicleStatusMapper = new GbfsFreeVehicleStatusMapper( + system, + vehicleTypes + ); + stations.addAll( + freeBikeStatus + .getData() + .getBikes() + .stream() + .map(freeVehicleStatusMapper::mapFreeVehicleStatus) + .filter(Objects::nonNull) + .toList() + ); + } + } + } + if (params.geofencingZones()) { var zones = loader.getFeed(GBFSGeofencingZones.class); if (zones != null) { diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java index 7d7a6c75a5d..473da63da7f 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java @@ -1,5 +1,6 @@ package org.opentripplanner.updater.vehicle_rental.datasources.params; +import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; @@ -10,11 +11,17 @@ public record GbfsVehicleRentalDataSourceParameters( HttpHeaders httpHeaders, String network, boolean geofencingZones, - boolean overloadingAllowed + boolean overloadingAllowed, + AllowedRentalType allowedRentalType ) implements VehicleRentalDataSourceParameters { @Override public VehicleRentalSourceType sourceType() { return VehicleRentalSourceType.GBFS; } + + @Override + public AllowedRentalType allowedRentalType() { + return allowedRentalType; + } } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java index cdff994ab18..b035ca71fbd 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java @@ -1,6 +1,7 @@ package org.opentripplanner.updater.vehicle_rental.datasources.params; import javax.annotation.Nullable; +import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; @@ -13,4 +14,6 @@ public interface VehicleRentalDataSourceParameters { VehicleRentalSourceType sourceType(); HttpHeaders httpHeaders(); + + AllowedRentalType allowedRentalType(); } diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java index 2ca93a10f28..b1ca4173dac 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java @@ -15,6 +15,7 @@ import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.transit.service.TimetableRepository; +import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.DefaultRealTimeUpdateContext; import org.opentripplanner.updater.GraphUpdaterManager; import org.opentripplanner.updater.GraphWriterRunnable; @@ -103,5 +104,10 @@ public VehicleRentalSourceType sourceType() { public HttpHeaders httpHeaders() { return HttpHeaders.empty(); } + + @Override + public AllowedRentalType allowedRentalType() { + return AllowedRentalType.ALL; + } } } diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java index 7b062bcc17c..bf557282b7d 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java @@ -14,6 +14,7 @@ import org.opentripplanner.service.vehiclerental.model.GeofencingZone; import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; +import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters; @@ -32,7 +33,8 @@ void makeStationFromV22() { HttpHeaders.empty(), null, false, - false + false, + AllowedRentalType.ALL ), new OtpHttpClientFactory() ); @@ -123,7 +125,8 @@ void geofencing() { HttpHeaders.empty(), null, true, - false + false, + AllowedRentalType.ALL ), new OtpHttpClientFactory() ); @@ -165,7 +168,8 @@ void makeStationFromV10() { HttpHeaders.empty(), network, false, - true + true, + AllowedRentalType.ALL ), new OtpHttpClientFactory() ); From 0dced7ef4ce1c558fa3c9fee6aee95dc2babd00b Mon Sep 17 00:00:00 2001 From: Zsombor Welker Date: Thu, 7 Nov 2024 11:26:59 +0100 Subject: [PATCH 031/169] Generalize detailed trip update logging All logging in TimetableSnapshotSource follows the same structure to simplify searching in the logs. --- .../debug/logging/DebugLoggers.java | 3 +- .../updater/trip/TimetableSnapshotSource.java | 92 +++++++++++++------ 2 files changed, 67 insertions(+), 28 deletions(-) diff --git a/application/src/ext/java/org/opentripplanner/ext/interactivelauncher/debug/logging/DebugLoggers.java b/application/src/ext/java/org/opentripplanner/ext/interactivelauncher/debug/logging/DebugLoggers.java index 48f87abf2ab..5880a6969fe 100644 --- a/application/src/ext/java/org/opentripplanner/ext/interactivelauncher/debug/logging/DebugLoggers.java +++ b/application/src/ext/java/org/opentripplanner/ext/interactivelauncher/debug/logging/DebugLoggers.java @@ -10,7 +10,8 @@ static List list() { of("All OTP debuggers", "org.opentripplanner"), of("OTP request/response", "org.opentripplanner.routing.service.DefaultRoutingService"), of("Raptor request/response", "org.opentripplanner.raptor.RaptorService"), - of("Transfer Optimization", "org.opentripplanner.routing.algorithm.transferoptimization") + of("Transfer Optimization", "org.opentripplanner.routing.algorithm.transferoptimization"), + of("Trip Updates", "org.opentripplanner.updater.trip") ); } diff --git a/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java b/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java index 6c80e5282c2..4bc911e114c 100644 --- a/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java +++ b/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java @@ -35,6 +35,7 @@ import java.util.Objects; import java.util.Set; import java.util.function.Supplier; +import javax.annotation.Nullable; import org.opentripplanner.framework.i18n.I18NString; import org.opentripplanner.framework.i18n.NonLocalizedString; import org.opentripplanner.gtfs.mapping.TransitModeMapper; @@ -72,6 +73,7 @@ import org.opentripplanner.utils.time.ServiceDateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.event.Level; /** * This class should be used to create snapshots of lookup tables of realtime data. This is @@ -153,17 +155,12 @@ public TimetableSnapshotSource( * @param updates GTFS-RT TripUpdate's that should be applied atomically */ public UpdateResult applyTripUpdates( - GtfsRealtimeFuzzyTripMatcher fuzzyTripMatcher, + @Nullable GtfsRealtimeFuzzyTripMatcher fuzzyTripMatcher, BackwardsDelayPropagationType backwardsDelayPropagationType, UpdateIncrementality updateIncrementality, List updates, String feedId ) { - if (updates == null) { - LOG.warn("updates is null"); - return UpdateResult.empty(); - } - Map failuresByRelationship = new HashMap<>(); List> results = new ArrayList<>(); @@ -172,7 +169,7 @@ public UpdateResult applyTripUpdates( snapshotManager.clearBuffer(feedId); } - LOG.debug("message contains {} trip updates", updates.size()); + debug(feedId, "message contains {} trip updates", updates.size()); int uIndex = 0; for (TripUpdate tripUpdate : updates) { if (!tripUpdate.hasTrip()) { @@ -223,8 +220,24 @@ public UpdateResult applyTripUpdates( } uIndex += 1; - LOG.debug("trip update #{} ({} updates) :", uIndex, tripUpdate.getStopTimeUpdateCount()); - LOG.trace("{}", tripUpdate); + if (LOG.isTraceEnabled()) { + trace( + tripId, + serviceDate, + "trip update #{} ({} updates): {}", + uIndex, + tripUpdate.getStopTimeUpdateCount(), + tripUpdate + ); + } else { + debug( + tripId, + serviceDate, + "trip update #{} ({} updates)", + uIndex, + tripUpdate.getStopTimeUpdateCount() + ); + } Result result; try { @@ -270,7 +283,6 @@ public UpdateResult applyTripUpdates( results.add(result); if (result.isFailure()) { debug(tripId, serviceDate, "Failed to apply TripUpdate."); - LOG.trace(" Contents: {}", tripUpdate); if (failuresByRelationship.containsKey(scheduleRelationship)) { var c = failuresByRelationship.get(scheduleRelationship); failuresByRelationship.put(scheduleRelationship, ++c); @@ -358,7 +370,7 @@ private static void logUpdateResult( ResultLogger.logUpdateResult(feedId, "gtfs-rt-trip-updates", updateResult); if (!failuresByRelationship.isEmpty()) { - LOG.info("[feedId: {}] Failures by scheduleRelationship {}", feedId, failuresByRelationship); + info(feedId, "Failures by scheduleRelationship {}", failuresByRelationship); } var warnings = Multimaps.index(updateResult.warnings(), w -> w); @@ -366,7 +378,7 @@ private static void logUpdateResult( .keySet() .forEach(key -> { var count = warnings.get(key).size(); - LOG.info("[feedId: {}] {} warnings of type {}", feedId, count, key); + info(feedId, "{} warnings of type {}", count, key); }); } @@ -909,7 +921,9 @@ private Result addTripToGraphAndBuffer( .ifPresent(newTripTimes::updateWheelchairAccessibility); } } - LOG.trace( + trace( + trip.getId(), + serviceDate, "Trip pattern added with mode {} on {} from {} to {}", trip.getRoute().getMode(), serviceDate, @@ -1171,32 +1185,56 @@ private TripPattern getPatternForTripId(FeedScopedId tripId) { private static void debug( FeedScopedId id, - LocalDate serviceDate, + @Nullable LocalDate serviceDate, String message, Object... params ) { - debug(id.getFeedId(), id.getId(), serviceDate, message, params); + log(Level.DEBUG, id.getFeedId(), id.getId(), serviceDate, message, params); } private static void debug(String feedId, String message, Object... params) { - debug(feedId, null, null, message, params); + log(Level.DEBUG, feedId, null, null, message, params); } - private static void debug( + private static void trace( + FeedScopedId id, + @Nullable LocalDate serviceDate, + String message, + Object... params + ) { + log(Level.TRACE, id.getFeedId(), id.getId(), serviceDate, message, params); + } + + private static void info(String feedId, String message, Object... params) { + log(Level.INFO, feedId, null, null, message, params); + } + + /** + * This adds detailed per-update logging to allow tracking what feeds and updates were applied to + * a given trip. + *

+ * The INFO level is used for aggregated statistics, while DEBUG/TRACE is used to link specific + * messages to a trip. + */ + private static void log( + Level logLevel, String feedId, - String tripId, - LocalDate serviceDate, + @Nullable String tripId, + @Nullable LocalDate serviceDate, String message, Object... params ) { - String m = - "[feedId: %s, tripId: %s, serviceDate: %s] %s".formatted( - feedId, - tripId, - serviceDate, - message - ); - LOG.debug(m, params); + if (LOG.isEnabledForLevel(logLevel)) { + String m = tripId != null || serviceDate != null + ? "[feedId: %s, tripId: %s, serviceDate: %s] %s".formatted( + feedId, + tripId, + serviceDate, + message + ) + : "[feedId: %s] %s".formatted(feedId, message); + LOG.makeLoggingEventBuilder(logLevel).log(m, params); + } } private enum CancelationType { From 55e7913f5e8e9340ea56237ace241c64cc0681d3 Mon Sep 17 00:00:00 2001 From: sharhio Date: Thu, 7 Nov 2024 13:58:46 +0200 Subject: [PATCH 032/169] Updater config documentation --- doc/user/UpdaterConfig.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/user/UpdaterConfig.md b/doc/user/UpdaterConfig.md index cc5e1d75901..6638c1e95b4 100644 --- a/doc/user/UpdaterConfig.md +++ b/doc/user/UpdaterConfig.md @@ -317,6 +317,7 @@ GBFS form factors: |---------------------------------------------------------------------------------------|:---------------:|---------------------------------------------------------------------------------|:----------:|---------------|:-----:| | type = "vehicle-rental" | `enum` | The type of the updater. | *Required* | | 1.5 | | [allowKeepingRentedVehicleAtDestination](#u_1_allowKeepingRentedVehicleAtDestination) | `boolean` | If a vehicle should be allowed to be kept at the end of a station-based rental. | *Optional* | `false` | 2.1 | +| [allowedRentalType](#u_1_allowedRentalType) | `enum` | The type of rental data to include. | *Optional* | `"all"` | 2.7 | | frequency | `duration` | How often the data should be updated. | *Optional* | `"PT1M"` | 1.5 | | [geofencingZones](#u_1_geofencingZones) | `boolean` | Compute rental restrictions based on GBFS 2.2 geofencing zones. | *Optional* | `false` | 2.3 | | language | `string` | TODO | *Optional* | | 2.1 | @@ -346,6 +347,21 @@ For this to be possible three things need to be configured: - If keeping the vehicle at the destination should be discouraged, then `keepingRentedVehicleAtDestinationCost` (default: 0) may also be set in the routing defaults. +

allowedRentalType

+ +**Since version:** `2.7` ∙ **Type:** `enum` ∙ **Cardinality:** `Optional` ∙ **Default value:** `"all"` +**Path:** /updaters/[1] +**Enum values:** `stations` | `vehicles` | `all` + +The type of rental data to include. + +The type of rental data to include. This can be one of the following: + +- `ALL`: Include all data types. +- `STATIONS`: Include station data only. +- `VEHICLES`: Include floating vehicle data only. + +

geofencingZones

**Since version:** `2.3` ∙ **Type:** `boolean` ∙ **Cardinality:** `Optional` ∙ **Default value:** `false` From 023875bb585d23452d8cd655111c6da55d22dd79 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Sat, 2 Nov 2024 16:16:55 +0100 Subject: [PATCH 033/169] Allow combination of flex and continuous stopping under certain conditions --- .../ext/flex/FlexStopTimesForTest.java | 36 ++- .../ScheduledFlexPathCalculatorTest.java | 6 +- .../ScheduledDeviatedTripIntegrationTest.java | 251 ++++++++++++++++ .../flex/trip/ScheduledDeviatedTripTest.java | 277 +++--------------- .../ext/flex/trip/UnscheduledTripTest.java | 41 ++- .../ext/flex/FlexTripsMapper.java | 8 +- .../ext/flex/trip/ScheduledDeviatedTrip.java | 7 +- .../ext/flex/trip/UnscheduledTrip.java | 6 +- .../org/opentripplanner/model/StopTime.java | 14 + 9 files changed, 375 insertions(+), 271 deletions(-) create mode 100644 application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripIntegrationTest.java diff --git a/application/src/ext-test/java/org/opentripplanner/ext/flex/FlexStopTimesForTest.java b/application/src/ext-test/java/org/opentripplanner/ext/flex/FlexStopTimesForTest.java index 50c2dd45340..f65450f1191 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/flex/FlexStopTimesForTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/flex/FlexStopTimesForTest.java @@ -1,12 +1,12 @@ package org.opentripplanner.ext.flex; -import static org.opentripplanner.model.StopTime.MISSING_VALUE; - import org.opentripplanner._support.geometry.Polygons; +import org.opentripplanner.model.PickDrop; import org.opentripplanner.model.StopTime; import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; import org.opentripplanner.transit.model.site.RegularStop; import org.opentripplanner.transit.model.site.StopLocation; +import org.opentripplanner.transit.model.timetable.Trip; import org.opentripplanner.utils.time.TimeUtils; public class FlexStopTimesForTest { @@ -18,6 +18,8 @@ public class FlexStopTimesForTest { .build(); private static final RegularStop REGULAR_STOP = TEST_MODEL.stop("stop").build(); + private static final Trip TRIP = TimetableRepositoryForTest.trip("flex").build(); + public static StopTime area(String startTime, String endTime) { return area(AREA_STOP, endTime, startTime); } @@ -27,26 +29,42 @@ public static StopTime area(StopLocation areaStop, String endTime, String startT stopTime.setStop(areaStop); stopTime.setFlexWindowStart(TimeUtils.time(startTime)); stopTime.setFlexWindowEnd(TimeUtils.time(endTime)); + stopTime.setTrip(TRIP); return stopTime; } - public static StopTime regularArrival(String arrivalTime) { - return regularStopTime(TimeUtils.time(arrivalTime), MISSING_VALUE); + public static StopTime regularStop(String arrivalTime, String departureTime) { + return regularStop(TimeUtils.time(arrivalTime), TimeUtils.time(departureTime)); } - public static StopTime regularStopTime(String arrivalTime, String departureTime) { - return regularStopTime(TimeUtils.time(arrivalTime), TimeUtils.time(departureTime)); + public static StopTime regularStop(String time) { + return regularStop(TimeUtils.time(time), TimeUtils.time(time)); } - public static StopTime regularStopTime(int arrivalTime, int departureTime) { + public static StopTime regularStopWithContinuousStopping(String time) { + var st = regularStop(TimeUtils.time(time), TimeUtils.time(time)); + st.setFlexContinuousPickup(PickDrop.COORDINATE_WITH_DRIVER); + st.setFlexContinuousDropOff(PickDrop.COORDINATE_WITH_DRIVER); + return st; + } + + public static StopTime regularStop(int arrivalTime, int departureTime) { var stopTime = new StopTime(); stopTime.setStop(REGULAR_STOP); stopTime.setArrivalTime(arrivalTime); stopTime.setDepartureTime(departureTime); + stopTime.setTrip(TRIP); return stopTime; } - public static StopTime regularDeparture(String departureTime) { - return regularStopTime(MISSING_VALUE, TimeUtils.time(departureTime)); + /** + * Returns an invalid combination of a flex area and continuous stopping. + */ + public static StopTime areaWithContinuousStopping(String time) { + var st = area(time, time); + st.setFlexContinuousPickup(PickDrop.COORDINATE_WITH_DRIVER); + st.setFlexContinuousDropOff(PickDrop.COORDINATE_WITH_DRIVER); + return st; } + } diff --git a/application/src/ext-test/java/org/opentripplanner/ext/flex/flexpathcalculator/ScheduledFlexPathCalculatorTest.java b/application/src/ext-test/java/org/opentripplanner/ext/flex/flexpathcalculator/ScheduledFlexPathCalculatorTest.java index e6fddb07cf8..e2bda60bc17 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/flex/flexpathcalculator/ScheduledFlexPathCalculatorTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/flex/flexpathcalculator/ScheduledFlexPathCalculatorTest.java @@ -2,7 +2,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.opentripplanner.ext.flex.FlexStopTimesForTest.area; -import static org.opentripplanner.ext.flex.FlexStopTimesForTest.regularStopTime; import static org.opentripplanner.street.model._data.StreetModelForTest.V1; import static org.opentripplanner.street.model._data.StreetModelForTest.V2; import static org.opentripplanner.transit.model._data.TimetableRepositoryForTest.id; @@ -11,6 +10,7 @@ import java.util.List; import org.junit.jupiter.api.Test; import org.opentripplanner._support.geometry.LineStrings; +import org.opentripplanner.ext.flex.FlexStopTimesForTest; import org.opentripplanner.ext.flex.trip.ScheduledDeviatedTrip; class ScheduledFlexPathCalculatorTest { @@ -19,9 +19,9 @@ class ScheduledFlexPathCalculatorTest { .of(id("123")) .withStopTimes( List.of( - regularStopTime("10:00", "10:01"), + FlexStopTimesForTest.regularStop("10:00", "10:01"), area("10:10", "10:20"), - regularStopTime("10:25", "10:26"), + FlexStopTimesForTest.regularStop("10:25", "10:26"), area("10:40", "10:50") ) ) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripIntegrationTest.java b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripIntegrationTest.java new file mode 100644 index 00000000000..9145ff91659 --- /dev/null +++ b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripIntegrationTest.java @@ -0,0 +1,251 @@ +package org.opentripplanner.ext.flex.trip; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.opentripplanner.test.support.PolylineAssert.assertThatPolylinesAreEqual; + +import java.time.LocalDateTime; +import java.time.Month; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.locationtech.jts.geom.Coordinate; +import org.opentripplanner.TestOtpModel; +import org.opentripplanner.TestServerContext; +import org.opentripplanner._support.time.ZoneIds; +import org.opentripplanner.ext.fares.DecorateWithFare; +import org.opentripplanner.ext.flex.FlexIntegrationTestData; +import org.opentripplanner.ext.flex.FlexParameters; +import org.opentripplanner.ext.flex.FlexRouter; +import org.opentripplanner.framework.application.OTPFeature; +import org.opentripplanner.framework.geometry.EncodedPolyline; +import org.opentripplanner.framework.i18n.I18NString; +import org.opentripplanner.graph_builder.module.ValidateAndInterpolateStopTimesForEachTrip; +import org.opentripplanner.model.GenericLocation; +import org.opentripplanner.model.StopTime; +import org.opentripplanner.model.plan.Itinerary; +import org.opentripplanner.routing.algorithm.raptoradapter.router.AdditionalSearchDays; +import org.opentripplanner.routing.algorithm.raptoradapter.router.TransitRouter; +import org.opentripplanner.routing.api.request.RouteRequest; +import org.opentripplanner.routing.api.request.request.filter.AllowAllTransitFilter; +import org.opentripplanner.routing.framework.DebugTimingAggregator; +import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.graphfinder.NearbyStop; +import org.opentripplanner.standalone.api.OtpServerRequestContext; +import org.opentripplanner.street.model.vertex.StreetLocation; +import org.opentripplanner.street.search.request.StreetSearchRequest; +import org.opentripplanner.street.search.state.State; +import org.opentripplanner.transit.model.framework.FeedScopedId; +import org.opentripplanner.transit.model.network.grouppriority.TransitGroupPriorityService; +import org.opentripplanner.transit.model.site.AreaStop; +import org.opentripplanner.transit.service.DefaultTransitService; +import org.opentripplanner.transit.service.TimetableRepository; +import org.opentripplanner.utils.time.ServiceDateUtils; + +/** + * This tests that the feed for the Cobb County Flex service is processed correctly. This service + * contains both flex zones but also scheduled stops. Inside the zone, passengers can get on or off + * anywhere, so there it works more like a taxi. + *

+ * Read about the details at: https://www.cobbcounty.org/transportation/cobblinc/routes-and-schedules/flex + */ +class ScheduledDeviatedTripIntegrationTest { + + static Graph graph; + static TimetableRepository timetableRepository; + + float delta = 0.01f; + + @Test + void parseCobbCountyAsScheduledDeviatedTrip() { + var flexTrips = timetableRepository.getAllFlexTrips(); + assertFalse(flexTrips.isEmpty()); + assertEquals(72, flexTrips.size()); + + assertEquals( + Set.of(ScheduledDeviatedTrip.class), + flexTrips.stream().map(FlexTrip::getClass).collect(Collectors.toSet()) + ); + + var trip = getFlexTrip(); + var stop = trip + .getStops() + .stream() + .filter(s -> s.getId().getId().equals("cujv")) + .findFirst() + .orElseThrow(); + assertEquals(33.85465, stop.getLat(), delta); + assertEquals(-84.60039, stop.getLon(), delta); + + var flexZone = trip + .getStops() + .stream() + .filter(s -> s.getId().getId().equals("zone_3")) + .findFirst() + .orElseThrow(); + assertEquals(33.825846635310214, flexZone.getLat(), delta); + assertEquals(-84.63430143459385, flexZone.getLon(), delta); + } + + @Test + void calculateDirectFare() { + OTPFeature.enableFeatures(Map.of(OTPFeature.FlexRouting, true)); + var trip = getFlexTrip(); + + var from = getNearbyStop(trip, "from-stop"); + var to = getNearbyStop(trip, "to-stop"); + + var router = new FlexRouter( + graph, + new DefaultTransitService(timetableRepository), + FlexParameters.defaultValues(), + OffsetDateTime.parse("2021-11-12T10:15:24-05:00").toInstant(), + null, + 1, + 1, + List.of(from), + List.of(to) + ); + + var filter = new DecorateWithFare(graph.getFareService()); + + var itineraries = router + .createFlexOnlyItineraries(false) + .stream() + .peek(filter::decorate) + .toList(); + + var itinerary = itineraries.getFirst(); + + assertFalse(itinerary.getFares().getLegProducts().isEmpty()); + + OTPFeature.enableFeatures(Map.of(OTPFeature.FlexRouting, false)); + } + + /** + * Trips which consist of flex and fixed-schedule stops should work in transit mode. + *

+ * The flex stops will show up as intermediate stops (without a departure/arrival time) but you + * cannot board or alight. + */ + @Test + void flexTripInTransitMode() { + var feedId = timetableRepository.getFeedIds().iterator().next(); + + var serverContext = TestServerContext.createServerContext(graph, timetableRepository); + + // from zone 3 to zone 2 + var from = GenericLocation.fromStopId("Transfer Point for Route 30", feedId, "cujv"); + var to = GenericLocation.fromStopId( + "Zone 1 - PUBLIX Super Market,Zone 1 Collection Point", + feedId, + "yz85" + ); + + var itineraries = getItineraries(from, to, serverContext); + + assertEquals(2, itineraries.size()); + + var itin = itineraries.get(0); + var leg = itin.getLegs().get(0); + + assertEquals("cujv", leg.getFrom().stop.getId().getId()); + assertEquals("yz85", leg.getTo().stop.getId().getId()); + + var intermediateStops = leg.getIntermediateStops(); + assertEquals(1, intermediateStops.size()); + assertEquals("zone_1", intermediateStops.get(0).place.stop.getId().getId()); + + EncodedPolyline legGeometry = EncodedPolyline.encode(leg.getLegGeometry()); + assertThatPolylinesAreEqual( + legGeometry.points(), + "kfsmEjojcOa@eBRKfBfHR|ALjBBhVArMG|OCrEGx@OhAKj@a@tAe@hA]l@MPgAnAgw@nr@cDxCm@t@c@t@c@x@_@~@]pAyAdIoAhG}@lE{AzHWhAtt@t~Aj@tAb@~AXdBHn@FlBC`CKnA_@nC{CjOa@dCOlAEz@E|BRtUCbCQ~CWjD??qBvXBl@kBvWOzAc@dDOx@sHv]aIG?q@@c@ZaB\\mA" + ); + } + + /** + * We add flex trips, that can potentially not have a departure and arrival time, to the trip. + *

+ * Normally these trip times are interpolated/repaired during the graph build but for flex this is + * exactly what we don't want. Here we check that the interpolation process is skipped. + * + * @see ValidateAndInterpolateStopTimesForEachTrip#interpolateStopTimes(List) + */ + @Test + void shouldNotInterpolateFlexTimes() { + var feedId = timetableRepository.getFeedIds().iterator().next(); + var pattern = timetableRepository.getTripPatternForId(new FeedScopedId(feedId, "090z:0:01")); + + assertEquals(3, pattern.numberOfStops()); + + var tripTimes = pattern.getScheduledTimetable().getTripTimes(0); + var arrivalTime = tripTimes.getArrivalTime(1); + + assertEquals(StopTime.MISSING_VALUE, arrivalTime); + } + + @BeforeAll + static void setup() { + TestOtpModel model = FlexIntegrationTestData.cobbFlexGtfs(); + graph = model.graph(); + timetableRepository = model.timetableRepository(); + } + + private static List getItineraries( + GenericLocation from, + GenericLocation to, + OtpServerRequestContext serverContext + ) { + var zoneId = ZoneIds.NEW_YORK; + RouteRequest request = new RouteRequest(); + request.journey().transit().setFilters(List.of(AllowAllTransitFilter.of())); + var dateTime = LocalDateTime.of(2021, Month.DECEMBER, 16, 12, 0).atZone(zoneId); + request.setDateTime(dateTime.toInstant()); + request.setFrom(from); + request.setTo(to); + + var transitStartOfTime = ServiceDateUtils.asStartOfService(request.dateTime(), zoneId); + var additionalSearchDays = AdditionalSearchDays.defaults(dateTime); + var result = TransitRouter.route( + request, + serverContext, + TransitGroupPriorityService.empty(), + transitStartOfTime, + additionalSearchDays, + new DebugTimingAggregator() + ); + + return result.getItineraries(); + } + + private static NearbyStop getNearbyStop(FlexTrip trip, String id) { + // getStops() returns a set of stops and the order doesn't correspond to the stop times + // of the trip + var stopLocation = trip + .getStops() + .stream() + .filter(s -> s instanceof AreaStop) + .findFirst() + .orElseThrow(); + + return new NearbyStop( + stopLocation, + 0, + List.of(), + new State( + new StreetLocation(id, new Coordinate(0, 0), I18NString.of(id)), + StreetSearchRequest.of().build() + ) + ); + } + + private static FlexTrip getFlexTrip() { + var feedId = timetableRepository.getFeedIds().iterator().next(); + var tripId = new FeedScopedId(feedId, "a326c618-d42c-4bd1-9624-c314fbf8ecd8"); + return timetableRepository.getFlexTrip(tripId); + } +} diff --git a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripTest.java b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripTest.java index 38f3a1fc2a8..e5362e1e5fd 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripTest.java @@ -1,255 +1,62 @@ package org.opentripplanner.ext.flex.trip; -import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.opentripplanner.test.support.PolylineAssert.assertThatPolylinesAreEqual; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opentripplanner.ext.flex.FlexStopTimesForTest.area; +import static org.opentripplanner.ext.flex.FlexStopTimesForTest.areaWithContinuousStopping; +import static org.opentripplanner.ext.flex.FlexStopTimesForTest.regularStop; +import static org.opentripplanner.ext.flex.FlexStopTimesForTest.regularStopWithContinuousStopping; -import java.time.LocalDateTime; -import java.time.Month; -import java.time.OffsetDateTime; import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.locationtech.jts.geom.Coordinate; -import org.opentripplanner.TestOtpModel; -import org.opentripplanner.TestServerContext; -import org.opentripplanner._support.time.ZoneIds; -import org.opentripplanner.ext.fares.DecorateWithFare; -import org.opentripplanner.ext.flex.FlexIntegrationTestData; -import org.opentripplanner.ext.flex.FlexParameters; -import org.opentripplanner.ext.flex.FlexRouter; -import org.opentripplanner.framework.application.OTPFeature; -import org.opentripplanner.framework.geometry.EncodedPolyline; -import org.opentripplanner.framework.i18n.I18NString; -import org.opentripplanner.graph_builder.module.ValidateAndInterpolateStopTimesForEachTrip; -import org.opentripplanner.model.GenericLocation; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import org.opentripplanner.model.StopTime; -import org.opentripplanner.model.plan.Itinerary; -import org.opentripplanner.routing.algorithm.raptoradapter.router.AdditionalSearchDays; -import org.opentripplanner.routing.algorithm.raptoradapter.router.TransitRouter; -import org.opentripplanner.routing.api.request.RouteRequest; -import org.opentripplanner.routing.api.request.request.filter.AllowAllTransitFilter; -import org.opentripplanner.routing.framework.DebugTimingAggregator; -import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.graphfinder.NearbyStop; -import org.opentripplanner.standalone.api.OtpServerRequestContext; -import org.opentripplanner.street.model.vertex.StreetLocation; -import org.opentripplanner.street.search.request.StreetSearchRequest; -import org.opentripplanner.street.search.state.State; -import org.opentripplanner.transit.model.framework.FeedScopedId; -import org.opentripplanner.transit.model.network.grouppriority.TransitGroupPriorityService; -import org.opentripplanner.transit.model.site.AreaStop; -import org.opentripplanner.transit.service.DefaultTransitService; -import org.opentripplanner.transit.service.TimetableRepository; -import org.opentripplanner.utils.time.ServiceDateUtils; -/** - * This tests that the feed for the Cobb County Flex service is processed correctly. This service - * contains both flex zones but also scheduled stops. Inside the zone, passengers can get on or off - * anywhere, so there it works more like a taxi. - *

- * Read about the details at: https://www.cobbcounty.org/transportation/cobblinc/routes-and-schedules/flex - */ class ScheduledDeviatedTripTest { - static Graph graph; - static TimetableRepository timetableRepository; - - float delta = 0.01f; - - @Test - void parseCobbCountyAsScheduledDeviatedTrip() { - var flexTrips = timetableRepository.getAllFlexTrips(); - assertFalse(flexTrips.isEmpty()); - assertEquals(72, flexTrips.size()); - - assertEquals( - Set.of(ScheduledDeviatedTrip.class), - flexTrips.stream().map(FlexTrip::getClass).collect(Collectors.toSet()) - ); - - var trip = getFlexTrip(); - var stop = trip - .getStops() - .stream() - .filter(s -> s.getId().getId().equals("cujv")) - .findFirst() - .orElseThrow(); - assertEquals(33.85465, stop.getLat(), delta); - assertEquals(-84.60039, stop.getLon(), delta); - - var flexZone = trip - .getStops() - .stream() - .filter(s -> s.getId().getId().equals("zone_3")) - .findFirst() - .orElseThrow(); - assertEquals(33.825846635310214, flexZone.getLat(), delta); - assertEquals(-84.63430143459385, flexZone.getLon(), delta); - } - - @Test - void calculateDirectFare() { - OTPFeature.enableFeatures(Map.of(OTPFeature.FlexRouting, true)); - var trip = getFlexTrip(); - - var from = getNearbyStop(trip, "from-stop"); - var to = getNearbyStop(trip, "to-stop"); - - var router = new FlexRouter( - graph, - new DefaultTransitService(timetableRepository), - FlexParameters.defaultValues(), - OffsetDateTime.parse("2021-11-12T10:15:24-05:00").toInstant(), - null, - 1, - 1, - List.of(from), - List.of(to) - ); - - var filter = new DecorateWithFare(graph.getFareService()); - - var itineraries = router - .createFlexOnlyItineraries(false) - .stream() - .peek(filter::decorate) - .toList(); - - var itinerary = itineraries.getFirst(); - - assertFalse(itinerary.getFares().getLegProducts().isEmpty()); - - OTPFeature.enableFeatures(Map.of(OTPFeature.FlexRouting, false)); - } - - /** - * Trips which consist of flex and fixed-schedule stops should work in transit mode. - *

- * The flex stops will show up as intermediate stops (without a departure/arrival time) but you - * cannot board or alight. - */ - @Test - void flexTripInTransitMode() { - var feedId = timetableRepository.getFeedIds().iterator().next(); - - var serverContext = TestServerContext.createServerContext(graph, timetableRepository); - - // from zone 3 to zone 2 - var from = GenericLocation.fromStopId("Transfer Point for Route 30", feedId, "cujv"); - var to = GenericLocation.fromStopId( - "Zone 1 - PUBLIX Super Market,Zone 1 Collection Point", - feedId, - "yz85" - ); - - var itineraries = getItineraries(from, to, serverContext); - - assertEquals(2, itineraries.size()); - - var itin = itineraries.get(0); - var leg = itin.getLegs().get(0); - - assertEquals("cujv", leg.getFrom().stop.getId().getId()); - assertEquals("yz85", leg.getTo().stop.getId().getId()); - - var intermediateStops = leg.getIntermediateStops(); - assertEquals(1, intermediateStops.size()); - assertEquals("zone_1", intermediateStops.get(0).place.stop.getId().getId()); - - EncodedPolyline legGeometry = EncodedPolyline.encode(leg.getLegGeometry()); - assertThatPolylinesAreEqual( - legGeometry.points(), - "kfsmEjojcOa@eBRKfBfHR|ALjBBhVArMG|OCrEGx@OhAKj@a@tAe@hA]l@MPgAnAgw@nr@cDxCm@t@c@t@c@x@_@~@]pAyAdIoAhG}@lE{AzHWhAtt@t~Aj@tAb@~AXdBHn@FlBC`CKnA_@nC{CjOa@dCOlAEz@E|BRtUCbCQ~CWjD??qBvXBl@kBvWOzAc@dDOx@sHv]aIG?q@@c@ZaB\\mA" + private static List> isScheduledDeviatedTripCases() { + return List.of( + List.of( + regularStop("10:10"), + area("10:20", "10:30"), + regularStop("10:40"), + area("10:50", "11:00") + ), + List.of( + regularStopWithContinuousStopping("10:10"), + area("10:20", "10:30"), + regularStopWithContinuousStopping("10:40"), + area("10:50", "11:00") + ) ); } - /** - * We add flex trips, that can potentially not have a departure and arrival time, to the trip. - *

- * Normally these trip times are interpolated/repaired during the graph build but for flex this is - * exactly what we don't want. Here we check that the interpolation process is skipped. - * - * @see ValidateAndInterpolateStopTimesForEachTrip#interpolateStopTimes(List) - */ - @Test - void shouldNotInterpolateFlexTimes() { - var feedId = timetableRepository.getFeedIds().iterator().next(); - var pattern = timetableRepository.getTripPatternForId(new FeedScopedId(feedId, "090z:0:01")); - - assertEquals(3, pattern.numberOfStops()); - - var tripTimes = pattern.getScheduledTimetable().getTripTimes(0); - var arrivalTime = tripTimes.getArrivalTime(1); - - assertEquals(StopTime.MISSING_VALUE, arrivalTime); - } - - @BeforeAll - static void setup() { - TestOtpModel model = FlexIntegrationTestData.cobbFlexGtfs(); - graph = model.graph(); - timetableRepository = model.timetableRepository(); + @ParameterizedTest + @MethodSource("isScheduledDeviatedTripCases") + void isScheduledDeviatedTrip(List stopTimes) { + assertTrue(ScheduledDeviatedTrip.isScheduledFlexTrip(stopTimes)); } - private static List getItineraries( - GenericLocation from, - GenericLocation to, - OtpServerRequestContext serverContext - ) { - var zoneId = ZoneIds.NEW_YORK; - RouteRequest request = new RouteRequest(); - request.journey().transit().setFilters(List.of(AllowAllTransitFilter.of())); - var dateTime = LocalDateTime.of(2021, Month.DECEMBER, 16, 12, 0).atZone(zoneId); - request.setDateTime(dateTime.toInstant()); - request.setFrom(from); - request.setTo(to); - - var transitStartOfTime = ServiceDateUtils.asStartOfService(request.dateTime(), zoneId); - var additionalSearchDays = AdditionalSearchDays.defaults(dateTime); - var result = TransitRouter.route( - request, - serverContext, - TransitGroupPriorityService.empty(), - transitStartOfTime, - additionalSearchDays, - new DebugTimingAggregator() + private static List> isNotScheduledDeviatedTripCases() { + return List.of( + List.of( + areaWithContinuousStopping("10:10"), + area("10:20", "10:30"), + areaWithContinuousStopping("10:40"), + area("10:50", "11:00") + ), + List.of( + regularStop("10:10"), + regularStop("10:20") + ) ); - - return result.getItineraries(); } - private static NearbyStop getNearbyStop(FlexTrip trip) { - return getNearbyStop(trip, "nearby-stop"); + @ParameterizedTest + @MethodSource("isNotScheduledDeviatedTripCases") + void isNotScheduledDeviatedTrip(List stopTimes) { + assertFalse(ScheduledDeviatedTrip.isScheduledFlexTrip(stopTimes)); } - private static NearbyStop getNearbyStop(FlexTrip trip, String id) { - // getStops() returns a set of stops and the order doesn't correspond to the stop times - // of the trip - var stopLocation = trip - .getStops() - .stream() - .filter(s -> s instanceof AreaStop) - .findFirst() - .orElseThrow(); - return new NearbyStop( - stopLocation, - 0, - List.of(), - new State( - new StreetLocation(id, new Coordinate(0, 0), I18NString.of(id)), - StreetSearchRequest.of().build() - ) - ); - } - - private static FlexTrip getFlexTrip() { - var feedId = timetableRepository.getFeedIds().iterator().next(); - var tripId = new FeedScopedId(feedId, "a326c618-d42c-4bd1-9624-c314fbf8ecd8"); - return timetableRepository.getFlexTrip(tripId); - } -} +} \ No newline at end of file diff --git a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java index cfcbc123642..3b383a5155a 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java @@ -50,6 +50,10 @@ class IsUnscheduledTrip { private static final StopTime CONTINUOUS_PICKUP_STOP = new StopTime(); private static final StopTime CONTINUOUS_DROP_OFF_STOP = new StopTime(); + // disallowed by the GTFS spec + private static final StopTime FLEX_AND_CONTINUOUS_PICKUP_STOP = new StopTime(); + private static final StopTime FLEX_AND_CONTINUOUS_DROP_OFF_STOP = new StopTime(); + static { var trip = TimetableRepositoryForTest.trip("flex").build(); SCHEDULED_STOP.setArrivalTime(30); @@ -63,16 +67,29 @@ class IsUnscheduledTrip { UNSCHEDULED_STOP.setTrip(trip); CONTINUOUS_PICKUP_STOP.setFlexContinuousPickup(PickDrop.COORDINATE_WITH_DRIVER); - CONTINUOUS_PICKUP_STOP.setFlexWindowStart(30); - CONTINUOUS_PICKUP_STOP.setFlexWindowEnd(300); - CONTINUOUS_PICKUP_STOP.setStop(AREA_STOP); + CONTINUOUS_PICKUP_STOP.setArrivalTime(100); + CONTINUOUS_PICKUP_STOP.setDepartureTime(100); + CONTINUOUS_PICKUP_STOP.setStop(REGULAR_STOP); CONTINUOUS_PICKUP_STOP.setTrip(trip); CONTINUOUS_DROP_OFF_STOP.setFlexContinuousDropOff(PickDrop.COORDINATE_WITH_DRIVER); - CONTINUOUS_DROP_OFF_STOP.setFlexWindowStart(100); - CONTINUOUS_DROP_OFF_STOP.setFlexWindowEnd(200); - CONTINUOUS_DROP_OFF_STOP.setStop(AREA_STOP); + CONTINUOUS_DROP_OFF_STOP.setArrivalTime(100); + CONTINUOUS_DROP_OFF_STOP.setDepartureTime(100); + CONTINUOUS_DROP_OFF_STOP.setStop(REGULAR_STOP); CONTINUOUS_DROP_OFF_STOP.setTrip(trip); + + + FLEX_AND_CONTINUOUS_PICKUP_STOP.setFlexContinuousPickup(PickDrop.COORDINATE_WITH_DRIVER); + FLEX_AND_CONTINUOUS_PICKUP_STOP.setFlexWindowStart(30); + FLEX_AND_CONTINUOUS_PICKUP_STOP.setFlexWindowEnd(300); + FLEX_AND_CONTINUOUS_PICKUP_STOP.setStop(AREA_STOP); + FLEX_AND_CONTINUOUS_PICKUP_STOP.setTrip(trip); + + FLEX_AND_CONTINUOUS_DROP_OFF_STOP.setFlexContinuousDropOff(PickDrop.COORDINATE_WITH_DRIVER); + FLEX_AND_CONTINUOUS_DROP_OFF_STOP.setFlexWindowStart(100); + FLEX_AND_CONTINUOUS_DROP_OFF_STOP.setFlexWindowEnd(200); + FLEX_AND_CONTINUOUS_DROP_OFF_STOP.setStop(AREA_STOP); + FLEX_AND_CONTINUOUS_DROP_OFF_STOP.setTrip(trip); } static List> notUnscheduled() { @@ -82,9 +99,9 @@ static List> notUnscheduled() { List.of(SCHEDULED_STOP, SCHEDULED_STOP), List.of(SCHEDULED_STOP, SCHEDULED_STOP, SCHEDULED_STOP), List.of(UNSCHEDULED_STOP, SCHEDULED_STOP, UNSCHEDULED_STOP), - List.of(UNSCHEDULED_STOP, CONTINUOUS_PICKUP_STOP), - List.of(UNSCHEDULED_STOP, CONTINUOUS_DROP_OFF_STOP), - List.of(CONTINUOUS_PICKUP_STOP, CONTINUOUS_DROP_OFF_STOP) + List.of(UNSCHEDULED_STOP, FLEX_AND_CONTINUOUS_PICKUP_STOP), + List.of(UNSCHEDULED_STOP, FLEX_AND_CONTINUOUS_DROP_OFF_STOP), + List.of(FLEX_AND_CONTINUOUS_PICKUP_STOP, FLEX_AND_CONTINUOUS_DROP_OFF_STOP) ); } @@ -101,7 +118,11 @@ static List> unscheduled() { List.of(SCHEDULED_STOP, UNSCHEDULED_STOP), List.of(UNSCHEDULED_STOP, UNSCHEDULED_STOP), List.of(UNSCHEDULED_STOP, UNSCHEDULED_STOP, UNSCHEDULED_STOP), - Collections.nCopies(10, UNSCHEDULED_STOP) + Collections.nCopies(10, UNSCHEDULED_STOP), + List.of(UNSCHEDULED_STOP, CONTINUOUS_PICKUP_STOP), + List.of(CONTINUOUS_PICKUP_STOP, UNSCHEDULED_STOP), + List.of(UNSCHEDULED_STOP, CONTINUOUS_DROP_OFF_STOP), + List.of(CONTINUOUS_DROP_OFF_STOP, UNSCHEDULED_STOP) ); } diff --git a/application/src/ext/java/org/opentripplanner/ext/flex/FlexTripsMapper.java b/application/src/ext/java/org/opentripplanner/ext/flex/FlexTripsMapper.java index 696c5df4c2a..3e577f00a1d 100644 --- a/application/src/ext/java/org/opentripplanner/ext/flex/FlexTripsMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/flex/FlexTripsMapper.java @@ -48,16 +48,16 @@ public class FlexTripsMapper { result.add( ScheduledDeviatedTrip.of(trip.getId()).withTrip(trip).withStopTimes(stopTimes).build() ); - } else if (hasContinuousStops(stopTimes) && FlexTrip.containsFlexStops(stopTimes)) { + } else if (stopTimes.stream().anyMatch(StopTime::combinesContinuousStoppingWithFlex)) { store.add( - "ContinuousFlexTrip", - "Trip %s contains both flex stops and continuous pick up/drop off. This is an invalid combination: https://github.com/MobilityData/gtfs-flex/issues/70", + "ContinuousFlexStopTime", + "Trip %s contains a stop time which combines flex with continuous pick up/drop off. This is an invalid combination: https://github.com/MobilityData/gtfs-flex/issues/70", trip.getId() ); // result.add(new ContinuousPickupDropOffTrip(trip, stopTimes)); } - //Keep lambda! A method-ref would causes incorrect class and line number to be logged + //Keep lambda! A method-ref would cause incorrect class and line number to be logged //noinspection Convert2MethodRef progress.step(m -> LOG.info(m)); } diff --git a/application/src/ext/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTrip.java b/application/src/ext/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTrip.java index c8484532b68..deba24e9c98 100644 --- a/application/src/ext/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTrip.java +++ b/application/src/ext/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTrip.java @@ -1,6 +1,5 @@ package org.opentripplanner.ext.flex.trip; -import static org.opentripplanner.model.PickDrop.NONE; import static org.opentripplanner.model.StopTime.MISSING_VALUE; import java.io.Serializable; @@ -56,11 +55,9 @@ public static ScheduledDeviatedTripBuilder of(FeedScopedId id) { } public static boolean isScheduledFlexTrip(List stopTimes) { - Predicate notStopType = Predicate.not(st -> st.getStop() instanceof RegularStop); - Predicate notContinuousStop = stopTime -> - stopTime.getFlexContinuousDropOff() == NONE && stopTime.getFlexContinuousPickup() == NONE; + Predicate notFixedStop = Predicate.not(st -> st.getStop() instanceof RegularStop); return ( - stopTimes.stream().anyMatch(notStopType) && stopTimes.stream().allMatch(notContinuousStop) + stopTimes.stream().anyMatch(notFixedStop) && stopTimes.stream().noneMatch(StopTime::combinesContinuousStoppingWithFlex) ); } diff --git a/application/src/ext/java/org/opentripplanner/ext/flex/trip/UnscheduledTrip.java b/application/src/ext/java/org/opentripplanner/ext/flex/trip/UnscheduledTrip.java index b0286541bd2..1748e0c6c60 100644 --- a/application/src/ext/java/org/opentripplanner/ext/flex/trip/UnscheduledTrip.java +++ b/application/src/ext/java/org/opentripplanner/ext/flex/trip/UnscheduledTrip.java @@ -1,6 +1,5 @@ package org.opentripplanner.ext.flex.trip; -import static org.opentripplanner.model.PickDrop.NONE; import static org.opentripplanner.model.StopTime.MISSING_VALUE; import java.util.Arrays; @@ -8,7 +7,6 @@ import java.util.Objects; import java.util.Optional; import java.util.Set; -import java.util.function.Predicate; import java.util.stream.Collectors; import org.opentripplanner.ext.flex.flexpathcalculator.FlexPathCalculator; import org.opentripplanner.ext.flex.flexpathcalculator.TimePenaltyCalculator; @@ -81,11 +79,9 @@ public static UnscheduledTripBuilder of(FeedScopedId id) { * - One or more stop times with a flexible time window but no fixed stop in between them */ public static boolean isUnscheduledTrip(List stopTimes) { - Predicate hasContinuousStops = stopTime -> - stopTime.getFlexContinuousDropOff() != NONE || stopTime.getFlexContinuousPickup() != NONE; if (stopTimes.isEmpty()) { return false; - } else if (stopTimes.stream().anyMatch(hasContinuousStops)) { + } else if (stopTimes.stream().anyMatch(StopTime::combinesContinuousStoppingWithFlex)) { return false; } else if (N_STOPS.contains(stopTimes.size())) { return stopTimes.stream().anyMatch(StopTime::hasFlexWindow); diff --git a/application/src/main/java/org/opentripplanner/model/StopTime.java b/application/src/main/java/org/opentripplanner/model/StopTime.java index e31350192e1..8877522f7f0 100644 --- a/application/src/main/java/org/opentripplanner/model/StopTime.java +++ b/application/src/main/java/org/opentripplanner/model/StopTime.java @@ -1,6 +1,8 @@ /* This file is based on code copied from project OneBusAway, see the LICENSE file for further information. */ package org.opentripplanner.model; +import static org.opentripplanner.model.PickDrop.NONE; + import java.util.List; import org.opentripplanner.framework.i18n.I18NString; import org.opentripplanner.transit.model.site.StopLocation; @@ -305,4 +307,16 @@ private static int getAvailableTime(int... times) { public boolean hasFlexWindow() { return flexWindowStart != MISSING_VALUE || flexWindowEnd != MISSING_VALUE; } + + /** + * Checks if this stop time combines flex windows with continuous stopping, which is against the + * GTFS spec. + */ + public boolean combinesContinuousStoppingWithFlex() { + return hasContinuousStopping() && hasFlexWindow(); + } + + public boolean hasContinuousStopping() { + return this.flexContinuousPickup != NONE || flexContinuousDropOff != NONE; + } } From be1a3b27a86606992bb41c921d5af67559403d9a Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Sat, 2 Nov 2024 16:25:13 +0100 Subject: [PATCH 034/169] Rename methods --- .../ext/flex/trip/ScheduledDeviatedTripTest.java | 8 ++++---- .../org/opentripplanner/ext/flex/FlexTripsMapper.java | 4 ++-- .../ext/flex/trip/ScheduledDeviatedTrip.java | 6 +++--- .../opentripplanner/ext/flex/trip/UnscheduledTrip.java | 2 +- .../src/main/java/org/opentripplanner/model/StopTime.java | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripTest.java b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripTest.java index e5362e1e5fd..4beefeb271e 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripTest.java @@ -34,16 +34,16 @@ private static List> isScheduledDeviatedTripCases() { @ParameterizedTest @MethodSource("isScheduledDeviatedTripCases") void isScheduledDeviatedTrip(List stopTimes) { - assertTrue(ScheduledDeviatedTrip.isScheduledFlexTrip(stopTimes)); + assertTrue(ScheduledDeviatedTrip.isScheduledDeviatedFlexTrip(stopTimes)); } private static List> isNotScheduledDeviatedTripCases() { return List.of( List.of( areaWithContinuousStopping("10:10"), - area("10:20", "10:30"), + regularStop("10:20", "10:30"), areaWithContinuousStopping("10:40"), - area("10:50", "11:00") + regularStop("10:50", "11:00") ), List.of( regularStop("10:10"), @@ -55,7 +55,7 @@ private static List> isNotScheduledDeviatedTripCases() { @ParameterizedTest @MethodSource("isNotScheduledDeviatedTripCases") void isNotScheduledDeviatedTrip(List stopTimes) { - assertFalse(ScheduledDeviatedTrip.isScheduledFlexTrip(stopTimes)); + assertFalse(ScheduledDeviatedTrip.isScheduledDeviatedFlexTrip(stopTimes)); } diff --git a/application/src/ext/java/org/opentripplanner/ext/flex/FlexTripsMapper.java b/application/src/ext/java/org/opentripplanner/ext/flex/FlexTripsMapper.java index 3e577f00a1d..17ce735a447 100644 --- a/application/src/ext/java/org/opentripplanner/ext/flex/FlexTripsMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/flex/FlexTripsMapper.java @@ -44,11 +44,11 @@ public class FlexTripsMapper { .withTimePenalty(timePenalty) .build() ); - } else if (ScheduledDeviatedTrip.isScheduledFlexTrip(stopTimes)) { + } else if (ScheduledDeviatedTrip.isScheduledDeviatedFlexTrip(stopTimes)) { result.add( ScheduledDeviatedTrip.of(trip.getId()).withTrip(trip).withStopTimes(stopTimes).build() ); - } else if (stopTimes.stream().anyMatch(StopTime::combinesContinuousStoppingWithFlex)) { + } else if (stopTimes.stream().anyMatch(StopTime::combinesContinuousStoppingWithFlexWindow)) { store.add( "ContinuousFlexStopTime", "Trip %s contains a stop time which combines flex with continuous pick up/drop off. This is an invalid combination: https://github.com/MobilityData/gtfs-flex/issues/70", diff --git a/application/src/ext/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTrip.java b/application/src/ext/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTrip.java index deba24e9c98..25eac71ebb6 100644 --- a/application/src/ext/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTrip.java +++ b/application/src/ext/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTrip.java @@ -34,7 +34,7 @@ public class ScheduledDeviatedTrip ScheduledDeviatedTrip(ScheduledDeviatedTripBuilder builder) { super(builder); List stopTimes = builder.stopTimes(); - if (!isScheduledFlexTrip(stopTimes)) { + if (!isScheduledDeviatedFlexTrip(stopTimes)) { throw new IllegalArgumentException("Incompatible stopTimes for scheduled flex trip"); } @@ -54,10 +54,10 @@ public static ScheduledDeviatedTripBuilder of(FeedScopedId id) { return new ScheduledDeviatedTripBuilder(id); } - public static boolean isScheduledFlexTrip(List stopTimes) { + public static boolean isScheduledDeviatedFlexTrip(List stopTimes) { Predicate notFixedStop = Predicate.not(st -> st.getStop() instanceof RegularStop); return ( - stopTimes.stream().anyMatch(notFixedStop) && stopTimes.stream().noneMatch(StopTime::combinesContinuousStoppingWithFlex) + stopTimes.stream().anyMatch(notFixedStop) && stopTimes.stream().noneMatch(StopTime::combinesContinuousStoppingWithFlexWindow) ); } diff --git a/application/src/ext/java/org/opentripplanner/ext/flex/trip/UnscheduledTrip.java b/application/src/ext/java/org/opentripplanner/ext/flex/trip/UnscheduledTrip.java index 1748e0c6c60..83fc22c9975 100644 --- a/application/src/ext/java/org/opentripplanner/ext/flex/trip/UnscheduledTrip.java +++ b/application/src/ext/java/org/opentripplanner/ext/flex/trip/UnscheduledTrip.java @@ -81,7 +81,7 @@ public static UnscheduledTripBuilder of(FeedScopedId id) { public static boolean isUnscheduledTrip(List stopTimes) { if (stopTimes.isEmpty()) { return false; - } else if (stopTimes.stream().anyMatch(StopTime::combinesContinuousStoppingWithFlex)) { + } else if (stopTimes.stream().anyMatch(StopTime::combinesContinuousStoppingWithFlexWindow)) { return false; } else if (N_STOPS.contains(stopTimes.size())) { return stopTimes.stream().anyMatch(StopTime::hasFlexWindow); diff --git a/application/src/main/java/org/opentripplanner/model/StopTime.java b/application/src/main/java/org/opentripplanner/model/StopTime.java index 8877522f7f0..0754dbce671 100644 --- a/application/src/main/java/org/opentripplanner/model/StopTime.java +++ b/application/src/main/java/org/opentripplanner/model/StopTime.java @@ -312,7 +312,7 @@ public boolean hasFlexWindow() { * Checks if this stop time combines flex windows with continuous stopping, which is against the * GTFS spec. */ - public boolean combinesContinuousStoppingWithFlex() { + public boolean combinesContinuousStoppingWithFlexWindow() { return hasContinuousStopping() && hasFlexWindow(); } From 42bf36c24abf2cd147928f4f6a954a6430f9f77c Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Sat, 2 Nov 2024 16:27:45 +0100 Subject: [PATCH 035/169] Fix import --- .../flexpathcalculator/ScheduledFlexPathCalculatorTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/flex/flexpathcalculator/ScheduledFlexPathCalculatorTest.java b/application/src/ext-test/java/org/opentripplanner/ext/flex/flexpathcalculator/ScheduledFlexPathCalculatorTest.java index e2bda60bc17..23827b9503b 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/flex/flexpathcalculator/ScheduledFlexPathCalculatorTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/flex/flexpathcalculator/ScheduledFlexPathCalculatorTest.java @@ -2,6 +2,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.opentripplanner.ext.flex.FlexStopTimesForTest.area; +import static org.opentripplanner.ext.flex.FlexStopTimesForTest.regularStop; import static org.opentripplanner.street.model._data.StreetModelForTest.V1; import static org.opentripplanner.street.model._data.StreetModelForTest.V2; import static org.opentripplanner.transit.model._data.TimetableRepositoryForTest.id; @@ -10,7 +11,6 @@ import java.util.List; import org.junit.jupiter.api.Test; import org.opentripplanner._support.geometry.LineStrings; -import org.opentripplanner.ext.flex.FlexStopTimesForTest; import org.opentripplanner.ext.flex.trip.ScheduledDeviatedTrip; class ScheduledFlexPathCalculatorTest { @@ -19,9 +19,9 @@ class ScheduledFlexPathCalculatorTest { .of(id("123")) .withStopTimes( List.of( - FlexStopTimesForTest.regularStop("10:00", "10:01"), + regularStop("10:00", "10:01"), area("10:10", "10:20"), - FlexStopTimesForTest.regularStop("10:25", "10:26"), + regularStop("10:25", "10:26"), area("10:40", "10:50") ) ) From c4dc19553a5dd120394c01139ad5f02ac9093f54 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Sat, 2 Nov 2024 21:07:04 +0100 Subject: [PATCH 036/169] Re-use stop time test code --- .../ext/flex/FlexStopTimesForTest.java | 50 +++++++++++++++---- .../ext/flex/trip/UnscheduledTripTest.java | 50 +++---------------- 2 files changed, 47 insertions(+), 53 deletions(-) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/flex/FlexStopTimesForTest.java b/application/src/ext-test/java/org/opentripplanner/ext/flex/FlexStopTimesForTest.java index f65450f1191..b67ae85a434 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/flex/FlexStopTimesForTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/flex/FlexStopTimesForTest.java @@ -33,6 +33,34 @@ public static StopTime area(StopLocation areaStop, String endTime, String startT return stopTime; } + /** + * Returns an invalid combination of a flex area and continuous stopping. + */ + public static StopTime areaWithContinuousStopping(String time) { + var st = area(time, time); + st.setFlexContinuousPickup(PickDrop.COORDINATE_WITH_DRIVER); + st.setFlexContinuousDropOff(PickDrop.COORDINATE_WITH_DRIVER); + return st; + } + + /** + * Returns an invalid combination of a flex area and continuous pick up. + */ + public static StopTime areaWithContinuousPickup(String time) { + var st = area(time, time); + st.setFlexContinuousPickup(PickDrop.COORDINATE_WITH_DRIVER); + return st; + } + + /** + * Returns an invalid combination of a flex area and continuous drop off. + */ + public static StopTime areaWithContinuousDropOff(String time) { + var st = area(time, time); + st.setFlexContinuousDropOff(PickDrop.COORDINATE_WITH_DRIVER); + return st; + } + public static StopTime regularStop(String arrivalTime, String departureTime) { return regularStop(TimeUtils.time(arrivalTime), TimeUtils.time(departureTime)); } @@ -48,6 +76,18 @@ public static StopTime regularStopWithContinuousStopping(String time) { return st; } + public static StopTime regularStopWithContinuousPickup(String time) { + var st = regularStop(TimeUtils.time(time), TimeUtils.time(time)); + st.setFlexContinuousPickup(PickDrop.COORDINATE_WITH_DRIVER); + return st; + } + + public static StopTime regularStopWithContinuousDropOff(String time) { + var st = regularStop(TimeUtils.time(time), TimeUtils.time(time)); + st.setFlexContinuousDropOff(PickDrop.COORDINATE_WITH_DRIVER); + return st; + } + public static StopTime regularStop(int arrivalTime, int departureTime) { var stopTime = new StopTime(); stopTime.setStop(REGULAR_STOP); @@ -57,14 +97,6 @@ public static StopTime regularStop(int arrivalTime, int departureTime) { return stopTime; } - /** - * Returns an invalid combination of a flex area and continuous stopping. - */ - public static StopTime areaWithContinuousStopping(String time) { - var st = area(time, time); - st.setFlexContinuousPickup(PickDrop.COORDINATE_WITH_DRIVER); - st.setFlexContinuousDropOff(PickDrop.COORDINATE_WITH_DRIVER); - return st; - } + } diff --git a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java index 3b383a5155a..c3923cd57c3 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java @@ -45,52 +45,14 @@ class UnscheduledTripTest { @Nested class IsUnscheduledTrip { - private static final StopTime SCHEDULED_STOP = new StopTime(); - private static final StopTime UNSCHEDULED_STOP = new StopTime(); - private static final StopTime CONTINUOUS_PICKUP_STOP = new StopTime(); - private static final StopTime CONTINUOUS_DROP_OFF_STOP = new StopTime(); + private static final StopTime SCHEDULED_STOP = FlexStopTimesForTest.regularStop("10:00"); + private static final StopTime UNSCHEDULED_STOP = FlexStopTimesForTest.area("10:10", "10:20"); + private static final StopTime CONTINUOUS_PICKUP_STOP = FlexStopTimesForTest.regularStopWithContinuousPickup("10:30"); + private static final StopTime CONTINUOUS_DROP_OFF_STOP = FlexStopTimesForTest.regularStopWithContinuousDropOff("10:40"); // disallowed by the GTFS spec - private static final StopTime FLEX_AND_CONTINUOUS_PICKUP_STOP = new StopTime(); - private static final StopTime FLEX_AND_CONTINUOUS_DROP_OFF_STOP = new StopTime(); - - static { - var trip = TimetableRepositoryForTest.trip("flex").build(); - SCHEDULED_STOP.setArrivalTime(30); - SCHEDULED_STOP.setDepartureTime(60); - SCHEDULED_STOP.setStop(AREA_STOP); - SCHEDULED_STOP.setTrip(trip); - - UNSCHEDULED_STOP.setFlexWindowStart(30); - UNSCHEDULED_STOP.setFlexWindowEnd(300); - UNSCHEDULED_STOP.setStop(AREA_STOP); - UNSCHEDULED_STOP.setTrip(trip); - - CONTINUOUS_PICKUP_STOP.setFlexContinuousPickup(PickDrop.COORDINATE_WITH_DRIVER); - CONTINUOUS_PICKUP_STOP.setArrivalTime(100); - CONTINUOUS_PICKUP_STOP.setDepartureTime(100); - CONTINUOUS_PICKUP_STOP.setStop(REGULAR_STOP); - CONTINUOUS_PICKUP_STOP.setTrip(trip); - - CONTINUOUS_DROP_OFF_STOP.setFlexContinuousDropOff(PickDrop.COORDINATE_WITH_DRIVER); - CONTINUOUS_DROP_OFF_STOP.setArrivalTime(100); - CONTINUOUS_DROP_OFF_STOP.setDepartureTime(100); - CONTINUOUS_DROP_OFF_STOP.setStop(REGULAR_STOP); - CONTINUOUS_DROP_OFF_STOP.setTrip(trip); - - - FLEX_AND_CONTINUOUS_PICKUP_STOP.setFlexContinuousPickup(PickDrop.COORDINATE_WITH_DRIVER); - FLEX_AND_CONTINUOUS_PICKUP_STOP.setFlexWindowStart(30); - FLEX_AND_CONTINUOUS_PICKUP_STOP.setFlexWindowEnd(300); - FLEX_AND_CONTINUOUS_PICKUP_STOP.setStop(AREA_STOP); - FLEX_AND_CONTINUOUS_PICKUP_STOP.setTrip(trip); - - FLEX_AND_CONTINUOUS_DROP_OFF_STOP.setFlexContinuousDropOff(PickDrop.COORDINATE_WITH_DRIVER); - FLEX_AND_CONTINUOUS_DROP_OFF_STOP.setFlexWindowStart(100); - FLEX_AND_CONTINUOUS_DROP_OFF_STOP.setFlexWindowEnd(200); - FLEX_AND_CONTINUOUS_DROP_OFF_STOP.setStop(AREA_STOP); - FLEX_AND_CONTINUOUS_DROP_OFF_STOP.setTrip(trip); - } + private static final StopTime FLEX_AND_CONTINUOUS_PICKUP_STOP = FlexStopTimesForTest.areaWithContinuousPickup("10:50"); + private static final StopTime FLEX_AND_CONTINUOUS_DROP_OFF_STOP = FlexStopTimesForTest.areaWithContinuousDropOff("11:00"); static List> notUnscheduled() { return List.of( From 231ed6f5e3293d1dc423d611b65dea345eda0e33 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 4 Nov 2024 21:39:29 +0100 Subject: [PATCH 037/169] Add back import --- .../org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java index c3923cd57c3..b7f2706d25a 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/UnscheduledTripTest.java @@ -17,6 +17,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; +import org.opentripplanner.ext.flex.FlexStopTimesForTest; import org.opentripplanner.model.PickDrop; import org.opentripplanner.model.StopTime; import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; From 8f6ba7bba447fc21a5a2fa7e03b7043b31d57959 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Tue, 5 Nov 2024 08:23:18 +0100 Subject: [PATCH 038/169] Display fallback for routes without a short name --- .../ItineraryList/ItineraryLegDetails.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/client/src/components/ItineraryList/ItineraryLegDetails.tsx b/client/src/components/ItineraryList/ItineraryLegDetails.tsx index 51f0821b3e4..d23563331b5 100644 --- a/client/src/components/ItineraryList/ItineraryLegDetails.tsx +++ b/client/src/components/ItineraryList/ItineraryLegDetails.tsx @@ -7,6 +7,16 @@ import { ItineraryGraphiQLLineLink } from './ItineraryGraphiQLLineLink.tsx'; import { ItineraryGraphiQLQuayLink } from './ItineraryGraphiQLQuayLink.tsx'; import { ItineraryGraphiQLAuthorityLink } from './ItineraryGraphiQLAuthorityLink.tsx'; +/** + * Some GTFS trips don't have a short name (public code) so we use the long name in this case. + */ +function legName(leg: Leg): string { + if (leg.line?.publicCode) { + return leg.line.publicCode + ' ' + leg.toEstimatedCall?.destinationDisplay?.frontText; + } else { + return leg.line?.name || 'unknown'; + } +} export function ItineraryLegDetails({ leg, isLast }: { leg: Leg; isLast: boolean }) { return (

@@ -20,10 +30,7 @@ export function ItineraryLegDetails({ leg, isLast }: { leg: Leg; isLast: boolean {leg.mode}{' '} {leg.line && ( <> - + , )}{' '} From 2bd6d5ec56e89959564e1254d747989df2eddee4 Mon Sep 17 00:00:00 2001 From: Zsombor Welker Date: Thu, 7 Nov 2024 22:30:39 +0100 Subject: [PATCH 039/169] Portland test graph: use noop data import issue store --- .../src/test/java/org/opentripplanner/ConstantsForTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/application/src/test/java/org/opentripplanner/ConstantsForTests.java b/application/src/test/java/org/opentripplanner/ConstantsForTests.java index 6c349b4de89..f7877e62d6b 100644 --- a/application/src/test/java/org/opentripplanner/ConstantsForTests.java +++ b/application/src/test/java/org/opentripplanner/ConstantsForTests.java @@ -16,7 +16,6 @@ import org.opentripplanner.framework.i18n.NonLocalizedString; import org.opentripplanner.graph_builder.ConfiguredDataSource; import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; -import org.opentripplanner.graph_builder.issue.service.DefaultDataImportIssueStore; import org.opentripplanner.graph_builder.module.DirectTransferGenerator; import org.opentripplanner.graph_builder.module.GtfsFeedId; import org.opentripplanner.graph_builder.module.TestStreetLinkerModule; @@ -174,7 +173,7 @@ public static TestOtpModel buildNewPortlandGraph(boolean withElevation) { new DirectTransferGenerator( graph, timetableRepository, - new DefaultDataImportIssueStore(), + DataImportIssueStore.NOOP, Duration.ofMinutes(30), List.of(new RouteRequest()) ) From c5184b2ad2df34461d5f1412e4272f97b5707e20 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Fri, 8 Nov 2024 11:38:04 +0100 Subject: [PATCH 040/169] Move parking service out of the Graph --- .../ext/parkAndRideApi/ParkAndRideResource.java | 2 +- .../ext/restapi/model/ApiRouterInfo.java | 5 ++--- .../ext/restapi/model/ApiTravelOptionsMaker.java | 7 ++++--- .../ext/restapi/resources/Routers.java | 1 + .../ext/vectortiles/VectorTilesResource.java | 4 ++-- .../VehicleParkingGroupsLayerBuilder.java | 11 +++++------ .../VehicleParkingsLayerBuilder.java | 11 +++++------ .../apis/gtfs/GraphQLRequestContext.java | 2 +- .../apis/transmodel/support/GqlUtil.java | 1 - .../graph_builder/module/StreetLinkerModule.java | 8 +++++--- .../graph_builder/module/osm/OsmModule.java | 14 +++++++++----- .../graph_builder/module/osm/OsmModuleBuilder.java | 5 ++++- .../org/opentripplanner/netex/NetexModule.java | 6 +++++- .../org/opentripplanner/routing/graph/Graph.java | 6 ------ .../standalone/api/OtpServerRequestContext.java | 4 ++++ 15 files changed, 48 insertions(+), 39 deletions(-) diff --git a/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java b/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java index 6529fc4234d..ec1ac7348d7 100644 --- a/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java +++ b/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java @@ -36,7 +36,7 @@ public ParkAndRideResource( */ @Deprecated @PathParam("ignoreRouterId") String ignoreRouterId ) { - this.vehicleParkingService = serverContext.graph().getVehicleParkingService(); + this.vehicleParkingService = serverContext.getVehicleParkingService(); // TODO OTP2 - Why are we using the DirectGraphFinder here, not just // - serverContext.graphFinder(). This needs at least a comment! diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java index a0bbb1116b3..aa072cfaed0 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java @@ -34,10 +34,9 @@ public ApiRouterInfo( Graph graph, TransitService transitService, VehicleRentalService vehicleRentalService, + VehicleParkingService vehicleParkingService, WorldEnvelope envelope ) { - VehicleParkingService vehicleParkingService = graph.getVehicleParkingService(); - this.routerId = routerId; this.polygon = graph.getConvexHull(); this.buildTime = Date.from(graph.buildTime); @@ -51,7 +50,7 @@ public ApiRouterInfo( this.hasParkRide = this.hasCarPark; this.hasVehicleParking = mapHasVehicleParking(vehicleParkingService); this.travelOptions = - ApiTravelOptionsMaker.makeOptions(graph, vehicleRentalService, transitService); + ApiTravelOptionsMaker.makeOptions(graph, vehicleRentalService, vehicleParkingService, transitService); } public boolean mapHasBikeSharing(VehicleRentalService service) { diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java index cf424392d70..40302032d4f 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java @@ -5,6 +5,7 @@ import java.util.Set; import org.opentripplanner.api.parameter.ApiRequestMode; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.transit.model.basic.TransitMode; import org.opentripplanner.transit.service.TransitService; @@ -29,14 +30,14 @@ public final class ApiTravelOptionsMaker { public static List makeOptions( Graph graph, VehicleRentalService vehicleRentalService, + VehicleParkingService vehicleParkingService, TransitService transitService ) { - var service = graph.getVehicleParkingService(); return makeOptions( transitService.getTransitModes(), vehicleRentalService.hasRentalBikes(), - service.hasBikeParking(), - service.hasCarParking() + vehicleParkingService.hasBikeParking(), + vehicleParkingService.hasCarParking() ); } diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/resources/Routers.java b/application/src/ext/java/org/opentripplanner/ext/restapi/resources/Routers.java index 9cfab49017c..d5dae967568 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/resources/Routers.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/resources/Routers.java @@ -66,6 +66,7 @@ private ApiRouterInfo getRouterInfo() { serverContext.graph(), serverContext.transitService(), serverContext.vehicleRentalService(), + serverContext.getVehicleParkingService(), serverContext.worldEnvelopeService().envelope().orElseThrow() ); } catch (GraphNotFoundException e) { diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java index 29701ee2307..ada19316866 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java @@ -140,12 +140,12 @@ private static LayerBuilder createLayerBuilder( layerParameters ); case VehicleParking -> new VehicleParkingsLayerBuilder( - context.graph(), + context.getVehicleParkingService(), layerParameters, locale ); case VehicleParkingGroup -> new VehicleParkingGroupsLayerBuilder( - context.graph(), + context.getVehicleParkingService(), layerParameters, locale ); diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java index 0cd1d84868b..a33cada7465 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java @@ -13,7 +13,7 @@ import org.opentripplanner.framework.geometry.GeometryUtils; import org.opentripplanner.inspector.vector.LayerBuilder; import org.opentripplanner.inspector.vector.LayerParameters; -import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; public class VehicleParkingGroupsLayerBuilder extends LayerBuilder { @@ -21,10 +21,10 @@ public class VehicleParkingGroupsLayerBuilder extends LayerBuilder layerParameters, Locale locale ) { @@ -33,13 +33,12 @@ public VehicleParkingGroupsLayerBuilder( layerParameters.name(), layerParameters.expansionFactor() ); - this.graph = graph; + this.service = service; } @Override protected List getGeometries(Envelope query) { - return graph - .getVehicleParkingService() + return service .getVehicleParkingGroups() .asMap() .entrySet() diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java index 95326172415..49e081d0039 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java @@ -16,8 +16,8 @@ import org.opentripplanner.framework.geometry.GeometryUtils; import org.opentripplanner.inspector.vector.LayerBuilder; import org.opentripplanner.inspector.vector.LayerParameters; -import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; public class VehicleParkingsLayerBuilder extends LayerBuilder { @@ -28,10 +28,10 @@ public class VehicleParkingsLayerBuilder extends LayerBuilder { ), entry(MapperType.Digitransit, DigitransitVehicleParkingPropertyMapper::create) ); - private final Graph graph; + private final VehicleParkingService service; public VehicleParkingsLayerBuilder( - Graph graph, + VehicleParkingService service, LayerParameters layerParameters, Locale locale ) { @@ -40,13 +40,12 @@ public VehicleParkingsLayerBuilder( layerParameters.name(), layerParameters.expansionFactor() ); - this.graph = graph; + this.service = service; } @Override protected List getGeometries(Envelope query) { - return graph - .getVehicleParkingService() + return service .getVehicleParkings() .map(vehicleParking -> { Coordinate coordinate = vehicleParking.getCoordinate().asJtsCoordinate(); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java b/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java index 192cbb26aa9..084a1e2dfc9 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java @@ -25,7 +25,7 @@ public static GraphQLRequestContext ofServerContext(OtpServerRequestContext cont context.routingService(), context.transitService(), context.graph().getFareService(), - context.graph().getVehicleParkingService(), + context.getVehicleParkingService(), context.vehicleRentalService(), context.realtimeVehicleService(), context.graphFinder(), diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java b/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java index 6b9abc75b05..a9f5414683b 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java @@ -38,7 +38,6 @@ public static VehicleParkingService getVehicleParkingService( DataFetchingEnvironment environment ) { return ((TransmodelRequestContext) environment.getContext()).getServerContext() - .graph() .getVehicleParkingService(); } diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java b/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java index 98b2287542e..1a299aa9141 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java @@ -13,6 +13,7 @@ import org.opentripplanner.routing.linking.LinkingDirection; import org.opentripplanner.routing.vehicle_parking.VehicleParking; import org.opentripplanner.routing.vehicle_parking.VehicleParkingHelper; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetStationCentroidLink; import org.opentripplanner.street.model.edge.StreetTransitEntranceLink; @@ -27,7 +28,6 @@ import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.search.TraverseMode; import org.opentripplanner.street.search.TraverseModeSet; -import org.opentripplanner.transit.model.network.CarAccess; import org.opentripplanner.transit.model.site.GroupStop; import org.opentripplanner.transit.model.site.RegularStop; import org.opentripplanner.transit.model.site.StopLocation; @@ -49,17 +49,20 @@ public class StreetLinkerModule implements GraphBuilderModule { private static final TraverseModeSet CAR_ONLY = new TraverseModeSet(TraverseMode.CAR); private static final TraverseModeSet WALK_ONLY = new TraverseModeSet(TraverseMode.WALK); private final Graph graph; + private final VehicleParkingService parkingService; private final TimetableRepository timetableRepository; private final DataImportIssueStore issueStore; private final Boolean addExtraEdgesToAreas; public StreetLinkerModule( Graph graph, + VehicleParkingService parkingService, TimetableRepository timetableRepository, DataImportIssueStore issueStore, boolean addExtraEdgesToAreas ) { this.graph = graph; + this.parkingService = parkingService; this.timetableRepository = timetableRepository; this.issueStore = issueStore; this.addExtraEdgesToAreas = addExtraEdgesToAreas; @@ -311,8 +314,7 @@ private void linkVehicleParks(Graph graph, DataImportIssueStore issueStore) { } } if (!vehicleParkingToRemove.isEmpty()) { - var vehicleParkingService = graph.getVehicleParkingService(); - vehicleParkingService.updateVehicleParking(List.of(), vehicleParkingToRemove); + parkingService.updateVehicleParking(List.of(), vehicleParkingToRemove); } } diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java index 08d23087a45..3e338b0cfb8 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java @@ -26,6 +26,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.util.ElevationUtils; import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model.StreetLimitationParameters; import org.opentripplanner.street.model.StreetTraversalPermission; import org.opentripplanner.street.model.edge.StreetEdge; @@ -51,6 +52,7 @@ public class OsmModule implements GraphBuilderModule { */ private final List providers; private final Graph graph; + private final VehicleParkingService parkingService; private final DataImportIssueStore issueStore; private final OsmProcessingParameters params; private final SafetyValueNormalizer normalizer; @@ -61,6 +63,7 @@ public class OsmModule implements GraphBuilderModule { OsmModule( Collection providers, Graph graph, + VehicleParkingService parkingService, DataImportIssueStore issueStore, StreetLimitationParameters streetLimitationParameters, OsmProcessingParameters params @@ -73,14 +76,15 @@ public class OsmModule implements GraphBuilderModule { this.vertexGenerator = new VertexGenerator(osmdb, graph, params.boardingAreaRefTags()); this.normalizer = new SafetyValueNormalizer(graph, issueStore); this.streetLimitationParameters = Objects.requireNonNull(streetLimitationParameters); + this.parkingService = parkingService; } - public static OsmModuleBuilder of(Collection providers, Graph graph) { - return new OsmModuleBuilder(providers, graph); + public static OsmModuleBuilder of(Collection providers, Graph graph, VehicleParkingService service) { + return new OsmModuleBuilder(providers, graph, service); } - public static OsmModuleBuilder of(OsmProvider provider, Graph graph) { - return of(List.of(provider), graph); + public static OsmModuleBuilder of(OsmProvider provider, Graph graph, VehicleParkingService service) { + return of(List.of(provider), graph, service); } @Override @@ -163,7 +167,7 @@ private void build() { } if (!parkingLots.isEmpty()) { - graph.getVehicleParkingService().updateVehicleParking(parkingLots, List.of()); + parkingService.updateVehicleParking(parkingLots, List.of()); } var elevatorProcessor = new ElevatorProcessor(issueStore, osmdb, vertexGenerator); diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java index 6e90fb20b1c..4c80f3db795 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java @@ -8,6 +8,7 @@ import org.opentripplanner.graph_builder.services.osm.EdgeNamer; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model.StreetLimitationParameters; /** @@ -17,6 +18,7 @@ public class OsmModuleBuilder { private final Collection providers; private final Graph graph; + private final VehicleParkingService parkingService; private Set boardingAreaRefTags = Set.of(); private DataImportIssueStore issueStore = DataImportIssueStore.NOOP; private EdgeNamer edgeNamer = new DefaultNamer(); @@ -27,9 +29,10 @@ public class OsmModuleBuilder { private int maxAreaNodes; private StreetLimitationParameters streetLimitationParameters = new StreetLimitationParameters(); - OsmModuleBuilder(Collection providers, Graph graph) { + OsmModuleBuilder(Collection providers, Graph graph, VehicleParkingService parkingService) { this.providers = providers; this.graph = graph; + this.parkingService = parkingService; } public OsmModuleBuilder withBoardingAreaRefTags(Set boardingAreaRefTags) { diff --git a/application/src/main/java/org/opentripplanner/netex/NetexModule.java b/application/src/main/java/org/opentripplanner/netex/NetexModule.java index 4c45131389f..199b05f626b 100644 --- a/application/src/main/java/org/opentripplanner/netex/NetexModule.java +++ b/application/src/main/java/org/opentripplanner/netex/NetexModule.java @@ -14,6 +14,7 @@ import org.opentripplanner.model.impl.OtpTransitServiceBuilder; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.vehicle_parking.VehicleParkingHelper; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.transit.service.TimetableRepository; @@ -29,6 +30,7 @@ public class NetexModule implements GraphBuilderModule { private final Graph graph; private final TimetableRepository timetableRepository; + private final VehicleParkingService parkingService; private final DataImportIssueStore issueStore; /** @@ -42,6 +44,7 @@ public class NetexModule implements GraphBuilderModule { public NetexModule( Graph graph, TimetableRepository timetableRepository, + VehicleParkingService parkingService, DataImportIssueStore issueStore, int subwayAccessTime, ServiceDateInterval transitPeriodLimit, @@ -49,6 +52,7 @@ public NetexModule( ) { this.graph = graph; this.timetableRepository = timetableRepository; + this.parkingService = parkingService; this.issueStore = issueStore; this.subwayAccessTime = subwayAccessTime; this.transitPeriodLimit = transitPeriodLimit; @@ -103,7 +107,7 @@ public void buildGraph() { timetableRepository.validateTimeZones(); var lots = transitBuilder.vehicleParkings(); - graph.getVehicleParkingService().updateVehicleParking(lots, List.of()); + parkingService.updateVehicleParking(lots, List.of()); var linker = new VehicleParkingHelper(graph); lots.forEach(linker::linkVehicleParkingToGraph); } diff --git a/application/src/main/java/org/opentripplanner/routing/graph/Graph.java b/application/src/main/java/org/opentripplanner/routing/graph/Graph.java index 04266476ae5..70ce563700c 100644 --- a/application/src/main/java/org/opentripplanner/routing/graph/Graph.java +++ b/application/src/main/java/org/opentripplanner/routing/graph/Graph.java @@ -22,7 +22,6 @@ import org.opentripplanner.routing.graph.index.StreetIndex; import org.opentripplanner.routing.linking.VertexLinker; import org.opentripplanner.routing.services.notes.StreetNotesService; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetEdge; import org.opentripplanner.street.model.vertex.TransitStopVertex; @@ -111,7 +110,6 @@ public class Graph implements Serializable { // static variable in CompactElevationProfile in SerializedGraphObject private double distanceBetweenElevationSamples; - private final VehicleParkingService vehicleParkingService = new VehicleParkingService(); private FareService fareService; /** @@ -362,10 +360,6 @@ public void setDistanceBetweenElevationSamples(double distanceBetweenElevationSa CompactElevationProfile.setDistanceBetweenSamplesM(distanceBetweenElevationSamples); } - public VehicleParkingService getVehicleParkingService() { - return vehicleParkingService; - } - public FareService getFareService() { return fareService; } diff --git a/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java b/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java index 49b43856011..14b5d1e04e2 100644 --- a/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java +++ b/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java @@ -22,6 +22,7 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graphfinder.GraphFinder; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeService; @@ -96,6 +97,8 @@ public interface OtpServerRequestContext { VehicleRentalService vehicleRentalService(); + VehicleParkingService getVehicleParkingService(); + TransitTuningParameters transitTuningParameters(); RaptorTuningParameters raptorTuningParameters(); @@ -147,4 +150,5 @@ default DataOverlayContext dataOverlayContext(RouteRequest request) { @Nullable SorlandsbanenNorwayService sorlandsbanenService(); + } From cdb5ea1e981728e0516a536cd1c3384af85571e7 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Fri, 8 Nov 2024 12:55:49 +0100 Subject: [PATCH 041/169] Update wiring of parking service --- .../VehicleParkingGroupsLayerTest.java | 10 +++--- .../VehicleParkingsLayerTest.java | 6 ++-- .../module/configure/GraphBuilderFactory.java | 4 +++ .../module/configure/GraphBuilderModules.java | 24 ++++++++++++-- .../graph_builder/module/osm/OsmModule.java | 12 +++++-- .../module/osm/OsmModuleBuilder.java | 7 +++- .../netex/configure/NetexConfigure.java | 3 ++ .../api/OtpServerRequestContext.java | 1 - .../configure/ConstructApplication.java | 6 ++++ .../ConstructApplicationFactory.java | 5 +++ .../configure/ConstructApplicationModule.java | 3 ++ .../server/DefaultServerRequestContext.java | 11 +++++++ .../configure/UpdaterConfigurator.java | 19 +++++------ .../opentripplanner/ConstantsForTests.java | 16 +++++++--- .../opentripplanner/TestServerContext.java | 6 ++++ .../apis/gtfs/GraphQLIntegrationTest.java | 28 ++++++++-------- .../LegacyRouteRequestMapperTest.java | 3 +- .../routerequest/RouteRequestMapperTest.java | 3 +- .../mapping/TripRequestMapperTest.java | 2 ++ .../OsmBoardingLocationsModuleTest.java | 3 +- .../module/StreetLinkerModuleTest.java | 10 +++++- .../module/TestStreetLinkerModule.java | 10 +++++- .../module/VehicleParkingLinkingTest.java | 3 +- .../islandpruning/IslandPruningUtils.java | 6 +++- .../module/linking/LinkingTest.java | 3 +- .../module/osm/OsmModuleTest.java | 32 +++++++++++++------ .../module/osm/PlatformLinkerTest.java | 6 +++- .../module/osm/TriangleInequalityTest.java | 6 +++- .../module/osm/UnconnectedAreasTest.java | 3 +- .../module/osm/UnroutableTest.java | 6 +++- .../transit/speed_test/SpeedTest.java | 3 ++ .../VehicleParkingUpdaterTest.java | 25 +++++---------- 32 files changed, 200 insertions(+), 85 deletions(-) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java index 95ad7ea713e..bd0f2b8c37a 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java @@ -19,7 +19,6 @@ import org.opentripplanner.framework.i18n.TranslatedString; import org.opentripplanner.inspector.vector.KeyValue; import org.opentripplanner.inspector.vector.LayerParameters; -import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.vehicle_parking.VehicleParking; import org.opentripplanner.routing.vehicle_parking.VehicleParkingGroup; import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; @@ -90,8 +89,7 @@ public void setUp() { @Test public void vehicleParkingGroupGeometryTest() { - Graph graph = new Graph(); - VehicleParkingService service = graph.getVehicleParkingService(); + VehicleParkingService service = new VehicleParkingService(); service.updateVehicleParking(List.of(vehicleParking), List.of()); var config = @@ -116,7 +114,7 @@ public void vehicleParkingGroupGeometryTest() { var tiles = VectorTileConfig.mapVectorTilesParameters(nodeAdapter, "vectorTiles"); assertEquals(1, tiles.layers().size()); var builder = new VehicleParkingGroupsLayerBuilderWithPublicGeometry( - graph, + service, tiles.layers().get(0), Locale.US ); @@ -171,11 +169,11 @@ private static class VehicleParkingGroupsLayerBuilderWithPublicGeometry extends VehicleParkingGroupsLayerBuilder { public VehicleParkingGroupsLayerBuilderWithPublicGeometry( - Graph graph, + VehicleParkingService service, LayerParameters layerParameters, Locale locale ) { - super(graph, layerParameters, locale); + super(service, layerParameters, locale); } @Override diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java index b63c9c51bc6..376486c5e8b 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java @@ -23,7 +23,6 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.TranslatedString; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; -import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.vehicle_parking.VehicleParking; import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; @@ -86,8 +85,7 @@ public void setUp() { @Test public void vehicleParkingGeometryTest() { - Graph graph = new Graph(); - VehicleParkingService service = graph.getVehicleParkingService(); + VehicleParkingService service = new VehicleParkingService(); service.updateVehicleParking(List.of(vehicleParking), List.of()); var config = @@ -111,7 +109,7 @@ public void vehicleParkingGeometryTest() { var nodeAdapter = newNodeAdapterForTest(config); var tiles = VectorTileConfig.mapVectorTilesParameters(nodeAdapter, "vectorTiles"); assertEquals(1, tiles.layers().size()); - var builder = new VehicleParkingsLayerBuilder(graph, tiles.layers().getFirst(), Locale.US); + var builder = new VehicleParkingsLayerBuilder(service, tiles.layers().getFirst(), Locale.US); List geometries = builder.getGeometries(new Envelope(0.99, 1.01, 1.99, 2.01)); diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java index d0d359cea3e..da7ce85b647 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java @@ -30,6 +30,7 @@ import org.opentripplanner.gtfs.graphbuilder.GtfsModule; import org.opentripplanner.netex.NetexModule; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.street.model.StreetLimitationParameters; @@ -87,6 +88,9 @@ Builder stopConsolidationRepository( @Nullable StopConsolidationRepository stopConsolidationRepository ); + @BindsInstance + Builder vehicleParkingService(VehicleParkingService parkingService); + @BindsInstance Builder streetLimitationParameters(StreetLimitationParameters streetLimitationParameters); diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java index 080d69c571e..cb063129b68 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java @@ -43,6 +43,7 @@ import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.api.request.preference.WalkPreferences; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.street.model.StreetLimitationParameters; import org.opentripplanner.transit.service.TimetableRepository; @@ -59,6 +60,7 @@ static OsmModule provideOsmModule( GraphBuilderDataSources dataSources, BuildConfig config, Graph graph, + VehicleParkingService parkingService, DataImportIssueStore issueStore, StreetLimitationParameters streetLimitationParameters ) { @@ -76,7 +78,7 @@ static OsmModule provideOsmModule( } return OsmModule - .of(providers, graph) + .of(providers, graph, parkingService) .withEdgeNamer(config.edgeNamer) .withAreaVisibility(config.areaVisibility) .withPlatformEntriesLinking(config.platformEntriesLinking) @@ -139,12 +141,14 @@ static NetexModule provideNetexModule( BuildConfig config, Graph graph, TimetableRepository timetableRepository, + VehicleParkingService parkingService, DataImportIssueStore issueStore ) { return new NetexConfigure(config) .createNetexModule( dataSources.getNetexConfiguredDatasource(), timetableRepository, + parkingService, graph, issueStore ); @@ -155,10 +159,17 @@ static NetexModule provideNetexModule( static StreetLinkerModule provideStreetLinkerModule( BuildConfig config, Graph graph, + VehicleParkingService parkingService, TimetableRepository timetableRepository, DataImportIssueStore issueStore ) { - return new StreetLinkerModule(graph, timetableRepository, issueStore, config.areaVisibility); + return new StreetLinkerModule( + graph, + parkingService, + timetableRepository, + issueStore, + config.areaVisibility + ); } @Provides @@ -166,6 +177,7 @@ static StreetLinkerModule provideStreetLinkerModule( static PruneIslands providePruneIslands( BuildConfig config, Graph graph, + VehicleParkingService parkingService, TimetableRepository timetableRepository, DataImportIssueStore issueStore ) { @@ -173,7 +185,13 @@ static PruneIslands providePruneIslands( graph, timetableRepository, issueStore, - new StreetLinkerModule(graph, timetableRepository, issueStore, config.areaVisibility) + new StreetLinkerModule( + graph, + parkingService, + timetableRepository, + issueStore, + config.areaVisibility + ) ); pruneIslands.setPruningThresholdIslandWithoutStops( config.islandPruning.pruningThresholdIslandWithoutStops diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java index 3e338b0cfb8..64f8a4ec4b3 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java @@ -79,11 +79,19 @@ public class OsmModule implements GraphBuilderModule { this.parkingService = parkingService; } - public static OsmModuleBuilder of(Collection providers, Graph graph, VehicleParkingService service) { + public static OsmModuleBuilder of( + Collection providers, + Graph graph, + VehicleParkingService service + ) { return new OsmModuleBuilder(providers, graph, service); } - public static OsmModuleBuilder of(OsmProvider provider, Graph graph, VehicleParkingService service) { + public static OsmModuleBuilder of( + OsmProvider provider, + Graph graph, + VehicleParkingService service + ) { return of(List.of(provider), graph, service); } diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java index 4c80f3db795..aa97408ba66 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java @@ -29,7 +29,11 @@ public class OsmModuleBuilder { private int maxAreaNodes; private StreetLimitationParameters streetLimitationParameters = new StreetLimitationParameters(); - OsmModuleBuilder(Collection providers, Graph graph, VehicleParkingService parkingService) { + OsmModuleBuilder( + Collection providers, + Graph graph, + VehicleParkingService parkingService + ) { this.providers = providers; this.graph = graph; this.parkingService = parkingService; @@ -84,6 +88,7 @@ public OsmModule build() { return new OsmModule( providers, graph, + parkingService, issueStore, streetLimitationParameters, new OsmProcessingParameters( diff --git a/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java b/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java index 9ca6dc27b04..4510aa0f099 100644 --- a/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java +++ b/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java @@ -11,6 +11,7 @@ import org.opentripplanner.netex.config.NetexFeedParameters; import org.opentripplanner.netex.loader.NetexDataSourceHierarchy; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.transit.service.TimetableRepository; @@ -36,6 +37,7 @@ public NetexConfigure(BuildConfig builderParams) { public NetexModule createNetexModule( Iterable> netexSources, TimetableRepository timetableRepository, + VehicleParkingService parkingService, Graph graph, DataImportIssueStore issueStore ) { @@ -52,6 +54,7 @@ public NetexModule createNetexModule( return new NetexModule( graph, timetableRepository, + parkingService, issueStore, buildParams.getSubwayAccessTimeSeconds(), buildParams.getTransitServicePeriod(), diff --git a/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java b/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java index 14b5d1e04e2..b046bf34c97 100644 --- a/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java +++ b/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java @@ -150,5 +150,4 @@ default DataOverlayContext dataOverlayContext(RouteRequest request) { @Nullable SorlandsbanenNorwayService sorlandsbanenService(); - } diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java index 279c3c48368..643cc1fa1a6 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java @@ -18,6 +18,7 @@ import org.opentripplanner.routing.algorithm.raptoradapter.transit.mappers.TransitLayerMapper; import org.opentripplanner.routing.algorithm.raptoradapter.transit.mappers.TransitLayerUpdater; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleRepository; import org.opentripplanner.service.vehiclerental.VehicleRentalRepository; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; @@ -163,6 +164,7 @@ private void setupTransitRoutingServer() { graph(), realtimeVehicleRepository(), vehicleRentalRepository(), + vehicleParkingService(), timetableRepository(), routerConfig().updaterConfig() ); @@ -266,6 +268,10 @@ public VehicleRentalRepository vehicleRentalRepository() { return factory.vehicleRentalRepository(); } + public VehicleParkingService vehicleParkingService() { + return factory.vehicleParkingService(); + } + public Graph graph() { return factory.graph(); } diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java index 7191b82e814..0d9874d6ca0 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java @@ -18,6 +18,7 @@ import org.opentripplanner.raptor.configure.RaptorConfig; import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripSchedule; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleRepository; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.configure.RealtimeVehicleRepositoryModule; @@ -74,6 +75,7 @@ public interface ConstructApplicationFactory { RealtimeVehicleRepository realtimeVehicleRepository(); RealtimeVehicleService realtimeVehicleService(); VehicleRentalRepository vehicleRentalRepository(); + VehicleParkingService vehicleParkingService(); VehicleRentalService vehicleRentalService(); DataImportIssueSummary dataImportIssueSummary(); @@ -116,6 +118,9 @@ interface Builder { @BindsInstance Builder worldEnvelopeRepository(WorldEnvelopeRepository worldEnvelopeRepository); + @BindsInstance + Builder worldEnvelopeRepository(VehicleParkingService vehicleParkingService); + @BindsInstance Builder stopConsolidationRepository( @Nullable StopConsolidationRepository stopConsolidationRepository diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java index ab0f242f834..5b748a310bc 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java @@ -15,6 +15,7 @@ import org.opentripplanner.raptor.configure.RaptorConfig; import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripSchedule; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeService; @@ -37,6 +38,7 @@ OtpServerRequestContext providesServerContext( WorldEnvelopeService worldEnvelopeService, RealtimeVehicleService realtimeVehicleService, VehicleRentalService vehicleRentalService, + VehicleParkingService vehicleParkingService, List rideHailingServices, @Nullable StopConsolidationService stopConsolidationService, StreetLimitationParametersService streetLimitationParametersService, @@ -59,6 +61,7 @@ OtpServerRequestContext providesServerContext( worldEnvelopeService, realtimeVehicleService, vehicleRentalService, + vehicleParkingService, emissionsService, sorlandsbanenService, routerConfig.flexParameters(), diff --git a/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java b/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java index 9f38db5c420..4a432ca7e73 100644 --- a/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java +++ b/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java @@ -20,6 +20,7 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.service.DefaultRoutingService; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeService; @@ -47,6 +48,7 @@ public class DefaultServerRequestContext implements OtpServerRequestContext { private final WorldEnvelopeService worldEnvelopeService; private final RealtimeVehicleService realtimeVehicleService; private final VehicleRentalService vehicleRentalService; + private final VehicleParkingService vehicleParkingService; private final EmissionsService emissionsService; @Nullable @@ -73,6 +75,7 @@ private DefaultServerRequestContext( WorldEnvelopeService worldEnvelopeService, RealtimeVehicleService realtimeVehicleService, VehicleRentalService vehicleRentalService, + VehicleParkingService vehicleParkingService, @Nullable EmissionsService emissionsService, @Nullable SorlandsbanenNorwayService sorlandsbanenService, List rideHailingServices, @@ -90,6 +93,7 @@ private DefaultServerRequestContext( this.tileRendererManager = tileRendererManager; this.vectorTileConfig = vectorTileConfig; this.vehicleRentalService = vehicleRentalService; + this.vehicleParkingService = vehicleParkingService; this.flexParameters = flexParameters; this.traverseVisitor = traverseVisitor; this.routeRequestDefaults = routeRequestDefaults; @@ -117,6 +121,7 @@ public static DefaultServerRequestContext create( WorldEnvelopeService worldEnvelopeService, RealtimeVehicleService realtimeVehicleService, VehicleRentalService vehicleRentalService, + VehicleParkingService vehicleParkingService, @Nullable EmissionsService emissionsService, @Nullable SorlandsbanenNorwayService sorlandsbanenService, FlexParameters flexParameters, @@ -138,6 +143,7 @@ public static DefaultServerRequestContext create( worldEnvelopeService, realtimeVehicleService, vehicleRentalService, + vehicleParkingService, emissionsService, sorlandsbanenService, rideHailingServices, @@ -201,6 +207,11 @@ public VehicleRentalService vehicleRentalService() { return vehicleRentalService; } + @Override + public VehicleParkingService getVehicleParkingService() { + return vehicleParkingService; + } + @Override public TransitTuningParameters transitTuningParameters() { return transitRoutingConfig; diff --git a/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java b/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java index feea541741c..a51599f2f33 100644 --- a/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java +++ b/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java @@ -11,6 +11,7 @@ import org.opentripplanner.model.TimetableSnapshot; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleRepository; import org.opentripplanner.service.vehiclerental.VehicleRentalRepository; import org.opentripplanner.transit.service.TimetableRepository; @@ -49,6 +50,7 @@ public class UpdaterConfigurator { private final UpdatersParameters updatersParameters; private final RealtimeVehicleRepository realtimeVehicleRepository; private final VehicleRentalRepository vehicleRentalRepository; + private final VehicleParkingService vehicleParkingService; private SiriTimetableSnapshotSource siriTimetableSnapshotSource = null; private TimetableSnapshotSource gtfsTimetableSnapshotSource = null; @@ -56,6 +58,7 @@ private UpdaterConfigurator( Graph graph, RealtimeVehicleRepository realtimeVehicleRepository, VehicleRentalRepository vehicleRentalRepository, + VehicleParkingService vehicleParkingService, TimetableRepository timetableRepository, UpdatersParameters updatersParameters ) { @@ -64,12 +67,14 @@ private UpdaterConfigurator( this.vehicleRentalRepository = vehicleRentalRepository; this.timetableRepository = timetableRepository; this.updatersParameters = updatersParameters; + this.vehicleParkingService = vehicleParkingService; } public static void configure( Graph graph, RealtimeVehicleRepository realtimeVehicleRepository, VehicleRentalRepository vehicleRentalRepository, + VehicleParkingService vehicleParkingService, TimetableRepository timetableRepository, UpdatersParameters updatersParameters ) { @@ -77,6 +82,7 @@ public static void configure( graph, realtimeVehicleRepository, vehicleRentalRepository, + vehicleParkingService, timetableRepository, updatersParameters ) @@ -195,22 +201,13 @@ private List createUpdatersFromConfig() { openingHoursCalendarService ); updaters.add( - new VehicleParkingUpdater( - configItem, - source, - graph.getLinker(), - graph.getVehicleParkingService() - ) + new VehicleParkingUpdater(configItem, source, graph.getLinker(), vehicleParkingService) ); } case AVAILABILITY_ONLY -> { var source = AvailabilityDatasourceFactory.create(configItem); updaters.add( - new VehicleParkingAvailabilityUpdater( - configItem, - source, - graph.getVehicleParkingService() - ) + new VehicleParkingAvailabilityUpdater(configItem, source, vehicleParkingService) ); } } diff --git a/application/src/test/java/org/opentripplanner/ConstantsForTests.java b/application/src/test/java/org/opentripplanner/ConstantsForTests.java index aeacc11eca4..b1d1080043c 100644 --- a/application/src/test/java/org/opentripplanner/ConstantsForTests.java +++ b/application/src/test/java/org/opentripplanner/ConstantsForTests.java @@ -31,6 +31,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.linking.LinkingDirection; import org.opentripplanner.routing.linking.VertexLinker; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.street.StreetVehicleRentalLink; @@ -135,7 +136,7 @@ public static TestOtpModel buildNewPortlandGraph(boolean withElevation) { { OsmProvider osmProvider = new OsmProvider(PORTLAND_CENTRAL_OSM, false); OsmModule osmModule = OsmModule - .of(osmProvider, graph) + .of(osmProvider, graph, new VehicleParkingService()) .withStaticParkAndRide(true) .withStaticBikeParkAndRide(true) .build(); @@ -184,7 +185,7 @@ public static TestOtpModel buildOsmGraph(File osmFile) { var timetableRepository = new TimetableRepository(siteRepository, deduplicator); // Add street data from OSM OsmProvider osmProvider = new OsmProvider(osmFile, true); - OsmModule osmModule = OsmModule.of(osmProvider, graph).build(); + OsmModule osmModule = OsmModule.of(osmProvider, graph, new VehicleParkingService()).build(); osmModule.buildGraph(); return new TestOtpModel(graph, timetableRepository); } catch (Exception e) { @@ -226,12 +227,13 @@ public static TestOtpModel buildNewMinimalNetexGraph() { try { var deduplicator = new Deduplicator(); var siteRepository = new SiteRepository(); + var parkingService = new VehicleParkingService(); var graph = new Graph(deduplicator); var timetableRepository = new TimetableRepository(siteRepository, deduplicator); // Add street data from OSM { OsmProvider osmProvider = new OsmProvider(OSLO_EAST_OSM, false); - OsmModule osmModule = OsmModule.of(osmProvider, graph).build(); + OsmModule osmModule = OsmModule.of(osmProvider, graph, parkingService).build(); osmModule.buildGraph(); } // Add transit data from Netex @@ -244,7 +246,13 @@ public static TestOtpModel buildNewMinimalNetexGraph() { var sources = List.of(new ConfiguredDataSource<>(NETEX_MINIMAL_DATA_SOURCE, netexConfig)); new NetexConfigure(buildConfig) - .createNetexModule(sources, timetableRepository, graph, DataImportIssueStore.NOOP) + .createNetexModule( + sources, + timetableRepository, + parkingService, + graph, + DataImportIssueStore.NOOP + ) .buildGraph(); } // Link transit stops to streets diff --git a/application/src/test/java/org/opentripplanner/TestServerContext.java b/application/src/test/java/org/opentripplanner/TestServerContext.java index 38bbd81316b..4efc74901e5 100644 --- a/application/src/test/java/org/opentripplanner/TestServerContext.java +++ b/application/src/test/java/org/opentripplanner/TestServerContext.java @@ -9,6 +9,7 @@ import org.opentripplanner.ext.emissions.EmissionsService; import org.opentripplanner.raptor.configure.RaptorConfig; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; @@ -54,6 +55,7 @@ public static OtpServerRequestContext createServerContext( createWorldEnvelopeService(), createRealtimeVehicleService(transitService), createVehicleRentalService(), + createVehicleParkingService(), createEmissionsService(), null, routerConfig.flexParameters(), @@ -87,6 +89,10 @@ public static VehicleRentalService createVehicleRentalService() { return new DefaultVehicleRentalService(); } + public static VehicleParkingService createVehicleParkingService() { + return new VehicleParkingService(); + } + public static EmissionsService createEmissionsService() { return new DefaultEmissionsService(new EmissionsDataModel()); } diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java index 5d79c24d05f..7700ae7baf0 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java @@ -69,6 +69,7 @@ import org.opentripplanner.routing.impl.TransitAlertServiceImpl; import org.opentripplanner.routing.services.TransitAlertService; import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; @@ -140,22 +141,21 @@ class GraphQLIntegrationTest { private static GraphQLRequestContext context; private static final Deduplicator DEDUPLICATOR = new Deduplicator(); + private static final VehicleParkingService parkingService = new VehicleParkingService(); @BeforeAll static void setup() { - GRAPH - .getVehicleParkingService() - .updateVehicleParking( - List.of( - VehicleParking - .builder() - .id(id("parking-1")) - .coordinate(WgsCoordinate.GREENWICH) - .name(NonLocalizedString.ofNullable("parking")) - .build() - ), - List.of() - ); + parkingService.updateVehicleParking( + List.of( + VehicleParking + .builder() + .id(id("parking-1")) + .coordinate(WgsCoordinate.GREENWICH) + .name(NonLocalizedString.ofNullable("parking")) + .build() + ), + List.of() + ); var siteRepository = TEST_MODEL.siteRepositoryBuilder(); STOP_LOCATIONS.forEach(siteRepository::withRegularStop); @@ -315,7 +315,7 @@ public Set getRoutesForStop(StopLocation stop) { new TestRoutingService(List.of(i1)), transitService, new DefaultFareService(), - GRAPH.getVehicleParkingService(), + parkingService, defaultVehicleRentalService, realtimeVehicleService, finder, diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java index d81b5cf0d43..993883893b9 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java @@ -34,6 +34,7 @@ import org.opentripplanner.routing.api.request.preference.VehicleParkingPreferences; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graphfinder.GraphFinder; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.street.search.TraverseMode; @@ -60,7 +61,7 @@ class LegacyRouteRequestMapperTest implements PlanTestConstants { new TestRoutingService(List.of()), transitService, new DefaultFareService(), - graph.getVehicleParkingService(), + new VehicleParkingService(), new DefaultVehicleRentalService(), new DefaultRealtimeVehicleService(transitService), GraphFinder.getInstance(graph, transitService::findRegularStops), diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java index cf1dc759a3e..8c9541e7e4b 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java @@ -30,6 +30,7 @@ import org.opentripplanner.routing.api.request.preference.ItineraryFilterDebugProfile; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graphfinder.GraphFinder; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.transit.model.framework.FeedScopedId; @@ -70,7 +71,7 @@ class RouteRequestMapperTest { new TestRoutingService(List.of()), transitService, new DefaultFareService(), - graph.getVehicleParkingService(), + new VehicleParkingService(), new DefaultVehicleRentalService(), new DefaultRealtimeVehicleService(transitService), GraphFinder.getInstance(graph, transitService::findRegularStops), diff --git a/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java index 372cda4f308..141e8d2c818 100644 --- a/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java @@ -46,6 +46,7 @@ import org.opentripplanner.routing.api.request.via.ViaLocation; import org.opentripplanner.routing.core.VehicleRoutingOptimizeType; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeRepository; @@ -144,6 +145,7 @@ void setup() { new DefaultWorldEnvelopeService(new DefaultWorldEnvelopeRepository()), new DefaultRealtimeVehicleService(transitService), new DefaultVehicleRentalService(), + new VehicleParkingService(), new DefaultEmissionsService(new EmissionsDataModel()), null, RouterConfig.DEFAULT.flexParameters(), diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java index a2e7ebef402..3ac86be3fba 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java @@ -14,6 +14,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model.edge.AreaEdge; import org.opentripplanner.street.model.edge.BoardingLocationToStopLink; import org.opentripplanner.street.model.edge.Edge; @@ -83,7 +84,7 @@ void addAndLinkBoardingLocations(boolean areaVisibility, Set linkedVerti new NonLocalizedString("bus stop not connected to street network") ); var osmModule = OsmModule - .of(provider, graph) + .of(provider, graph, new VehicleParkingService()) .withBoardingAreaRefTags(Set.of("ref", "ref:IFOPT")) .withAreaVisibility(areaVisibility) .build(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java index fd7996aefe3..407d2f630c7 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java @@ -18,6 +18,7 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.model.StopTime; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetTransitStopLink; @@ -170,7 +171,14 @@ public TestModel() { graph.addVertex(stopVertex); graph.hasStreets = true; - module = new StreetLinkerModule(graph, timetableRepository, DataImportIssueStore.NOOP, false); + module = + new StreetLinkerModule( + graph, + new VehicleParkingService(), + timetableRepository, + DataImportIssueStore.NOOP, + false + ); assertFalse(stopVertex.isConnectedToGraph()); assertTrue(stopVertex.getIncoming().isEmpty()); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java index 49627c6231d..224e23b5d8e 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java @@ -2,12 +2,20 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.transit.service.TimetableRepository; public class TestStreetLinkerModule { /** For test only */ public static void link(Graph graph, TimetableRepository model) { - new StreetLinkerModule(graph, model, DataImportIssueStore.NOOP, false).buildGraph(); + new StreetLinkerModule( + graph, + new VehicleParkingService(), + model, + DataImportIssueStore.NOOP, + false + ) + .buildGraph(); } } diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java index d7f75f530d1..cad2584914a 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java @@ -10,6 +10,7 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.vehicle_parking.VehicleParkingHelper; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.routing.vehicle_parking.VehicleParkingTestGraphData; import org.opentripplanner.street.model.StreetTraversalPermission; import org.opentripplanner.street.model._data.StreetModelForTest; @@ -169,7 +170,7 @@ public void removeVehicleParkingWithOneEntranceAndNonExistingVertexTest() { ) .build(); - var vehicleParkingService = graph.getVehicleParkingService(); + var vehicleParkingService = new VehicleParkingService(); vehicleParkingService.updateVehicleParking(List.of(vehicleParking), List.of()); helper.linkVehicleParkingToGraph(vehicleParking); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java b/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java index c59adad6fd5..fcd76fc5e0a 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java @@ -5,6 +5,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.transit.model.framework.Deduplicator; import org.opentripplanner.transit.service.SiteRepository; import org.opentripplanner.transit.service.TimetableRepository; @@ -24,7 +25,10 @@ static Graph buildOsmGraph( var timetableRepository = new TimetableRepository(new SiteRepository(), deduplicator); // Add street data from OSM OsmProvider osmProvider = new OsmProvider(osmFile, true); - OsmModule osmModule = OsmModule.of(osmProvider, graph).withEdgeNamer(new TestNamer()).build(); + OsmModule osmModule = OsmModule + .of(osmProvider, graph, new VehicleParkingService()) + .withEdgeNamer(new TestNamer()) + .build(); osmModule.buildGraph(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java index 6bda39e5058..e4bb6f4ad9e 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java @@ -21,6 +21,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model.StreetTraversalPermission; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.edge.StreetEdge; @@ -157,7 +158,7 @@ public static TestOtpModel buildGraphNoTransit() { File file = ResourceLoader.of(LinkingTest.class).file("columbus.osm.pbf"); OsmProvider provider = new OsmProvider(file, false); - OsmModule osmModule = OsmModule.of(provider, gg).build(); + OsmModule osmModule = OsmModule.of(provider, gg, new VehicleParkingService()).build(); osmModule.buildGraph(); return new TestOtpModel(gg, timetableRepository); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java index 0b3d762ed6e..a9ac1a10e54 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java @@ -32,6 +32,7 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.impl.GraphPathFinder; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetEdge; import org.opentripplanner.street.model.vertex.BarrierVertex; @@ -56,7 +57,10 @@ public void testGraphBuilder() { OsmProvider provider = new OsmProvider(file, true); - OsmModule osmModule = OsmModule.of(provider, gg).withAreaVisibility(true).build(); + OsmModule osmModule = OsmModule + .of(provider, gg, new VehicleParkingService()) + .withAreaVisibility(true) + .build(); osmModule.buildGraph(); @@ -112,7 +116,10 @@ public void testBuildGraphDetailed() { File file = RESOURCE_LOADER.file("NYC_small.osm.pbf"); OsmProvider provider = new OsmProvider(file, true); - OsmModule osmModule = OsmModule.of(provider, gg).withAreaVisibility(true).build(); + OsmModule osmModule = OsmModule + .of(provider, gg, new VehicleParkingService()) + .withAreaVisibility(true) + .build(); osmModule.buildGraph(); @@ -275,9 +282,8 @@ public void testLocalizedString() { @Test void addParkingLotsToService() { - Graph graph = buildParkingLots(); + var service = buildParkingLots().service; - var service = graph.getVehicleParkingService(); assertEquals(11, service.getVehicleParkings().count()); assertEquals(6, service.getBikeParks().count()); assertEquals(5, service.getCarParks().count()); @@ -285,7 +291,7 @@ void addParkingLotsToService() { @Test void createArtificalEntrancesToUnlikedParkingLots() { - Graph graph = buildParkingLots(); + var graph = buildParkingLots().graph; graph .getVerticesOfType(VehicleParkingEntranceVertex.class) @@ -307,7 +313,7 @@ void testBarrierAtEnd() { File file = RESOURCE_LOADER.file("accessno-at-end.pbf"); OsmProvider provider = new OsmProvider(file, false); - OsmModule loader = OsmModule.of(provider, graph).build(); + OsmModule loader = OsmModule.of(provider, graph, new VehicleParkingService()).build(); loader.buildGraph(); Vertex start = graph.getVertex(VertexLabel.osm(1)); @@ -322,22 +328,25 @@ void testBarrierAtEnd() { assertEquals(barrier.getBarrierPermissions(), ALL); } - private Graph buildParkingLots() { + private BuildResult buildParkingLots() { var graph = new Graph(); + var service = new VehicleParkingService(); var providers = Stream .of("B+R.osm.pbf", "P+R.osm.pbf") .map(RESOURCE_LOADER::file) .map(f -> new OsmProvider(f, false)) .toList(); var module = OsmModule - .of(providers, graph) + .of(providers, graph, service) .withStaticParkAndRide(true) .withStaticBikeParkAndRide(true) .build(); module.buildGraph(); - return graph; + return new BuildResult(graph, service); } + private record BuildResult(Graph graph, VehicleParkingService service) {} + /** * This reads test file with area and tests if it can be routed if visibility is used and if it * isn't @@ -354,7 +363,10 @@ private void testBuildingAreas(boolean skipVisibility) { File file = RESOURCE_LOADER.file("usf_area.osm.pbf"); OsmProvider provider = new OsmProvider(file, false); - OsmModule loader = OsmModule.of(provider, graph).withAreaVisibility(!skipVisibility).build(); + OsmModule loader = OsmModule + .of(provider, graph, new VehicleParkingService()) + .withAreaVisibility(!skipVisibility) + .build(); loader.buildGraph(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java index 2a5d4e8a163..b72dceb5814 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java @@ -6,6 +6,7 @@ import org.junit.jupiter.api.Test; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model.edge.AreaEdge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; @@ -29,7 +30,10 @@ public void testLinkEntriesToPlatforms() { OsmProvider provider = new OsmProvider(file, false); - OsmModule osmModule = OsmModule.of(provider, gg).withPlatformEntriesLinking(true).build(); + OsmModule osmModule = OsmModule + .of(provider, gg, new VehicleParkingService()) + .withPlatformEntriesLinking(true) + .build(); osmModule.buildGraph(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java index bbf59ad9c53..1778e7306b5 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java @@ -21,6 +21,7 @@ import org.opentripplanner.routing.api.request.request.filter.AllowAllTransitFilter; import org.opentripplanner.routing.api.request.request.filter.TransitFilter; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; @@ -50,7 +51,10 @@ public static void onlyOnce() { File file = ResourceLoader.of(TriangleInequalityTest.class).file("NYC_small.osm.pbf"); OsmProvider provider = new OsmProvider(file, true); - OsmModule osmModule = OsmModule.of(provider, graph).withAreaVisibility(true).build(); + OsmModule osmModule = OsmModule + .of(provider, graph, new VehicleParkingService()) + .withAreaVisibility(true) + .build(); osmModule.buildGraph(); } diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java index 492d04a0007..8c98261340c 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java @@ -13,6 +13,7 @@ import org.opentripplanner.graph_builder.module.TestStreetLinkerModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model.edge.StreetVehicleParkingLink; import org.opentripplanner.street.model.edge.VehicleParkingEdge; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; @@ -162,7 +163,7 @@ private Graph buildOsmGraph(String osmFileName, DataImportIssueStore issueStore) var timetableRepository = new TimetableRepository(siteRepository, deduplicator); OsmProvider provider = new OsmProvider(RESOURCE_LOADER.file(osmFileName), false); OsmModule loader = OsmModule - .of(provider, graph) + .of(provider, graph, new VehicleParkingService()) .withIssueStore(issueStore) .withAreaVisibility(true) .withStaticParkAndRide(true) diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java index b759ace9b94..17b29a1585f 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java @@ -10,6 +10,7 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.api.request.StreetMode; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; @@ -37,7 +38,10 @@ public void setUp() throws Exception { var osmDataFile = ResourceLoader.of(UnroutableTest.class).file("bridge_construction.osm.pbf"); OsmProvider provider = new OsmProvider(osmDataFile, true); - OsmModule osmBuilder = OsmModule.of(provider, graph).withAreaVisibility(true).build(); + OsmModule osmBuilder = OsmModule + .of(provider, graph, new VehicleParkingService()) + .withAreaVisibility(true) + .build(); osmBuilder.buildGraph(); } diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java index f0e87b046c5..29d5d27fb3d 100644 --- a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java +++ b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java @@ -22,6 +22,7 @@ import org.opentripplanner.routing.framework.DebugTimingAggregator; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graph.SerializedGraphObject; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.standalone.OtpStartupInfo; @@ -98,6 +99,7 @@ public SpeedTest( graph, new DefaultRealtimeVehicleService(transitService), new DefaultVehicleRentalService(), + new VehicleParkingService(), timetableRepository, config.updatersConfig ); @@ -120,6 +122,7 @@ public SpeedTest( TestServerContext.createWorldEnvelopeService(), TestServerContext.createRealtimeVehicleService(transitService), TestServerContext.createVehicleRentalService(), + TestServerContext.createVehicleParkingService(), TestServerContext.createEmissionsService(), null, config.flexConfig, diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java index 44a37943d8b..2f09fca8216 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java @@ -12,6 +12,7 @@ import org.mockito.Mockito; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; import org.opentripplanner.routing.vehicle_parking.VehicleParkingTestGraphData; @@ -35,6 +36,7 @@ class VehicleParkingUpdaterTest { private DefaultRealTimeUpdateContext realTimeUpdateContext; private VehicleParkingUpdater vehicleParkingUpdater; + private VehicleParkingService vehicleParkingService; @BeforeEach @SuppressWarnings("unchecked") @@ -43,6 +45,7 @@ public void setup() { graphData.initGraph(); graph = graphData.getGraph(); timetableRepository = graphData.getTimetableRepository(); + vehicleParkingService = new VehicleParkingService(); realTimeUpdateContext = new DefaultRealTimeUpdateContext(graph, timetableRepository); dataSource = (DataSource) Mockito.mock(DataSource.class); @@ -73,12 +76,7 @@ public String configRef() { } }; vehicleParkingUpdater = - new VehicleParkingUpdater( - parameters, - dataSource, - graph.getLinker(), - graph.getVehicleParkingService() - ); + new VehicleParkingUpdater(parameters, dataSource, graph.getLinker(), vehicleParkingService); } @Test @@ -106,8 +104,7 @@ void updateVehicleParkingTest() { assertVehicleParkingsInGraph(1); - var vehicleParkingInGraph = graph - .getVehicleParkingService() + var vehicleParkingInGraph = vehicleParkingService .getVehicleParkings() .findFirst() .orElseThrow(); @@ -123,8 +120,7 @@ void updateVehicleParkingTest() { assertVehicleParkingsInGraph(1); - vehicleParkingInGraph = - graph.getVehicleParkingService().getVehicleParkings().findFirst().orElseThrow(); + vehicleParkingInGraph = vehicleParkingService.getVehicleParkings().findFirst().orElseThrow(); assertEquals(vehiclePlaces, vehicleParkingInGraph.getAvailability()); assertEquals(vehiclePlaces, vehicleParkingInGraph.getCapacity()); } @@ -159,7 +155,7 @@ void addNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, graph.getVehicleParkingService().getVehicleParkings().count()); + assertEquals(1, vehicleParkingService.getVehicleParkings().count()); assertVehicleParkingNotLinked(); } @@ -176,7 +172,6 @@ void updateNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - var vehicleParkingService = graph.getVehicleParkingService(); assertEquals(1, vehicleParkingService.getVehicleParkings().count()); assertEquals( vehiclePlaces, @@ -214,7 +209,6 @@ void deleteNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - var vehicleParkingService = graph.getVehicleParkingService(); assertEquals(1, vehicleParkingService.getVehicleParkings().count()); when(dataSource.getUpdates()).thenReturn(List.of()); @@ -261,10 +255,7 @@ private void assertVehicleParkingsInGraph(int vehicleParkingNumber) { ); } - assertEquals( - vehicleParkingNumber, - graph.getVehicleParkingService().getVehicleParkings().count() - ); + assertEquals(vehicleParkingNumber, vehicleParkingService.getVehicleParkings().count()); } private void runUpdaterOnce() { From 585ba4e686363ad0b86a64d62a77f5d48878d231 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Fri, 8 Nov 2024 21:03:31 +0100 Subject: [PATCH 042/169] Serialized vehicle parking to serialized graph --- .../ext/parkAndRideApi/ParkAndRideResource.java | 2 +- .../ext/restapi/resources/Routers.java | 2 +- .../ext/vectortiles/VectorTilesResource.java | 4 ++-- .../apis/gtfs/GraphQLRequestContext.java | 4 ++-- .../apis/transmodel/support/GqlUtil.java | 2 +- .../routing/graph/SerializedGraphObject.java | 4 ++++ .../vehicle_parking/VehicleParkingService.java | 4 ++++ .../org/opentripplanner/standalone/OTPMain.java | 1 + .../standalone/api/OtpServerRequestContext.java | 2 +- .../standalone/configure/ConstructApplication.java | 4 +++- .../configure/ConstructApplicationFactory.java | 2 +- .../standalone/configure/LoadApplication.java | 5 +++++ .../configure/LoadApplicationFactory.java | 4 ++++ .../server/DefaultServerRequestContext.java | 2 +- .../apis/gtfs/GraphQLIntegrationTest.java | 2 +- .../routerequest/LegacyRouteRequestMapperTest.java | 2 +- .../routerequest/RouteRequestMapperTest.java | 2 +- .../routing/graph/GraphSerializationTest.java | 14 +++++++++++++- 18 files changed, 47 insertions(+), 15 deletions(-) diff --git a/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java b/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java index ec1ac7348d7..fcf40a7b2f8 100644 --- a/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java +++ b/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java @@ -36,7 +36,7 @@ public ParkAndRideResource( */ @Deprecated @PathParam("ignoreRouterId") String ignoreRouterId ) { - this.vehicleParkingService = serverContext.getVehicleParkingService(); + this.vehicleParkingService = serverContext.vehicleParkingService(); // TODO OTP2 - Why are we using the DirectGraphFinder here, not just // - serverContext.graphFinder(). This needs at least a comment! diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/resources/Routers.java b/application/src/ext/java/org/opentripplanner/ext/restapi/resources/Routers.java index d5dae967568..6c805560b8b 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/resources/Routers.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/resources/Routers.java @@ -66,7 +66,7 @@ private ApiRouterInfo getRouterInfo() { serverContext.graph(), serverContext.transitService(), serverContext.vehicleRentalService(), - serverContext.getVehicleParkingService(), + serverContext.vehicleParkingService(), serverContext.worldEnvelopeService().envelope().orElseThrow() ); } catch (GraphNotFoundException e) { diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java index ada19316866..779875b8675 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java @@ -140,12 +140,12 @@ private static LayerBuilder createLayerBuilder( layerParameters ); case VehicleParking -> new VehicleParkingsLayerBuilder( - context.getVehicleParkingService(), + context.vehicleParkingService(), layerParameters, locale ); case VehicleParkingGroup -> new VehicleParkingGroupsLayerBuilder( - context.getVehicleParkingService(), + context.vehicleParkingService(), layerParameters, locale ); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java b/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java index 084a1e2dfc9..c3f9fc0656a 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java @@ -14,8 +14,8 @@ public record GraphQLRequestContext( RoutingService routingService, TransitService transitService, FareService fareService, - VehicleParkingService vehicleParkingService, VehicleRentalService vehicleRentalService, + VehicleParkingService vehicleParkingService, RealtimeVehicleService realTimeVehicleService, GraphFinder graphFinder, RouteRequest defaultRouteRequest @@ -25,8 +25,8 @@ public static GraphQLRequestContext ofServerContext(OtpServerRequestContext cont context.routingService(), context.transitService(), context.graph().getFareService(), - context.getVehicleParkingService(), context.vehicleRentalService(), + context.vehicleParkingService(), context.realtimeVehicleService(), context.graphFinder(), context.defaultRouteRequest() diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java b/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java index a9f5414683b..90ba7156cd6 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java @@ -38,7 +38,7 @@ public static VehicleParkingService getVehicleParkingService( DataFetchingEnvironment environment ) { return ((TransmodelRequestContext) environment.getContext()).getServerContext() - .getVehicleParkingService(); + .vehicleParkingService(); } public static GraphFinder getGraphFinder(DataFetchingEnvironment environment) { diff --git a/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java b/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java index 0843124131b..b518a47eedf 100644 --- a/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java +++ b/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java @@ -25,6 +25,7 @@ import org.opentripplanner.model.projectinfo.GraphFileHeader; import org.opentripplanner.model.projectinfo.OtpProjectInfo; import org.opentripplanner.routing.graph.kryosupport.KryoBuilder; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.standalone.config.RouterConfig; @@ -79,11 +80,13 @@ public class SerializedGraphObject implements Serializable { private final int routingTripPatternCounter; public final EmissionsDataModel emissionsDataModel; public final StreetLimitationParameters streetLimitationParameters; + public final VehicleParkingService vehicleParkingService; public SerializedGraphObject( Graph graph, TimetableRepository timetableRepository, WorldEnvelopeRepository worldEnvelopeRepository, + VehicleParkingService vehicleParkingService, BuildConfig buildConfig, RouterConfig routerConfig, DataImportIssueSummary issueSummary, @@ -95,6 +98,7 @@ public SerializedGraphObject( this.edges = graph.getEdges(); this.timetableRepository = timetableRepository; this.worldEnvelopeRepository = worldEnvelopeRepository; + this.vehicleParkingService = vehicleParkingService; this.buildConfig = buildConfig; this.routerConfig = routerConfig; this.issueSummary = issueSummary; diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingService.java b/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingService.java index b0c08a2309b..7348caf7589 100644 --- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingService.java +++ b/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingService.java @@ -3,6 +3,7 @@ import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.Multimap; +import jakarta.inject.Inject; import java.io.Serializable; import java.util.Collection; import java.util.HashSet; @@ -19,6 +20,9 @@ */ public class VehicleParkingService implements Serializable { + @Inject + public VehicleParkingService() {} + /** * To ensure that his is thread-safe, the set stored here should always be immutable. *

diff --git a/application/src/main/java/org/opentripplanner/standalone/OTPMain.java b/application/src/main/java/org/opentripplanner/standalone/OTPMain.java index a8096d806ba..fd283abd8cd 100644 --- a/application/src/main/java/org/opentripplanner/standalone/OTPMain.java +++ b/application/src/main/java/org/opentripplanner/standalone/OTPMain.java @@ -152,6 +152,7 @@ private static void startOTPServer(CommandLineParameters cli) { app.graph(), app.timetableRepository(), app.worldEnvelopeRepository(), + app.vehicleParkingService(), config.buildConfig(), config.routerConfig(), DataImportIssueSummary.combine(graphBuilder.issueSummary(), app.dataImportIssueSummary()), diff --git a/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java b/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java index b046bf34c97..3ad83462612 100644 --- a/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java +++ b/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java @@ -97,7 +97,7 @@ public interface OtpServerRequestContext { VehicleRentalService vehicleRentalService(); - VehicleParkingService getVehicleParkingService(); + VehicleParkingService vehicleParkingService(); TransitTuningParameters transitTuningParameters(); diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java index 643cc1fa1a6..23fa92a0217 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java @@ -76,6 +76,7 @@ public class ConstructApplication { GraphBuilderDataSources graphBuilderDataSources, DataImportIssueSummary issueSummary, EmissionsDataModel emissionsDataModel, + VehicleParkingService vehicleParkingService, @Nullable StopConsolidationRepository stopConsolidationRepository, StreetLimitationParameters streetLimitationParameters ) { @@ -87,13 +88,14 @@ public class ConstructApplication { var graphVisualizer = cli.visualize ? new GraphVisualizer(graph) : null; this.factory = - DaggerConstructApplicationFactory + org.opentripplanner.standalone.configure.DaggerConstructApplicationFactory .builder() .configModel(config) .graph(graph) .timetableRepository(timetableRepository) .graphVisualizer(graphVisualizer) .worldEnvelopeRepository(worldEnvelopeRepository) + .vehicleParkingService(vehicleParkingService) .emissionsDataModel(emissionsDataModel) .dataImportIssueSummary(issueSummary) .stopConsolidationRepository(stopConsolidationRepository) diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java index 0d9874d6ca0..9af2f99c436 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java @@ -119,7 +119,7 @@ interface Builder { Builder worldEnvelopeRepository(WorldEnvelopeRepository worldEnvelopeRepository); @BindsInstance - Builder worldEnvelopeRepository(VehicleParkingService vehicleParkingService); + Builder vehicleParkingService(VehicleParkingService vehicleParkingService); @BindsInstance Builder stopConsolidationRepository( diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java index 300eb24f997..4cc774fc7ec 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java @@ -8,6 +8,7 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graph.SerializedGraphObject; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.CommandLineParameters; import org.opentripplanner.standalone.config.ConfigModel; @@ -56,6 +57,7 @@ public ConstructApplication appConstruction(SerializedGraphObject obj) { obj.graph, obj.timetableRepository, obj.worldEnvelopeRepository, + obj.vehicleParkingService, obj.issueSummary, obj.emissionsDataModel, obj.stopConsolidationRepository, @@ -69,6 +71,7 @@ public ConstructApplication appConstruction() { factory.emptyGraph(), factory.emptyTimetableRepository(), factory.emptyWorldEnvelopeRepository(), + factory.emptyVehicleParkingService(), DataImportIssueSummary.empty(), factory.emptyEmissionsDataModel(), factory.emptyStopConsolidationRepository(), @@ -91,6 +94,7 @@ private ConstructApplication createAppConstruction( Graph graph, TimetableRepository timetableRepository, WorldEnvelopeRepository worldEnvelopeRepository, + VehicleParkingService vehicleParkingService, DataImportIssueSummary issueSummary, @Nullable EmissionsDataModel emissionsDataModel, @Nullable StopConsolidationRepository stopConsolidationRepository, @@ -105,6 +109,7 @@ private ConstructApplication createAppConstruction( graphBuilderDataSources(), issueSummary, emissionsDataModel, + vehicleParkingService, stopConsolidationRepository, streetLimitationParameters ); diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java index 8d11d645c48..7d5ee01c72f 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java @@ -11,6 +11,7 @@ import org.opentripplanner.ext.stopconsolidation.configure.StopConsolidationRepositoryModule; import org.opentripplanner.graph_builder.GraphBuilderDataSources; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.configure.WorldEnvelopeRepositoryModule; import org.opentripplanner.standalone.config.CommandLineParameters; @@ -58,6 +59,9 @@ public interface LoadApplicationFactory { @Singleton StreetLimitationParameters emptyStreetLimitationParameters(); + @Singleton + VehicleParkingService emptyVehicleParkingService(); + @Component.Builder interface Builder { @BindsInstance diff --git a/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java b/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java index 4a432ca7e73..1e906a507d3 100644 --- a/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java +++ b/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java @@ -208,7 +208,7 @@ public VehicleRentalService vehicleRentalService() { } @Override - public VehicleParkingService getVehicleParkingService() { + public VehicleParkingService vehicleParkingService() { return vehicleParkingService; } diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java index 7700ae7baf0..5d12b85a45b 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java @@ -315,8 +315,8 @@ public Set getRoutesForStop(StopLocation stop) { new TestRoutingService(List.of(i1)), transitService, new DefaultFareService(), - parkingService, defaultVehicleRentalService, + parkingService, realtimeVehicleService, finder, new RouteRequest() diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java index 993883893b9..eb184f17c9d 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java @@ -61,8 +61,8 @@ class LegacyRouteRequestMapperTest implements PlanTestConstants { new TestRoutingService(List.of()), transitService, new DefaultFareService(), - new VehicleParkingService(), new DefaultVehicleRentalService(), + new VehicleParkingService(), new DefaultRealtimeVehicleService(transitService), GraphFinder.getInstance(graph, transitService::findRegularStops), new RouteRequest() diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java index 8c9541e7e4b..521ed211b7a 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java @@ -71,8 +71,8 @@ class RouteRequestMapperTest { new TestRoutingService(List.of()), transitService, new DefaultFareService(), - new VehicleParkingService(), new DefaultVehicleRentalService(), + new VehicleParkingService(), new DefaultRealtimeVehicleService(transitService), GraphFinder.getInstance(graph, transitService::findRegularStops), new RouteRequest() diff --git a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java index 47568fa1252..d9d7f178c29 100644 --- a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java +++ b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java @@ -23,6 +23,7 @@ import org.opentripplanner.ext.emissions.EmissionsDataModel; import org.opentripplanner.framework.geometry.HashGridSpatialIndex; import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; @@ -67,7 +68,14 @@ public void testRoundTripSerializationForGTFSGraph() throws Exception { TestOtpModel model = ConstantsForTests.buildNewPortlandGraph(true); var weRepo = new DefaultWorldEnvelopeRepository(); var emissionsDataModel = new EmissionsDataModel(); - testRoundTrip(model.graph(), model.timetableRepository(), weRepo, emissionsDataModel); + var parkingService = new VehicleParkingService(); + testRoundTrip( + model.graph(), + model.timetableRepository(), + weRepo, + parkingService, + emissionsDataModel + ); } /** @@ -78,10 +86,12 @@ public void testRoundTripSerializationForNetexGraph() throws Exception { TestOtpModel model = ConstantsForTests.buildNewMinimalNetexGraph(); var worldEnvelopeRepository = new DefaultWorldEnvelopeRepository(); var emissionsDataModel = new EmissionsDataModel(); + var parkingService = new VehicleParkingService(); testRoundTrip( model.graph(), model.timetableRepository(), worldEnvelopeRepository, + parkingService, emissionsDataModel ); } @@ -182,6 +192,7 @@ private void testRoundTrip( Graph originalGraph, TimetableRepository originalTimetableRepository, WorldEnvelopeRepository worldEnvelopeRepository, + VehicleParkingService vehicleParkingService, EmissionsDataModel emissionsDataModel ) throws Exception { // Now round-trip the graph through serialization. @@ -192,6 +203,7 @@ private void testRoundTrip( originalGraph, originalTimetableRepository, worldEnvelopeRepository, + vehicleParkingService, BuildConfig.DEFAULT, RouterConfig.DEFAULT, DataImportIssueSummary.empty(), From d00dbdeea2ab3afdd6b69b4e002d0d37e963cb30 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Fri, 8 Nov 2024 21:42:17 +0100 Subject: [PATCH 043/169] Inject into graph builder --- .../java/org/opentripplanner/graph_builder/GraphBuilder.java | 3 +++ .../standalone/configure/ConstructApplication.java | 1 + 2 files changed, 4 insertions(+) diff --git a/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java b/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java index bc83ad2a8af..324a56bd18b 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java @@ -18,6 +18,7 @@ import org.opentripplanner.graph_builder.model.GraphBuilderModule; import org.opentripplanner.graph_builder.module.configure.DaggerGraphBuilderFactory; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.street.model.StreetLimitationParameters; @@ -63,6 +64,7 @@ public static GraphBuilder create( Graph graph, TimetableRepository timetableRepository, WorldEnvelopeRepository worldEnvelopeRepository, + VehicleParkingService vehicleParkingService, @Nullable EmissionsDataModel emissionsDataModel, @Nullable StopConsolidationRepository stopConsolidationRepository, StreetLimitationParameters streetLimitationParameters, @@ -82,6 +84,7 @@ public static GraphBuilder create( .graph(graph) .timetableRepository(timetableRepository) .worldEnvelopeRepository(worldEnvelopeRepository) + .vehicleParkingService(vehicleParkingService) .stopConsolidationRepository(stopConsolidationRepository) .streetLimitationParameters(streetLimitationParameters) .dataSources(dataSources) diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java index 23fa92a0217..667a464c5a5 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java @@ -130,6 +130,7 @@ public GraphBuilder createGraphBuilder() { graph(), timetableRepository(), factory.worldEnvelopeRepository(), + factory.vehicleParkingService(), factory.emissionsDataModel(), factory.stopConsolidationRepository(), factory.streetLimitationParameters(), From be0196a6c7c59d53cf248c5a7d96b91d28ce718f Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Fri, 8 Nov 2024 22:05:09 +0100 Subject: [PATCH 044/169] Fix test --- .../standalone/configure/ConstructApplication.java | 2 +- .../module/TestStreetLinkerModule.java | 14 +++++++++++--- .../module/VehicleParkingLinkingTest.java | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java index 667a464c5a5..a7baa345e36 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java @@ -88,7 +88,7 @@ public class ConstructApplication { var graphVisualizer = cli.visualize ? new GraphVisualizer(graph) : null; this.factory = - org.opentripplanner.standalone.configure.DaggerConstructApplicationFactory + DaggerConstructApplicationFactory .builder() .configModel(config) .graph(graph) diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java index 224e23b5d8e..7333a98afe1 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java @@ -8,11 +8,19 @@ public class TestStreetLinkerModule { /** For test only */ - public static void link(Graph graph, TimetableRepository model) { + public static void link(Graph graph, TimetableRepository timetableRepository) { + link(graph, new VehicleParkingService(), timetableRepository); + } + + public static void link( + Graph graph, + VehicleParkingService vehicleParkingService, + TimetableRepository timetableRepository + ) { new StreetLinkerModule( graph, - new VehicleParkingService(), - model, + vehicleParkingService, + timetableRepository, DataImportIssueStore.NOOP, false ) diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java index cad2584914a..42f016055be 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java @@ -176,7 +176,7 @@ public void removeVehicleParkingWithOneEntranceAndNonExistingVertexTest() { graph.remove(A); - TestStreetLinkerModule.link(graph, timetableRepository); + TestStreetLinkerModule.link(graph, vehicleParkingService, timetableRepository); assertEquals(0, graph.getVerticesOfType(VehicleParkingEntranceVertex.class).size()); From 1ce4a7919661665f8573fab158f20561b3511c3b Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Sun, 10 Nov 2024 09:43:20 +0100 Subject: [PATCH 045/169] Move VehicleParking into 'services' package --- .../VehicleParkingGroupsLayerTest.java | 10 +++++----- .../vehicleparkings/VehicleParkingsLayerTest.java | 8 ++++---- .../ext/vehicleparking/bikely/BikelyUpdaterTest.java | 2 +- .../vehicleparking/hslpark/HslParkUpdaterTest.java | 2 +- .../ext/parkAndRideApi/ParkAndRideResource.java | 4 ++-- .../ext/restapi/mapping/PlaceMapper.java | 2 +- .../ext/restapi/model/ApiRouterInfo.java | 2 +- .../ext/restapi/model/ApiTravelOptionsMaker.java | 2 +- .../DigitransitVehicleParkingPropertyMapper.java | 2 +- .../StadtnaviVehicleParkingPropertyMapper.java | 4 ++-- .../vehicleparkings/VehicleParkingAndGroup.java | 4 ++-- .../VehicleParkingGroupsLayerBuilder.java | 2 +- .../vehicleparkings/VehicleParkingsLayerBuilder.java | 4 ++-- .../ext/vehicleparking/bikeep/BikeepUpdater.java | 6 +++--- .../ext/vehicleparking/bikely/BikelyUpdater.java | 8 ++++---- .../hslpark/HslFacilitiesDownloader.java | 4 ++-- .../hslpark/HslHubToVehicleParkingGroupMapper.java | 2 +- .../vehicleparking/hslpark/HslHubsDownloader.java | 2 +- .../hslpark/HslParkToVehicleParkingMapper.java | 8 ++++---- .../ext/vehicleparking/hslpark/HslParkUpdater.java | 8 ++++---- .../parkapi/BicycleParkAPIUpdater.java | 2 +- .../vehicleparking/parkapi/CarParkAPIUpdater.java | 2 +- .../ext/vehicleparking/parkapi/ParkAPIUpdater.java | 6 +++--- .../apis/gtfs/GraphQLRequestContext.java | 2 +- .../apis/gtfs/datafetchers/BikeParkImpl.java | 2 +- .../apis/gtfs/datafetchers/CarParkImpl.java | 2 +- .../apis/gtfs/datafetchers/NodeTypeResolver.java | 2 +- .../apis/gtfs/datafetchers/PlaceImpl.java | 2 +- .../datafetchers/PlaceInterfaceTypeResolver.java | 2 +- .../apis/gtfs/datafetchers/QueryTypeImpl.java | 5 ++--- .../apis/gtfs/datafetchers/VehicleParkingImpl.java | 6 +++--- .../apis/gtfs/generated/GraphQLDataFetchers.java | 6 +++--- .../apis/transmodel/model/stop/BikeParkType.java | 2 +- .../transmodel/model/stop/PlaceInterfaceType.java | 2 +- .../apis/transmodel/support/GqlUtil.java | 2 +- .../opentripplanner/graph_builder/GraphBuilder.java | 2 +- .../issues/ParkAndRideEntranceRemoved.java | 2 +- .../graph_builder/module/StreetLinkerModule.java | 6 +++--- .../module/configure/GraphBuilderFactory.java | 2 +- .../module/configure/GraphBuilderModules.java | 2 +- .../graph_builder/module/osm/OsmModule.java | 4 ++-- .../graph_builder/module/osm/OsmModuleBuilder.java | 2 +- .../graph_builder/module/osm/ParkingProcessor.java | 6 +++--- .../vector/vertex/VertexPropertyMapper.java | 4 ++-- .../model/impl/OtpTransitServiceBuilder.java | 2 +- .../model/plan/VehicleParkingWithEntrance.java | 4 ++-- .../java/org/opentripplanner/netex/NetexModule.java | 4 ++-- .../netex/configure/NetexConfigure.java | 2 +- .../netex/mapping/VehicleParkingMapper.java | 4 ++-- .../preference/filter/VehicleParkingFilter.java | 2 +- .../preference/filter/VehicleParkingSelect.java | 2 +- .../routing/graph/SerializedGraphObject.java | 2 +- .../graphfinder/PlaceFinderTraverseVisitor.java | 2 +- .../vehicleparking}/VehicleParkingService.java | 4 +++- .../vehicleparking/model}/VehicleParking.java | 2 +- .../model}/VehicleParkingEntrance.java | 2 +- .../vehicleparking/model}/VehicleParkingGroup.java | 2 +- .../model}/VehicleParkingGroupBuilder.java | 2 +- .../vehicleparking/model}/VehicleParkingHelper.java | 2 +- .../vehicleparking/model}/VehicleParkingSpaces.java | 2 +- .../vehicleparking/model}/VehicleParkingState.java | 2 +- .../standalone/api/OtpServerRequestContext.java | 2 +- .../standalone/configure/ConstructApplication.java | 2 +- .../configure/ConstructApplicationFactory.java | 2 +- .../configure/ConstructApplicationModule.java | 2 +- .../standalone/configure/LoadApplication.java | 2 +- .../standalone/configure/LoadApplicationFactory.java | 2 +- .../server/DefaultServerRequestContext.java | 2 +- .../street/model/edge/StreetVehicleParkingLink.java | 2 +- .../street/model/edge/VehicleParkingEdge.java | 2 +- .../model/vertex/VehicleParkingEntranceVertex.java | 4 ++-- .../street/model/vertex/VertexFactory.java | 4 ++-- .../updater/configure/UpdaterConfigurator.java | 2 +- .../VehicleParkingAvailabilityUpdater.java | 6 +++--- .../VehicleParkingDataSourceFactory.java | 2 +- .../vehicle_parking/VehicleParkingUpdater.java | 8 ++++---- .../java/org/opentripplanner/ConstantsForTests.java | 2 +- .../java/org/opentripplanner/TestServerContext.java | 2 +- .../apis/gtfs/GraphQLIntegrationTest.java | 4 ++-- .../routerequest/LegacyRouteRequestMapperTest.java | 2 +- .../mapping/routerequest/RouteRequestMapperTest.java | 2 +- .../transmodel/mapping/TripRequestMapperTest.java | 2 +- .../module/OsmBoardingLocationsModuleTest.java | 2 +- .../graph_builder/module/StreetLinkerModuleTest.java | 2 +- .../graph_builder/module/TestStreetLinkerModule.java | 2 +- .../module/VehicleParkingLinkingTest.java | 6 +++--- .../module/islandpruning/IslandPruningUtils.java | 2 +- .../graph_builder/module/linking/LinkingTest.java | 2 +- .../graph_builder/module/osm/OsmModuleTest.java | 2 +- .../graph_builder/module/osm/PlatformLinkerTest.java | 2 +- .../module/osm/TriangleInequalityTest.java | 2 +- .../module/osm/UnconnectedAreasTest.java | 2 +- .../graph_builder/module/osm/UnroutableTest.java | 2 +- .../netex/mapping/VehicleParkingMapperTest.java | 4 ++-- .../routing/algorithm/GraphRoutingTest.java | 6 +++--- .../routing/graph/GraphSerializationTest.java | 2 +- .../routing/graphfinder/StreetGraphFinderTest.java | 2 +- .../vehicleparking}/VehicleParkingHelperTest.java | 6 ++++-- .../vehicleparking}/VehicleParkingTestGraphData.java | 2 +- .../vehicleparking}/VehicleParkingTestUtil.java | 4 +++- .../street/model/_data/StreetModelForTest.java | 2 +- .../model/edge/StreetVehicleParkingLinkTest.java | 4 ++-- .../street/model/edge/VehicleParkingEdgeTest.java | 4 ++-- .../model/edge/VehicleParkingPreferredTagsTest.java | 4 ++-- .../transit/speed_test/SpeedTest.java | 2 +- .../VehicleParkingAvailabilityUpdaterTest.java | 6 +++--- .../vehicle_parking/VehicleParkingUpdaterTest.java | 12 ++++++------ 107 files changed, 176 insertions(+), 171 deletions(-) rename application/src/main/java/org/opentripplanner/{routing/vehicle_parking => service/vehicleparking}/VehicleParkingService.java (94%) rename application/src/main/java/org/opentripplanner/{routing/vehicle_parking => service/vehicleparking/model}/VehicleParking.java (99%) rename application/src/main/java/org/opentripplanner/{routing/vehicle_parking => service/vehicleparking/model}/VehicleParkingEntrance.java (98%) rename application/src/main/java/org/opentripplanner/{routing/vehicle_parking => service/vehicleparking/model}/VehicleParkingGroup.java (97%) rename application/src/main/java/org/opentripplanner/{routing/vehicle_parking => service/vehicleparking/model}/VehicleParkingGroupBuilder.java (93%) rename application/src/main/java/org/opentripplanner/{routing/vehicle_parking => service/vehicleparking/model}/VehicleParkingHelper.java (98%) rename application/src/main/java/org/opentripplanner/{routing/vehicle_parking => service/vehicleparking/model}/VehicleParkingSpaces.java (98%) rename application/src/main/java/org/opentripplanner/{routing/vehicle_parking => service/vehicleparking/model}/VehicleParkingState.java (80%) rename application/src/test/java/org/opentripplanner/{routing/vehicle_parking => service/vehicleparking}/VehicleParkingHelperTest.java (92%) rename application/src/test/java/org/opentripplanner/{routing/vehicle_parking => service/vehicleparking}/VehicleParkingTestGraphData.java (96%) rename application/src/test/java/org/opentripplanner/{routing/vehicle_parking => service/vehicleparking}/VehicleParkingTestUtil.java (85%) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java index bd0f2b8c37a..62df252538f 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java @@ -19,11 +19,11 @@ import org.opentripplanner.framework.i18n.TranslatedString; import org.opentripplanner.inspector.vector.KeyValue; import org.opentripplanner.inspector.vector.LayerParameters; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingGroup; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; import org.opentripplanner.standalone.config.routerconfig.VectorTileConfig; import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; import org.opentripplanner.transit.model.framework.FeedScopedId; diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java index 376486c5e8b..c02d1bf9d6b 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java @@ -23,10 +23,10 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.TranslatedString; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; import org.opentripplanner.standalone.config.routerconfig.VectorTileConfig; import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; import org.opentripplanner.transit.model.framework.Deduplicator; diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vehicleparking/bikely/BikelyUpdaterTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vehicleparking/bikely/BikelyUpdaterTest.java index 569db85f33b..66e0a0fda9a 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vehicleparking/bikely/BikelyUpdaterTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vehicleparking/bikely/BikelyUpdaterTest.java @@ -8,7 +8,7 @@ import java.time.Duration; import java.util.Locale; import org.junit.jupiter.api.Test; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; import org.opentripplanner.test.support.ResourceLoader; import org.opentripplanner.transit.model.basic.Locales; import org.opentripplanner.transit.model.framework.FeedScopedId; diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkUpdaterTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkUpdaterTest.java index 2226a988d20..fd584951586 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkUpdaterTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkUpdaterTest.java @@ -14,7 +14,7 @@ import org.opentripplanner._support.time.ZoneIds; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; import org.opentripplanner.model.calendar.openinghours.OsmOpeningHoursSupport; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; import org.opentripplanner.test.support.ResourceLoader; import org.opentripplanner.transit.model.framework.Deduplicator; diff --git a/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java b/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java index fcf40a7b2f8..cf86f803aba 100644 --- a/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java +++ b/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java @@ -14,8 +14,8 @@ import org.opentripplanner.framework.i18n.I18NString; import org.opentripplanner.routing.graphfinder.DirectGraphFinder; import org.opentripplanner.routing.graphfinder.GraphFinder; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.standalone.api.OtpServerRequestContext; /** diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/mapping/PlaceMapper.java b/application/src/ext/java/org/opentripplanner/ext/restapi/mapping/PlaceMapper.java index 28ceb0b84e3..059b0f93812 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/mapping/PlaceMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/mapping/PlaceMapper.java @@ -15,7 +15,7 @@ import org.opentripplanner.model.plan.Place; import org.opentripplanner.model.plan.StopArrival; import org.opentripplanner.model.plan.VehicleParkingWithEntrance; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.transit.model.site.RegularStop; public class PlaceMapper { diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java index aa072cfaed0..ba5dd39ea59 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java @@ -5,7 +5,7 @@ import org.locationtech.jts.geom.Geometry; import org.opentripplanner.ext.restapi.mapping.ModeMapper; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.worldenvelope.model.WorldEnvelope; import org.opentripplanner.transit.service.TransitService; diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java index 40302032d4f..49a011eee77 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java @@ -5,7 +5,7 @@ import java.util.Set; import org.opentripplanner.api.parameter.ApiRequestMode; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.transit.model.basic.TransitMode; import org.opentripplanner.transit.service.TransitService; diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/DigitransitVehicleParkingPropertyMapper.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/DigitransitVehicleParkingPropertyMapper.java index 951552e1fdc..702fbac9e07 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/DigitransitVehicleParkingPropertyMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/DigitransitVehicleParkingPropertyMapper.java @@ -7,7 +7,7 @@ import org.opentripplanner.apis.support.mapping.PropertyMapper; import org.opentripplanner.framework.i18n.I18NStringMapper; import org.opentripplanner.inspector.vector.KeyValue; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; public class DigitransitVehicleParkingPropertyMapper extends PropertyMapper { diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/StadtnaviVehicleParkingPropertyMapper.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/StadtnaviVehicleParkingPropertyMapper.java index bccc2b4de4d..8f745a4e633 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/StadtnaviVehicleParkingPropertyMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/StadtnaviVehicleParkingPropertyMapper.java @@ -9,8 +9,8 @@ import org.opentripplanner.framework.json.ObjectMappers; import org.opentripplanner.inspector.vector.KeyValue; import org.opentripplanner.model.calendar.openinghours.OsmOpeningHoursSupport; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; public class StadtnaviVehicleParkingPropertyMapper extends PropertyMapper { diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingAndGroup.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingAndGroup.java index 7093dbb3407..5968f000d2d 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingAndGroup.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingAndGroup.java @@ -1,8 +1,8 @@ package org.opentripplanner.ext.vectortiles.layers.vehicleparkings; import java.util.Collection; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingGroup; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; /** * Record that holds {@link VehicleParkingGroup} and a set of {@link VehicleParking} that belong to diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java index a33cada7465..6df19d61a8a 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java @@ -13,7 +13,7 @@ import org.opentripplanner.framework.geometry.GeometryUtils; import org.opentripplanner.inspector.vector.LayerBuilder; import org.opentripplanner.inspector.vector.LayerParameters; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; public class VehicleParkingGroupsLayerBuilder extends LayerBuilder { diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java index 49e081d0039..40d9c97e4d7 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java @@ -16,8 +16,8 @@ import org.opentripplanner.framework.geometry.GeometryUtils; import org.opentripplanner.inspector.vector.LayerBuilder; import org.opentripplanner.inspector.vector.LayerParameters; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; public class VehicleParkingsLayerBuilder extends LayerBuilder { diff --git a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/bikeep/BikeepUpdater.java b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/bikeep/BikeepUpdater.java index cd6a39fecd3..decbda7abf6 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/bikeep/BikeepUpdater.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/bikeep/BikeepUpdater.java @@ -7,9 +7,9 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.NonLocalizedString; import org.opentripplanner.framework.json.ObjectMappers; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.updater.spi.GenericJsonDataSource; import org.opentripplanner.utils.tostring.ToStringBuilder; diff --git a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/bikely/BikelyUpdater.java b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/bikely/BikelyUpdater.java index 2bed1121913..eba0547dbf5 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/bikely/BikelyUpdater.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/bikely/BikelyUpdater.java @@ -1,6 +1,6 @@ package org.opentripplanner.ext.vehicleparking.bikely; -import static org.opentripplanner.routing.vehicle_parking.VehicleParkingState.OPERATIONAL; +import static org.opentripplanner.service.vehicleparking.model.VehicleParkingState.OPERATIONAL; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -17,9 +17,9 @@ import org.opentripplanner.framework.io.OtpHttpClient; import org.opentripplanner.framework.io.OtpHttpClientFactory; import org.opentripplanner.framework.json.ObjectMappers; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; import org.opentripplanner.transit.model.basic.LocalizedMoney; import org.opentripplanner.transit.model.basic.Money; import org.opentripplanner.transit.model.framework.FeedScopedId; diff --git a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslFacilitiesDownloader.java b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslFacilitiesDownloader.java index dcf4ffe29d9..3d6c1943061 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslFacilitiesDownloader.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslFacilitiesDownloader.java @@ -13,8 +13,8 @@ import org.opentripplanner.framework.io.OtpHttpClient; import org.opentripplanner.framework.io.OtpHttpClientException; import org.opentripplanner.framework.io.OtpHttpClientFactory; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingGroup; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslHubToVehicleParkingGroupMapper.java b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslHubToVehicleParkingGroupMapper.java index 1ef0ef3597b..2c4dcad73d6 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslHubToVehicleParkingGroupMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslHubToVehicleParkingGroupMapper.java @@ -13,7 +13,7 @@ import org.opentripplanner.framework.i18n.I18NString; import org.opentripplanner.framework.i18n.NonLocalizedString; import org.opentripplanner.framework.i18n.TranslatedString; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingGroup; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslHubsDownloader.java b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslHubsDownloader.java index f1f98b6139c..62e76b65035 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslHubsDownloader.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslHubsDownloader.java @@ -12,7 +12,7 @@ import org.opentripplanner.framework.io.OtpHttpClient; import org.opentripplanner.framework.io.OtpHttpClientException; import org.opentripplanner.framework.io.OtpHttpClientFactory; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingGroup; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkToVehicleParkingMapper.java b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkToVehicleParkingMapper.java index 1f69458dd1f..c3e74f7285e 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkToVehicleParkingMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkToVehicleParkingMapper.java @@ -19,10 +19,10 @@ import org.opentripplanner.framework.i18n.TranslatedString; import org.opentripplanner.model.calendar.openinghours.OHCalendar; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingGroup; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkUpdater.java b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkUpdater.java index f5c5b33ef29..7933e968537 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkUpdater.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/hslpark/HslParkUpdater.java @@ -6,10 +6,10 @@ import org.opentripplanner.framework.io.JsonDataListDownloader; import org.opentripplanner.framework.io.OtpHttpClientFactory; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingGroup; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces.VehicleParkingSpacesBuilder; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces.VehicleParkingSpacesBuilder; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.updater.spi.DataSource; import org.slf4j.Logger; diff --git a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/BicycleParkAPIUpdater.java b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/BicycleParkAPIUpdater.java index 21898bc3956..76fd73d3c18 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/BicycleParkAPIUpdater.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/BicycleParkAPIUpdater.java @@ -2,7 +2,7 @@ import com.fasterxml.jackson.databind.JsonNode; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; /** * Vehicle parking updater class that extends the {@link ParkAPIUpdater}. Meant for reading bicycle diff --git a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/CarParkAPIUpdater.java b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/CarParkAPIUpdater.java index 445f6bfbda3..06064f4896a 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/CarParkAPIUpdater.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/CarParkAPIUpdater.java @@ -2,7 +2,7 @@ import com.fasterxml.jackson.databind.JsonNode; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; /** * Vehicle parking updater class that extends the {@link ParkAPIUpdater}. Meant for reading car diff --git a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/ParkAPIUpdater.java b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/ParkAPIUpdater.java index c7bd6631a48..3e206fc660d 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/ParkAPIUpdater.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehicleparking/parkapi/ParkAPIUpdater.java @@ -15,9 +15,9 @@ import org.opentripplanner.model.calendar.openinghours.OHCalendar; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; import org.opentripplanner.osm.OsmOpeningHoursParser; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.updater.spi.GenericJsonDataSource; import org.opentripplanner.utils.tostring.ToStringBuilder; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java b/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java index c3f9fc0656a..c3ca214b62f 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/GraphQLRequestContext.java @@ -4,8 +4,8 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.fares.FareService; import org.opentripplanner.routing.graphfinder.GraphFinder; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.standalone.api.OtpServerRequestContext; import org.opentripplanner.transit.service.TransitService; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BikeParkImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BikeParkImpl.java index 81166034ee5..725d6e49377 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BikeParkImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BikeParkImpl.java @@ -6,7 +6,7 @@ import org.opentripplanner.apis.gtfs.generated.GraphQLDataFetchers; import org.opentripplanner.framework.graphql.GraphQLUtils; import org.opentripplanner.model.calendar.openinghours.OHCalendar; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; public class BikeParkImpl implements GraphQLDataFetchers.GraphQLBikePark { diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/CarParkImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/CarParkImpl.java index ff990b4f65c..8947f589ca5 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/CarParkImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/CarParkImpl.java @@ -6,7 +6,7 @@ import org.opentripplanner.apis.gtfs.generated.GraphQLDataFetchers; import org.opentripplanner.framework.graphql.GraphQLUtils; import org.opentripplanner.model.calendar.openinghours.OHCalendar; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; public class CarParkImpl implements GraphQLDataFetchers.GraphQLCarPark { diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/NodeTypeResolver.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/NodeTypeResolver.java index 437d75e03e9..bb105be08fb 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/NodeTypeResolver.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/NodeTypeResolver.java @@ -12,7 +12,7 @@ import org.opentripplanner.routing.graphfinder.NearbyStop; import org.opentripplanner.routing.graphfinder.PatternAtStop; import org.opentripplanner.routing.graphfinder.PlaceAtDistance; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; import org.opentripplanner.transit.model.network.Route; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/PlaceImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/PlaceImpl.java index 145321f809c..abb3a607ab9 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/PlaceImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/PlaceImpl.java @@ -11,7 +11,7 @@ import org.opentripplanner.model.plan.Place; import org.opentripplanner.model.plan.StopArrival; import org.opentripplanner.model.plan.VertexType; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/PlaceInterfaceTypeResolver.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/PlaceInterfaceTypeResolver.java index cb2bfc77c32..a1f08fe3dc9 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/PlaceInterfaceTypeResolver.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/PlaceInterfaceTypeResolver.java @@ -5,7 +5,7 @@ import graphql.schema.GraphQLSchema; import graphql.schema.TypeResolver; import org.opentripplanner.routing.graphfinder.PatternAtStop; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; import org.opentripplanner.transit.model.site.RegularStop; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java index 221df2b8ec6..4f1400ab110 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java @@ -56,9 +56,8 @@ import org.opentripplanner.routing.graphfinder.PatternAtStop; import org.opentripplanner.routing.graphfinder.PlaceAtDistance; import org.opentripplanner.routing.graphfinder.PlaceType; -import org.opentripplanner.routing.services.TransitAlertService; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/VehicleParkingImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/VehicleParkingImpl.java index 0b55beac689..56bc62e2004 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/VehicleParkingImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/VehicleParkingImpl.java @@ -6,9 +6,9 @@ import org.opentripplanner.apis.gtfs.generated.GraphQLDataFetchers; import org.opentripplanner.framework.graphql.GraphQLUtils; import org.opentripplanner.model.calendar.openinghours.OHCalendar; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; public class VehicleParkingImpl implements GraphQLDataFetchers.GraphQLVehicleParking { diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index 7532faf28bd..87118c5efcc 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -48,11 +48,11 @@ import org.opentripplanner.routing.graphfinder.NearbyStop; import org.opentripplanner.routing.graphfinder.PatternAtStop; import org.opentripplanner.routing.graphfinder.PlaceAtDistance; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle.StopRelationship; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; import org.opentripplanner.service.vehiclerental.model.RentalVehicleEntityCounts; import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.RentalVehicleTypeCount; diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/BikeParkType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/BikeParkType.java index 470111513bf..8a9c965f4a2 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/BikeParkType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/BikeParkType.java @@ -6,7 +6,7 @@ import graphql.schema.GraphQLNonNull; import graphql.schema.GraphQLObjectType; import org.opentripplanner.apis.transmodel.mapping.TransitIdMapper; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; public class BikeParkType { diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/PlaceInterfaceType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/PlaceInterfaceType.java index 0b6238c119d..f05113f9f74 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/PlaceInterfaceType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/PlaceInterfaceType.java @@ -5,7 +5,7 @@ import graphql.schema.GraphQLInterfaceType; import graphql.schema.GraphQLNonNull; import graphql.schema.GraphQLSchema; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; import org.opentripplanner.transit.model.site.RegularStop; diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java b/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java index 90ba7156cd6..8e34470ed6a 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/support/GqlUtil.java @@ -12,7 +12,7 @@ import org.opentripplanner.apis.transmodel.mapping.TransitIdMapper; import org.opentripplanner.framework.graphql.GraphQLUtils; import org.opentripplanner.routing.graphfinder.GraphFinder; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.transit.service.TransitService; diff --git a/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java b/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java index 324a56bd18b..104a75593fa 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java @@ -18,7 +18,7 @@ import org.opentripplanner.graph_builder.model.GraphBuilderModule; import org.opentripplanner.graph_builder.module.configure.DaggerGraphBuilderFactory; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.street.model.StreetLimitationParameters; diff --git a/application/src/main/java/org/opentripplanner/graph_builder/issues/ParkAndRideEntranceRemoved.java b/application/src/main/java/org/opentripplanner/graph_builder/issues/ParkAndRideEntranceRemoved.java index 122f99ba488..0170d554358 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/issues/ParkAndRideEntranceRemoved.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/issues/ParkAndRideEntranceRemoved.java @@ -3,7 +3,7 @@ import org.locationtech.jts.geom.Geometry; import org.opentripplanner.framework.geometry.GeometryUtils; import org.opentripplanner.graph_builder.issue.api.DataImportIssue; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingEntrance; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingEntrance; public record ParkAndRideEntranceRemoved(VehicleParkingEntrance vehicleParkingEntrance) implements DataImportIssue { diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java b/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java index 1a299aa9141..eadad8dc9b4 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java @@ -11,9 +11,9 @@ import org.opentripplanner.graph_builder.model.GraphBuilderModule; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.linking.LinkingDirection; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingHelper; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetStationCentroidLink; import org.opentripplanner.street.model.edge.StreetTransitEntranceLink; diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java index da7ce85b647..8b95ce5d283 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java @@ -30,7 +30,7 @@ import org.opentripplanner.gtfs.graphbuilder.GtfsModule; import org.opentripplanner.netex.NetexModule; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.street.model.StreetLimitationParameters; diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java index cb063129b68..3cec9aaf7bf 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java @@ -43,7 +43,7 @@ import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.api.request.preference.WalkPreferences; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.street.model.StreetLimitationParameters; import org.opentripplanner.transit.service.TimetableRepository; diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java index 64f8a4ec4b3..b026171f557 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java @@ -25,8 +25,8 @@ import org.opentripplanner.osm.wayproperty.WayProperties; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.util.ElevationUtils; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.street.model.StreetLimitationParameters; import org.opentripplanner.street.model.StreetTraversalPermission; import org.opentripplanner.street.model.edge.StreetEdge; diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java index aa97408ba66..1f66fa65308 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java @@ -8,7 +8,7 @@ import org.opentripplanner.graph_builder.services.osm.EdgeNamer; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.street.model.StreetLimitationParameters; /** diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/ParkingProcessor.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/ParkingProcessor.java index f372f0c82e2..60655eeccc5 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/ParkingProcessor.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/ParkingProcessor.java @@ -24,9 +24,9 @@ import org.opentripplanner.osm.model.OsmNode; import org.opentripplanner.osm.model.OsmWithTags; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingHelper; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetEdge; import org.opentripplanner.street.model.edge.VehicleParkingEdge; diff --git a/application/src/main/java/org/opentripplanner/inspector/vector/vertex/VertexPropertyMapper.java b/application/src/main/java/org/opentripplanner/inspector/vector/vertex/VertexPropertyMapper.java index de700486c77..c1f0070eb86 100644 --- a/application/src/main/java/org/opentripplanner/inspector/vector/vertex/VertexPropertyMapper.java +++ b/application/src/main/java/org/opentripplanner/inspector/vector/vertex/VertexPropertyMapper.java @@ -9,8 +9,8 @@ import java.util.Set; import org.opentripplanner.apis.support.mapping.PropertyMapper; import org.opentripplanner.inspector.vector.KeyValue; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingEntrance; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingEntrance; import org.opentripplanner.service.vehiclerental.street.VehicleRentalPlaceVertex; import org.opentripplanner.street.model.vertex.BarrierVertex; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; diff --git a/application/src/main/java/org/opentripplanner/model/impl/OtpTransitServiceBuilder.java b/application/src/main/java/org/opentripplanner/model/impl/OtpTransitServiceBuilder.java index 3dd4a3db992..2b270e8afa4 100644 --- a/application/src/main/java/org/opentripplanner/model/impl/OtpTransitServiceBuilder.java +++ b/application/src/main/java/org/opentripplanner/model/impl/OtpTransitServiceBuilder.java @@ -26,7 +26,7 @@ import org.opentripplanner.model.transfer.ConstrainedTransfer; import org.opentripplanner.model.transfer.TransferPoint; import org.opentripplanner.routing.api.request.framework.TimePenalty; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.transit.model.basic.Notice; import org.opentripplanner.transit.model.framework.AbstractTransitEntity; import org.opentripplanner.transit.model.framework.DefaultEntityById; diff --git a/application/src/main/java/org/opentripplanner/model/plan/VehicleParkingWithEntrance.java b/application/src/main/java/org/opentripplanner/model/plan/VehicleParkingWithEntrance.java index 5d28bcd02f2..131ef4cad7c 100644 --- a/application/src/main/java/org/opentripplanner/model/plan/VehicleParkingWithEntrance.java +++ b/application/src/main/java/org/opentripplanner/model/plan/VehicleParkingWithEntrance.java @@ -1,7 +1,7 @@ package org.opentripplanner.model.plan; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingEntrance; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingEntrance; public class VehicleParkingWithEntrance { diff --git a/application/src/main/java/org/opentripplanner/netex/NetexModule.java b/application/src/main/java/org/opentripplanner/netex/NetexModule.java index 199b05f626b..7d0dcbe0335 100644 --- a/application/src/main/java/org/opentripplanner/netex/NetexModule.java +++ b/application/src/main/java/org/opentripplanner/netex/NetexModule.java @@ -13,8 +13,8 @@ import org.opentripplanner.model.calendar.ServiceDateInterval; import org.opentripplanner.model.impl.OtpTransitServiceBuilder; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingHelper; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.transit.service.TimetableRepository; diff --git a/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java b/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java index 4510aa0f099..47a51d580f4 100644 --- a/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java +++ b/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java @@ -11,7 +11,7 @@ import org.opentripplanner.netex.config.NetexFeedParameters; import org.opentripplanner.netex.loader.NetexDataSourceHierarchy; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.transit.service.TimetableRepository; diff --git a/application/src/main/java/org/opentripplanner/netex/mapping/VehicleParkingMapper.java b/application/src/main/java/org/opentripplanner/netex/mapping/VehicleParkingMapper.java index 862c5f0c648..f29d9760077 100644 --- a/application/src/main/java/org/opentripplanner/netex/mapping/VehicleParkingMapper.java +++ b/application/src/main/java/org/opentripplanner/netex/mapping/VehicleParkingMapper.java @@ -9,8 +9,8 @@ import org.opentripplanner.framework.i18n.NonLocalizedString; import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.netex.mapping.support.FeedScopedIdFactory; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.rutebanken.netex.model.Parking; import org.rutebanken.netex.model.ParkingVehicleEnumeration; diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingFilter.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingFilter.java index 5f34dc4e1a7..c03d8d18bea 100644 --- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingFilter.java +++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingFilter.java @@ -4,7 +4,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.utils.tostring.ToStringBuilder; /** diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingSelect.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingSelect.java index 2d3935461d4..d30f0c6795d 100644 --- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingSelect.java +++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/filter/VehicleParkingSelect.java @@ -2,7 +2,7 @@ import java.util.Collections; import java.util.Set; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; /** * A set of conditions that can be used to check if a parking facility should be included/excluded diff --git a/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java b/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java index b518a47eedf..60fbb595c5c 100644 --- a/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java +++ b/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java @@ -25,7 +25,7 @@ import org.opentripplanner.model.projectinfo.GraphFileHeader; import org.opentripplanner.model.projectinfo.OtpProjectInfo; import org.opentripplanner.routing.graph.kryosupport.KryoBuilder; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.standalone.config.RouterConfig; diff --git a/application/src/main/java/org/opentripplanner/routing/graphfinder/PlaceFinderTraverseVisitor.java b/application/src/main/java/org/opentripplanner/routing/graphfinder/PlaceFinderTraverseVisitor.java index 16420a0d9eb..8a4181d4b61 100644 --- a/application/src/main/java/org/opentripplanner/routing/graphfinder/PlaceFinderTraverseVisitor.java +++ b/application/src/main/java/org/opentripplanner/routing/graphfinder/PlaceFinderTraverseVisitor.java @@ -6,7 +6,7 @@ import java.util.Set; import org.opentripplanner.astar.spi.SkipEdgeStrategy; import org.opentripplanner.astar.spi.TraverseVisitor; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.street.VehicleRentalPlaceVertex; import org.opentripplanner.street.model.edge.Edge; diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingService.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java similarity index 94% rename from application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingService.java rename to application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java index 7348caf7589..04858c1323f 100644 --- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingService.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java @@ -1,4 +1,4 @@ -package org.opentripplanner.routing.vehicle_parking; +package org.opentripplanner.service.vehicleparking; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ImmutableListMultimap; @@ -9,6 +9,8 @@ import java.util.HashSet; import java.util.Set; import java.util.stream.Stream; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; /** * Service that holds all the {@link VehicleParking} instances and an index for fetching parking diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParking.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParking.java similarity index 99% rename from application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParking.java rename to application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParking.java index 4e71ecd1c68..c9539f21eef 100644 --- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParking.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParking.java @@ -1,4 +1,4 @@ -package org.opentripplanner.routing.vehicle_parking; +package org.opentripplanner.service.vehicleparking.model; import java.io.Serializable; import java.util.ArrayList; diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingEntrance.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingEntrance.java similarity index 98% rename from application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingEntrance.java rename to application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingEntrance.java index f6bc584fb18..d905441641b 100644 --- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingEntrance.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingEntrance.java @@ -1,4 +1,4 @@ -package org.opentripplanner.routing.vehicle_parking; +package org.opentripplanner.service.vehicleparking.model; import java.io.Serializable; import java.util.Objects; diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingGroup.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingGroup.java similarity index 97% rename from application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingGroup.java rename to application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingGroup.java index 74ffedc0dcb..07548efa11a 100644 --- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingGroup.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingGroup.java @@ -1,4 +1,4 @@ -package org.opentripplanner.routing.vehicle_parking; +package org.opentripplanner.service.vehicleparking.model; import java.util.Objects; import javax.annotation.Nullable; diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingGroupBuilder.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingGroupBuilder.java similarity index 93% rename from application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingGroupBuilder.java rename to application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingGroupBuilder.java index 42603e33159..7f109f38002 100644 --- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingGroupBuilder.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingGroupBuilder.java @@ -1,4 +1,4 @@ -package org.opentripplanner.routing.vehicle_parking; +package org.opentripplanner.service.vehicleparking.model; import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.I18NString; diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingHelper.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingHelper.java similarity index 98% rename from application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingHelper.java rename to application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingHelper.java index 257f2805ca2..5832a8d5f91 100644 --- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingHelper.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingHelper.java @@ -1,4 +1,4 @@ -package org.opentripplanner.routing.vehicle_parking; +package org.opentripplanner.service.vehicleparking.model; import java.util.List; import java.util.Objects; diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingSpaces.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingSpaces.java similarity index 98% rename from application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingSpaces.java rename to application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingSpaces.java index eb50440651b..6827e6af198 100644 --- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingSpaces.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingSpaces.java @@ -1,4 +1,4 @@ -package org.opentripplanner.routing.vehicle_parking; +package org.opentripplanner.service.vehicleparking.model; import java.io.Serializable; import java.util.Objects; diff --git a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingState.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingState.java similarity index 80% rename from application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingState.java rename to application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingState.java index ff9178a9b34..e3af795459c 100644 --- a/application/src/main/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingState.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/model/VehicleParkingState.java @@ -1,4 +1,4 @@ -package org.opentripplanner.routing.vehicle_parking; +package org.opentripplanner.service.vehicleparking.model; /** * The state of the vehicle parking. TEMPORARILY_CLOSED and CLOSED are distinct states so that they diff --git a/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java b/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java index 3ad83462612..b5b39ddee18 100644 --- a/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java +++ b/application/src/main/java/org/opentripplanner/standalone/api/OtpServerRequestContext.java @@ -22,8 +22,8 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graphfinder.GraphFinder; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeService; import org.opentripplanner.standalone.config.routerconfig.VectorTileConfig; diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java index a7baa345e36..64a63cf84af 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java @@ -18,8 +18,8 @@ import org.opentripplanner.routing.algorithm.raptoradapter.transit.mappers.TransitLayerMapper; import org.opentripplanner.routing.algorithm.raptoradapter.transit.mappers.TransitLayerUpdater; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleRepository; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalRepository; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.api.OtpServerRequestContext; diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java index 9af2f99c436..9a484dec5c3 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java @@ -18,11 +18,11 @@ import org.opentripplanner.raptor.configure.RaptorConfig; import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripSchedule; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleRepository; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.configure.RealtimeVehicleRepositoryModule; import org.opentripplanner.service.realtimevehicles.configure.RealtimeVehicleServiceModule; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalRepository; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.vehiclerental.configure.VehicleRentalRepositoryModule; diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java index 5b748a310bc..bbdd39c57d5 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationModule.java @@ -15,8 +15,8 @@ import org.opentripplanner.raptor.configure.RaptorConfig; import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripSchedule; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeService; import org.opentripplanner.standalone.api.OtpServerRequestContext; diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java index 4cc774fc7ec..8fc7176a134 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java @@ -8,7 +8,7 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graph.SerializedGraphObject; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.CommandLineParameters; import org.opentripplanner.standalone.config.ConfigModel; diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java index 7d5ee01c72f..5e959cd9f0d 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java @@ -11,7 +11,7 @@ import org.opentripplanner.ext.stopconsolidation.configure.StopConsolidationRepositoryModule; import org.opentripplanner.graph_builder.GraphBuilderDataSources; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.configure.WorldEnvelopeRepositoryModule; import org.opentripplanner.standalone.config.CommandLineParameters; diff --git a/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java b/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java index 1e906a507d3..1427dcf1971 100644 --- a/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java +++ b/application/src/main/java/org/opentripplanner/standalone/server/DefaultServerRequestContext.java @@ -20,8 +20,8 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.service.DefaultRoutingService; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeService; import org.opentripplanner.standalone.api.HttpRequestScoped; diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLink.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLink.java index 682aeca0b3e..ac046dd45df 100644 --- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLink.java +++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLink.java @@ -4,7 +4,7 @@ import org.opentripplanner.framework.geometry.GeometryUtils; import org.opentripplanner.framework.i18n.I18NString; import org.opentripplanner.routing.api.request.preference.VehicleParkingPreferences; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.street.model.vertex.StreetVertex; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; import org.opentripplanner.street.search.TraverseMode; diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/VehicleParkingEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/VehicleParkingEdge.java index 95d9ea5507d..a7aa7bb2535 100644 --- a/application/src/main/java/org/opentripplanner/street/model/edge/VehicleParkingEdge.java +++ b/application/src/main/java/org/opentripplanner/street/model/edge/VehicleParkingEdge.java @@ -8,7 +8,7 @@ import org.opentripplanner.routing.api.request.preference.CarPreferences; import org.opentripplanner.routing.api.request.preference.RoutingPreferences; import org.opentripplanner.routing.api.request.preference.VehicleParkingPreferences; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; import org.opentripplanner.street.search.TraverseMode; import org.opentripplanner.street.search.request.StreetSearchRequest; diff --git a/application/src/main/java/org/opentripplanner/street/model/vertex/VehicleParkingEntranceVertex.java b/application/src/main/java/org/opentripplanner/street/model/vertex/VehicleParkingEntranceVertex.java index 591f71f1869..9a4e64dc2d6 100644 --- a/application/src/main/java/org/opentripplanner/street/model/vertex/VehicleParkingEntranceVertex.java +++ b/application/src/main/java/org/opentripplanner/street/model/vertex/VehicleParkingEntranceVertex.java @@ -3,8 +3,8 @@ import java.util.Collection; import java.util.Objects; import org.opentripplanner.framework.i18n.I18NString; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingEntrance; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingEntrance; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetVehicleParkingLink; import org.opentripplanner.street.model.edge.VehicleParkingEdge; diff --git a/application/src/main/java/org/opentripplanner/street/model/vertex/VertexFactory.java b/application/src/main/java/org/opentripplanner/street/model/vertex/VertexFactory.java index 80bd8021309..422fc16c837 100644 --- a/application/src/main/java/org/opentripplanner/street/model/vertex/VertexFactory.java +++ b/application/src/main/java/org/opentripplanner/street/model/vertex/VertexFactory.java @@ -6,8 +6,8 @@ import org.opentripplanner.framework.i18n.I18NString; import org.opentripplanner.osm.model.OsmNode; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingEntrance; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingEntrance; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.street.VehicleRentalPlaceVertex; import org.opentripplanner.street.model.edge.StreetEdge; diff --git a/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java b/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java index a51599f2f33..3be06edd7e2 100644 --- a/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java +++ b/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java @@ -11,8 +11,8 @@ import org.opentripplanner.model.TimetableSnapshot; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleRepository; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalRepository; import org.opentripplanner.transit.service.TimetableRepository; import org.opentripplanner.updater.DefaultRealTimeUpdateContext; diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java index b23f46522c3..03c820a58e4 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java @@ -4,9 +4,9 @@ import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.updater.GraphWriterRunnable; import org.opentripplanner.updater.RealTimeUpdateContext; diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingDataSourceFactory.java b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingDataSourceFactory.java index ef587cd2b68..d7dd8f23c5f 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingDataSourceFactory.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingDataSourceFactory.java @@ -10,7 +10,7 @@ import org.opentripplanner.ext.vehicleparking.parkapi.CarParkAPIUpdater; import org.opentripplanner.ext.vehicleparking.parkapi.ParkAPIUpdaterParameters; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.updater.spi.DataSource; /** diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java index 830429151b4..d4b8e8b7b71 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java @@ -12,10 +12,10 @@ import org.opentripplanner.routing.linking.DisposableEdgeCollection; import org.opentripplanner.routing.linking.LinkingDirection; import org.opentripplanner.routing.linking.VertexLinker; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingHelper; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; import org.opentripplanner.street.model.edge.StreetVehicleParkingLink; import org.opentripplanner.street.model.edge.VehicleParkingEdge; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; diff --git a/application/src/test/java/org/opentripplanner/ConstantsForTests.java b/application/src/test/java/org/opentripplanner/ConstantsForTests.java index b1d1080043c..01df4b4d933 100644 --- a/application/src/test/java/org/opentripplanner/ConstantsForTests.java +++ b/application/src/test/java/org/opentripplanner/ConstantsForTests.java @@ -31,7 +31,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.linking.LinkingDirection; import org.opentripplanner.routing.linking.VertexLinker; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.street.StreetVehicleRentalLink; diff --git a/application/src/test/java/org/opentripplanner/TestServerContext.java b/application/src/test/java/org/opentripplanner/TestServerContext.java index 4efc74901e5..91071ef9df9 100644 --- a/application/src/test/java/org/opentripplanner/TestServerContext.java +++ b/application/src/test/java/org/opentripplanner/TestServerContext.java @@ -9,9 +9,9 @@ import org.opentripplanner.ext.emissions.EmissionsService; import org.opentripplanner.raptor.configure.RaptorConfig; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeService; diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java index 5d12b85a45b..eaaa91aa0b9 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java @@ -68,10 +68,10 @@ import org.opentripplanner.routing.graphfinder.PlaceType; import org.opentripplanner.routing.impl.TransitAlertServiceImpl; import org.opentripplanner.routing.services.TransitAlertService; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.service.vehiclerental.model.TestFreeFloatingRentalVehicleBuilder; import org.opentripplanner.service.vehiclerental.model.TestVehicleRentalStationBuilder; diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java index eb184f17c9d..28dd7364306 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java @@ -34,8 +34,8 @@ import org.opentripplanner.routing.api.request.preference.VehicleParkingPreferences; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graphfinder.GraphFinder; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.street.search.TraverseMode; import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java index 521ed211b7a..ca1cf9f0ee3 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java @@ -30,8 +30,8 @@ import org.opentripplanner.routing.api.request.preference.ItineraryFilterDebugProfile; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graphfinder.GraphFinder; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.transit.service.DefaultTransitService; diff --git a/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java index 141e8d2c818..9218037414b 100644 --- a/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java @@ -46,8 +46,8 @@ import org.opentripplanner.routing.api.request.via.ViaLocation; import org.opentripplanner.routing.core.VehicleRoutingOptimizeType; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeService; diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java index 3ac86be3fba..d1b997dc976 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java @@ -14,7 +14,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.street.model.edge.AreaEdge; import org.opentripplanner.street.model.edge.BoardingLocationToStopLink; import org.opentripplanner.street.model.edge.Edge; diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java index 407d2f630c7..1c301a0b8cb 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java @@ -18,7 +18,7 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.model.StopTime; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetTransitStopLink; diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java index 7333a98afe1..7418ad8c626 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java @@ -2,7 +2,7 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.transit.service.TimetableRepository; public class TestStreetLinkerModule { diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java index 42f016055be..e5c52e1dea8 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java @@ -9,9 +9,9 @@ import org.junit.jupiter.api.Test; import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingHelper; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingTestGraphData; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingTestGraphData; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; import org.opentripplanner.street.model.StreetTraversalPermission; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.edge.StreetVehicleParkingLink; diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java b/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java index fcd76fc5e0a..fc7f0fa2031 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java @@ -5,7 +5,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.transit.model.framework.Deduplicator; import org.opentripplanner.transit.service.SiteRepository; import org.opentripplanner.transit.service.TimetableRepository; diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java index e4bb6f4ad9e..c154d27ad93 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java @@ -21,7 +21,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.street.model.StreetTraversalPermission; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.edge.StreetEdge; diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java index a9ac1a10e54..100420e9130 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java @@ -32,7 +32,7 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.impl.GraphPathFinder; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetEdge; import org.opentripplanner.street.model.vertex.BarrierVertex; diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java index b72dceb5814..a0b2e843816 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Test; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.street.model.edge.AreaEdge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java index 1778e7306b5..edf6a6fe297 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java @@ -21,7 +21,7 @@ import org.opentripplanner.routing.api.request.request.filter.AllowAllTransitFilter; import org.opentripplanner.routing.api.request.request.filter.TransitFilter; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java index 8c98261340c..72b1ae6d374 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java @@ -13,7 +13,7 @@ import org.opentripplanner.graph_builder.module.TestStreetLinkerModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.street.model.edge.StreetVehicleParkingLink; import org.opentripplanner.street.model.edge.VehicleParkingEdge; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java index 17b29a1585f..291e3475b74 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java @@ -10,7 +10,7 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.api.request.StreetMode; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; diff --git a/application/src/test/java/org/opentripplanner/netex/mapping/VehicleParkingMapperTest.java b/application/src/test/java/org/opentripplanner/netex/mapping/VehicleParkingMapperTest.java index bf56be1be1b..d803e1867cb 100644 --- a/application/src/test/java/org/opentripplanner/netex/mapping/VehicleParkingMapperTest.java +++ b/application/src/test/java/org/opentripplanner/netex/mapping/VehicleParkingMapperTest.java @@ -22,8 +22,8 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.graph_builder.issue.service.DefaultDataImportIssueStore; import org.opentripplanner.netex.mapping.support.FeedScopedIdFactory; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.rutebanken.netex.model.LocationStructure; import org.rutebanken.netex.model.MultilingualString; import org.rutebanken.netex.model.Parking; diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/GraphRoutingTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/GraphRoutingTest.java index b9f9d7acb56..e283e4e9fa8 100644 --- a/application/src/test/java/org/opentripplanner/routing/algorithm/GraphRoutingTest.java +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/GraphRoutingTest.java @@ -13,9 +13,9 @@ import org.opentripplanner.model.PickDrop; import org.opentripplanner.model.StopTime; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParking.VehicleParkingEntranceCreator; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingHelper; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking.VehicleParkingEntranceCreator; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; diff --git a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java index d9d7f178c29..2f5f70da908 100644 --- a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java +++ b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java @@ -23,7 +23,7 @@ import org.opentripplanner.ext.emissions.EmissionsDataModel; import org.opentripplanner.framework.geometry.HashGridSpatialIndex; import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; diff --git a/application/src/test/java/org/opentripplanner/routing/graphfinder/StreetGraphFinderTest.java b/application/src/test/java/org/opentripplanner/routing/graphfinder/StreetGraphFinderTest.java index 622b76a431a..2c787bc682c 100644 --- a/application/src/test/java/org/opentripplanner/routing/graphfinder/StreetGraphFinderTest.java +++ b/application/src/test/java/org/opentripplanner/routing/graphfinder/StreetGraphFinderTest.java @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test; import org.locationtech.jts.geom.Coordinate; import org.opentripplanner.routing.algorithm.GraphRoutingTest; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.street.VehicleRentalPlaceVertex; import org.opentripplanner.street.model.StreetTraversalPermission; import org.opentripplanner.street.model.vertex.IntersectionVertex; diff --git a/application/src/test/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingHelperTest.java b/application/src/test/java/org/opentripplanner/service/vehicleparking/VehicleParkingHelperTest.java similarity index 92% rename from application/src/test/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingHelperTest.java rename to application/src/test/java/org/opentripplanner/service/vehicleparking/VehicleParkingHelperTest.java index 90bdeb015a4..34b48bfe051 100644 --- a/application/src/test/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingHelperTest.java +++ b/application/src/test/java/org/opentripplanner/service/vehicleparking/VehicleParkingHelperTest.java @@ -1,4 +1,4 @@ -package org.opentripplanner.routing.vehicle_parking; +package org.opentripplanner.service.vehicleparking; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -9,7 +9,9 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.NonLocalizedString; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParking.VehicleParkingEntranceCreator; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking.VehicleParkingEntranceCreator; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.edge.VehicleParkingEdge; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; diff --git a/application/src/test/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingTestGraphData.java b/application/src/test/java/org/opentripplanner/service/vehicleparking/VehicleParkingTestGraphData.java similarity index 96% rename from application/src/test/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingTestGraphData.java rename to application/src/test/java/org/opentripplanner/service/vehicleparking/VehicleParkingTestGraphData.java index 03c4981f181..b2a847d267d 100644 --- a/application/src/test/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingTestGraphData.java +++ b/application/src/test/java/org/opentripplanner/service/vehicleparking/VehicleParkingTestGraphData.java @@ -1,4 +1,4 @@ -package org.opentripplanner.routing.vehicle_parking; +package org.opentripplanner.service.vehicleparking; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.street.model.StreetTraversalPermission; diff --git a/application/src/test/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingTestUtil.java b/application/src/test/java/org/opentripplanner/service/vehicleparking/VehicleParkingTestUtil.java similarity index 85% rename from application/src/test/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingTestUtil.java rename to application/src/test/java/org/opentripplanner/service/vehicleparking/VehicleParkingTestUtil.java index fca20322ebe..aebd422cf81 100644 --- a/application/src/test/java/org/opentripplanner/routing/vehicle_parking/VehicleParkingTestUtil.java +++ b/application/src/test/java/org/opentripplanner/service/vehicleparking/VehicleParkingTestUtil.java @@ -1,7 +1,9 @@ -package org.opentripplanner.routing.vehicle_parking; +package org.opentripplanner.service.vehicleparking; import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.NonLocalizedString; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.transit.model.framework.FeedScopedId; diff --git a/application/src/test/java/org/opentripplanner/street/model/_data/StreetModelForTest.java b/application/src/test/java/org/opentripplanner/street/model/_data/StreetModelForTest.java index 8d06e06a0c1..08710fe0599 100644 --- a/application/src/test/java/org/opentripplanner/street/model/_data/StreetModelForTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/_data/StreetModelForTest.java @@ -8,7 +8,7 @@ import org.opentripplanner.framework.geometry.SphericalDistanceLibrary; import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.I18NString; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.model.TestFreeFloatingRentalVehicleBuilder; import org.opentripplanner.service.vehiclerental.street.VehicleRentalPlaceVertex; import org.opentripplanner.street.model.RentalFormFactor; diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLinkTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLinkTest.java index 8c6127e716e..a44bed87bdf 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLinkTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/StreetVehicleParkingLinkTest.java @@ -16,8 +16,8 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.NonLocalizedString; import org.opentripplanner.routing.api.request.StreetMode; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingEntrance; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingEntrance; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; import org.opentripplanner.street.model.vertex.Vertex; diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/VehicleParkingEdgeTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/VehicleParkingEdgeTest.java index e28bf75583d..4fa7f682dfb 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/VehicleParkingEdgeTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/VehicleParkingEdgeTest.java @@ -8,8 +8,8 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.NonLocalizedString; import org.opentripplanner.routing.api.request.StreetMode; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; import org.opentripplanner.street.search.request.StreetSearchRequest; diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/VehicleParkingPreferredTagsTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/VehicleParkingPreferredTagsTest.java index 579ae4e964d..2f18f02b89b 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/VehicleParkingPreferredTagsTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/VehicleParkingPreferredTagsTest.java @@ -11,8 +11,8 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.NonLocalizedString; import org.opentripplanner.routing.api.request.StreetMode; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingEntrance; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingEntrance; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; import org.opentripplanner.street.model.vertex.Vertex; diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java index 29d5d27fb3d..1366f85c788 100644 --- a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java +++ b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java @@ -22,8 +22,8 @@ import org.opentripplanner.routing.framework.DebugTimingAggregator; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graph.SerializedGraphObject; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.standalone.OtpStartupInfo; import org.opentripplanner.standalone.api.OtpServerRequestContext; diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java index 27b6a038418..1a8ffb563ed 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java @@ -12,9 +12,9 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.I18NString; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.standalone.config.routerconfig.updaters.VehicleParkingUpdaterConfig; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.transit.service.TimetableRepository; diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java index 2f09fca8216..b3ea76928c6 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java @@ -11,12 +11,12 @@ import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingTestGraphData; -import org.opentripplanner.routing.vehicle_parking.VehicleParkingTestUtil; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingTestGraphData; +import org.opentripplanner.service.vehicleparking.VehicleParkingTestUtil; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.edge.StreetVehicleParkingLink; import org.opentripplanner.street.model.edge.VehicleParkingEdge; From 33d148c9dcdec55820fe147e11fb90ffa069ccdc Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Sun, 10 Nov 2024 09:58:11 +0100 Subject: [PATCH 046/169] Extract interface for parking service --- .../VehicleParkingGroupsLayerTest.java | 3 +- .../VehicleParkingsLayerTest.java | 3 +- .../vehicleparking/VehicleParkingService.java | 89 ++------------- .../VehicleParkingServiceModule.java | 12 ++ .../DefaultVehicleParkingService.java | 107 ++++++++++++++++++ .../configure/LoadApplicationFactory.java | 2 + .../opentripplanner/ConstantsForTests.java | 10 +- .../opentripplanner/TestServerContext.java | 3 +- .../apis/gtfs/GraphQLIntegrationTest.java | 3 +- .../LegacyRouteRequestMapperTest.java | 4 +- .../routerequest/RouteRequestMapperTest.java | 4 +- .../mapping/TripRequestMapperTest.java | 4 +- .../OsmBoardingLocationsModuleTest.java | 4 +- .../module/StreetLinkerModuleTest.java | 4 +- .../module/TestStreetLinkerModule.java | 3 +- .../module/VehicleParkingLinkingTest.java | 4 +- .../islandpruning/IslandPruningUtils.java | 4 +- .../module/linking/LinkingTest.java | 4 +- .../module/osm/OsmModuleTest.java | 11 +- .../module/osm/PlatformLinkerTest.java | 4 +- .../module/osm/TriangleInequalityTest.java | 4 +- .../module/osm/UnconnectedAreasTest.java | 4 +- .../module/osm/UnroutableTest.java | 4 +- .../routing/graph/GraphSerializationTest.java | 5 +- .../transit/speed_test/SpeedTest.java | 4 +- ...VehicleParkingAvailabilityUpdaterTest.java | 3 +- .../VehicleParkingUpdaterTest.java | 3 +- 27 files changed, 185 insertions(+), 124 deletions(-) create mode 100644 application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java create mode 100644 application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java index 62df252538f..c7134c1ca31 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java @@ -19,6 +19,7 @@ import org.opentripplanner.framework.i18n.TranslatedString; import org.opentripplanner.inspector.vector.KeyValue; import org.opentripplanner.inspector.vector.LayerParameters; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; @@ -89,7 +90,7 @@ public void setUp() { @Test public void vehicleParkingGroupGeometryTest() { - VehicleParkingService service = new VehicleParkingService(); + VehicleParkingService service = new DefaultVehicleParkingService(); service.updateVehicleParking(List.of(vehicleParking), List.of()); var config = diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java index c02d1bf9d6b..112c3e70571 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java @@ -23,6 +23,7 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.TranslatedString; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; @@ -85,7 +86,7 @@ public void setUp() { @Test public void vehicleParkingGeometryTest() { - VehicleParkingService service = new VehicleParkingService(); + VehicleParkingService service = new DefaultVehicleParkingService(); service.updateVehicleParking(List.of(vehicleParking), List.of()); var config = diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java index 04858c1323f..753d390d2c2 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java @@ -1,97 +1,26 @@ package org.opentripplanner.service.vehicleparking; -import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ImmutableListMultimap; -import com.google.common.collect.Multimap; -import jakarta.inject.Inject; -import java.io.Serializable; import java.util.Collection; -import java.util.HashSet; -import java.util.Set; import java.util.stream.Stream; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; -/** - * Service that holds all the {@link VehicleParking} instances and an index for fetching parking - * locations within a {@link VehicleParkingGroup}. This class is thread-safe because the collections - * held here are immutable and only updated in atomic operations that replace the existing - * collection with a new copy. - * - *

THIS CLASS IS THREAD-SAFE

- */ -public class VehicleParkingService implements Serializable { - - @Inject - public VehicleParkingService() {} - - /** - * To ensure that his is thread-safe, the set stored here should always be immutable. - *

- * The volatile keyword is used to ensure safe publication by clearing CPU caches. - */ - private volatile Set vehicleParkings = Set.of(); - - /** - * To ensure that his is thread-safe, {@link ImmutableListMultimap} is used. - *

- * The volatile keyword is used to ensure safe publication by clearing CPU caches. - */ - private volatile ImmutableListMultimap vehicleParkingGroups = ImmutableListMultimap.of(); - - /** - * Does atomic update of {@link VehicleParking} and index of {@link VehicleParkingGroup} in this - * service by replacing the existing with a new copy that includes old ones that were not removed - * in the update and the new ones that were added in the update. - */ - public void updateVehicleParking( +public interface VehicleParkingService { + void updateVehicleParking( Collection parkingToAdd, Collection parkingToRemove - ) { - Multimap updatedVehicleParkingGroups = ArrayListMultimap.create( - vehicleParkingGroups - ); - parkingToRemove.forEach(vehicleParking -> { - var vehicleParkingGroup = vehicleParking.getVehicleParkingGroup(); - if (vehicleParkingGroup != null) { - updatedVehicleParkingGroups.remove(vehicleParking.getVehicleParkingGroup(), vehicleParking); - } - }); - parkingToAdd.forEach(vehicleParking -> { - var vehicleParkingGroup = vehicleParking.getVehicleParkingGroup(); - if (vehicleParkingGroup != null) { - updatedVehicleParkingGroups.put(vehicleParking.getVehicleParkingGroup(), vehicleParking); - } - }); - vehicleParkingGroups = ImmutableListMultimap.copyOf(updatedVehicleParkingGroups); - - Set updatedVehicleParkings = new HashSet<>(vehicleParkings); - updatedVehicleParkings.removeAll(parkingToRemove); - updatedVehicleParkings.addAll(parkingToAdd); - vehicleParkings = Set.copyOf(updatedVehicleParkings); - } + ); - public Stream getBikeParks() { - return vehicleParkings.stream().filter(VehicleParking::hasBicyclePlaces); - } + Stream getBikeParks(); - public Stream getCarParks() { - return vehicleParkings.stream().filter(VehicleParking::hasAnyCarPlaces); - } + Stream getCarParks(); - public Stream getVehicleParkings() { - return vehicleParkings.stream(); - } + Stream getVehicleParkings(); - public ImmutableListMultimap getVehicleParkingGroups() { - return vehicleParkingGroups; - } + ImmutableListMultimap getVehicleParkingGroups(); - public boolean hasBikeParking() { - return vehicleParkings.stream().anyMatch(VehicleParking::hasBicyclePlaces); - } + boolean hasBikeParking(); - public boolean hasCarParking() { - return vehicleParkings.stream().anyMatch(VehicleParking::hasAnyCarPlaces); - } + boolean hasCarParking(); } diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java new file mode 100644 index 00000000000..8b6cb3af7c7 --- /dev/null +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java @@ -0,0 +1,12 @@ +package org.opentripplanner.service.vehicleparking.configure; + +import dagger.Binds; +import dagger.Module; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; + +@Module +public interface VehicleParkingServiceModule { + @Binds + VehicleParkingService bindService(DefaultVehicleParkingService service); +} diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java new file mode 100644 index 00000000000..7c860dd5d94 --- /dev/null +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java @@ -0,0 +1,107 @@ +package org.opentripplanner.service.vehicleparking.internal; + +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ImmutableListMultimap; +import com.google.common.collect.Multimap; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import java.io.Serializable; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; +import java.util.stream.Stream; +import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; + +/** + * Service that holds all the {@link VehicleParking} instances and an index for fetching parking + * locations within a {@link VehicleParkingGroup}. This class is thread-safe because the collections + * held here are immutable and only updated in atomic operations that replace the existing + * collection with a new copy. + * + *

THIS CLASS IS THREAD-SAFE

+ */ +@Singleton +public class DefaultVehicleParkingService implements Serializable, VehicleParkingService { + + @Inject + public DefaultVehicleParkingService() {} + + /** + * To ensure that his is thread-safe, the set stored here should always be immutable. + *

+ * The volatile keyword is used to ensure safe publication by clearing CPU caches. + */ + private volatile Set vehicleParkings = Set.of(); + + /** + * To ensure that his is thread-safe, {@link ImmutableListMultimap} is used. + *

+ * The volatile keyword is used to ensure safe publication by clearing CPU caches. + */ + private volatile ImmutableListMultimap vehicleParkingGroups = ImmutableListMultimap.of(); + + /** + * Does atomic update of {@link VehicleParking} and index of {@link VehicleParkingGroup} in this + * service by replacing the existing with a new copy that includes old ones that were not removed + * in the update and the new ones that were added in the update. + */ + @Override + public void updateVehicleParking( + Collection parkingToAdd, + Collection parkingToRemove + ) { + Multimap updatedVehicleParkingGroups = ArrayListMultimap.create( + vehicleParkingGroups + ); + parkingToRemove.forEach(vehicleParking -> { + var vehicleParkingGroup = vehicleParking.getVehicleParkingGroup(); + if (vehicleParkingGroup != null) { + updatedVehicleParkingGroups.remove(vehicleParking.getVehicleParkingGroup(), vehicleParking); + } + }); + parkingToAdd.forEach(vehicleParking -> { + var vehicleParkingGroup = vehicleParking.getVehicleParkingGroup(); + if (vehicleParkingGroup != null) { + updatedVehicleParkingGroups.put(vehicleParking.getVehicleParkingGroup(), vehicleParking); + } + }); + vehicleParkingGroups = ImmutableListMultimap.copyOf(updatedVehicleParkingGroups); + + Set updatedVehicleParkings = new HashSet<>(vehicleParkings); + updatedVehicleParkings.removeAll(parkingToRemove); + updatedVehicleParkings.addAll(parkingToAdd); + vehicleParkings = Set.copyOf(updatedVehicleParkings); + } + + @Override + public Stream getBikeParks() { + return vehicleParkings.stream().filter(VehicleParking::hasBicyclePlaces); + } + + @Override + public Stream getCarParks() { + return vehicleParkings.stream().filter(VehicleParking::hasAnyCarPlaces); + } + + @Override + public Stream getVehicleParkings() { + return vehicleParkings.stream(); + } + + @Override + public ImmutableListMultimap getVehicleParkingGroups() { + return vehicleParkingGroups; + } + + @Override + public boolean hasBikeParking() { + return vehicleParkings.stream().anyMatch(VehicleParking::hasBicyclePlaces); + } + + @Override + public boolean hasCarParking() { + return vehicleParkings.stream().anyMatch(VehicleParking::hasAnyCarPlaces); + } +} diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java index 5e959cd9f0d..e269393e039 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java @@ -12,6 +12,7 @@ import org.opentripplanner.graph_builder.GraphBuilderDataSources; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.configure.VehicleParkingServiceModule; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.configure.WorldEnvelopeRepositoryModule; import org.opentripplanner.standalone.config.CommandLineParameters; @@ -31,6 +32,7 @@ GsDataSourceModule.class, WorldEnvelopeRepositoryModule.class, StopConsolidationRepositoryModule.class, + VehicleParkingServiceModule.class, } ) public interface LoadApplicationFactory { diff --git a/application/src/test/java/org/opentripplanner/ConstantsForTests.java b/application/src/test/java/org/opentripplanner/ConstantsForTests.java index 01df4b4d933..8f8eacd3d88 100644 --- a/application/src/test/java/org/opentripplanner/ConstantsForTests.java +++ b/application/src/test/java/org/opentripplanner/ConstantsForTests.java @@ -31,7 +31,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.linking.LinkingDirection; import org.opentripplanner.routing.linking.VertexLinker; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.street.StreetVehicleRentalLink; @@ -136,7 +136,7 @@ public static TestOtpModel buildNewPortlandGraph(boolean withElevation) { { OsmProvider osmProvider = new OsmProvider(PORTLAND_CENTRAL_OSM, false); OsmModule osmModule = OsmModule - .of(osmProvider, graph, new VehicleParkingService()) + .of(osmProvider, graph, new DefaultVehicleParkingService()) .withStaticParkAndRide(true) .withStaticBikeParkAndRide(true) .build(); @@ -185,7 +185,9 @@ public static TestOtpModel buildOsmGraph(File osmFile) { var timetableRepository = new TimetableRepository(siteRepository, deduplicator); // Add street data from OSM OsmProvider osmProvider = new OsmProvider(osmFile, true); - OsmModule osmModule = OsmModule.of(osmProvider, graph, new VehicleParkingService()).build(); + OsmModule osmModule = OsmModule + .of(osmProvider, graph, new DefaultVehicleParkingService()) + .build(); osmModule.buildGraph(); return new TestOtpModel(graph, timetableRepository); } catch (Exception e) { @@ -227,7 +229,7 @@ public static TestOtpModel buildNewMinimalNetexGraph() { try { var deduplicator = new Deduplicator(); var siteRepository = new SiteRepository(); - var parkingService = new VehicleParkingService(); + var parkingService = new DefaultVehicleParkingService(); var graph = new Graph(deduplicator); var timetableRepository = new TimetableRepository(siteRepository, deduplicator); // Add street data from OSM diff --git a/application/src/test/java/org/opentripplanner/TestServerContext.java b/application/src/test/java/org/opentripplanner/TestServerContext.java index 91071ef9df9..b9631593f27 100644 --- a/application/src/test/java/org/opentripplanner/TestServerContext.java +++ b/application/src/test/java/org/opentripplanner/TestServerContext.java @@ -11,6 +11,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; @@ -90,7 +91,7 @@ public static VehicleRentalService createVehicleRentalService() { } public static VehicleParkingService createVehicleParkingService() { - return new VehicleParkingService(); + return new DefaultVehicleParkingService(); } public static EmissionsService createEmissionsService() { diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java index eaaa91aa0b9..e0930ad8cd5 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java @@ -70,6 +70,7 @@ import org.opentripplanner.routing.services.TransitAlertService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; @@ -141,7 +142,7 @@ class GraphQLIntegrationTest { private static GraphQLRequestContext context; private static final Deduplicator DEDUPLICATOR = new Deduplicator(); - private static final VehicleParkingService parkingService = new VehicleParkingService(); + private static final VehicleParkingService parkingService = new DefaultVehicleParkingService(); @BeforeAll static void setup() { diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java index 28dd7364306..bf80f5f2185 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java @@ -35,7 +35,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graphfinder.GraphFinder; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.street.search.TraverseMode; import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; @@ -62,7 +62,7 @@ class LegacyRouteRequestMapperTest implements PlanTestConstants { transitService, new DefaultFareService(), new DefaultVehicleRentalService(), - new VehicleParkingService(), + new DefaultVehicleParkingService(), new DefaultRealtimeVehicleService(transitService), GraphFinder.getInstance(graph, transitService::findRegularStops), new RouteRequest() diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java index ca1cf9f0ee3..618ad89f046 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java @@ -31,7 +31,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graphfinder.GraphFinder; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.transit.service.DefaultTransitService; @@ -72,7 +72,7 @@ class RouteRequestMapperTest { transitService, new DefaultFareService(), new DefaultVehicleRentalService(), - new VehicleParkingService(), + new DefaultVehicleParkingService(), new DefaultRealtimeVehicleService(transitService), GraphFinder.getInstance(graph, transitService::findRegularStops), new RouteRequest() diff --git a/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java index 9218037414b..67dbe5c18d9 100644 --- a/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java @@ -47,7 +47,7 @@ import org.opentripplanner.routing.core.VehicleRoutingOptimizeType; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeService; @@ -145,7 +145,7 @@ void setup() { new DefaultWorldEnvelopeService(new DefaultWorldEnvelopeRepository()), new DefaultRealtimeVehicleService(transitService), new DefaultVehicleRentalService(), - new VehicleParkingService(), + new DefaultVehicleParkingService(), new DefaultEmissionsService(new EmissionsDataModel()), null, RouterConfig.DEFAULT.flexParameters(), diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java index d1b997dc976..c7295640a18 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java @@ -14,7 +14,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.street.model.edge.AreaEdge; import org.opentripplanner.street.model.edge.BoardingLocationToStopLink; import org.opentripplanner.street.model.edge.Edge; @@ -84,7 +84,7 @@ void addAndLinkBoardingLocations(boolean areaVisibility, Set linkedVerti new NonLocalizedString("bus stop not connected to street network") ); var osmModule = OsmModule - .of(provider, graph, new VehicleParkingService()) + .of(provider, graph, new DefaultVehicleParkingService()) .withBoardingAreaRefTags(Set.of("ref", "ref:IFOPT")) .withAreaVisibility(areaVisibility) .build(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java index 1c301a0b8cb..425fa186312 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java @@ -18,7 +18,7 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.model.StopTime; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetTransitStopLink; @@ -174,7 +174,7 @@ public TestModel() { module = new StreetLinkerModule( graph, - new VehicleParkingService(), + new DefaultVehicleParkingService(), timetableRepository, DataImportIssueStore.NOOP, false diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java index 7418ad8c626..0ed7edd6653 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java @@ -2,6 +2,7 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.transit.service.TimetableRepository; @@ -9,7 +10,7 @@ public class TestStreetLinkerModule { /** For test only */ public static void link(Graph graph, TimetableRepository timetableRepository) { - link(graph, new VehicleParkingService(), timetableRepository); + link(graph, new DefaultVehicleParkingService(), timetableRepository); } public static void link( diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java index e5c52e1dea8..9d6fc3ee54b 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test; import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingTestGraphData; import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; import org.opentripplanner.street.model.StreetTraversalPermission; @@ -170,7 +170,7 @@ public void removeVehicleParkingWithOneEntranceAndNonExistingVertexTest() { ) .build(); - var vehicleParkingService = new VehicleParkingService(); + var vehicleParkingService = new DefaultVehicleParkingService(); vehicleParkingService.updateVehicleParking(List.of(vehicleParking), List.of()); helper.linkVehicleParkingToGraph(vehicleParking); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java b/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java index fc7f0fa2031..e6ce7410ae6 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java @@ -5,7 +5,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.transit.model.framework.Deduplicator; import org.opentripplanner.transit.service.SiteRepository; import org.opentripplanner.transit.service.TimetableRepository; @@ -26,7 +26,7 @@ static Graph buildOsmGraph( // Add street data from OSM OsmProvider osmProvider = new OsmProvider(osmFile, true); OsmModule osmModule = OsmModule - .of(osmProvider, graph, new VehicleParkingService()) + .of(osmProvider, graph, new DefaultVehicleParkingService()) .withEdgeNamer(new TestNamer()) .build(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java index c154d27ad93..9f124e25ac9 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java @@ -21,7 +21,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.street.model.StreetTraversalPermission; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.edge.StreetEdge; @@ -158,7 +158,7 @@ public static TestOtpModel buildGraphNoTransit() { File file = ResourceLoader.of(LinkingTest.class).file("columbus.osm.pbf"); OsmProvider provider = new OsmProvider(file, false); - OsmModule osmModule = OsmModule.of(provider, gg, new VehicleParkingService()).build(); + OsmModule osmModule = OsmModule.of(provider, gg, new DefaultVehicleParkingService()).build(); osmModule.buildGraph(); return new TestOtpModel(gg, timetableRepository); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java index 100420e9130..49efdb6d47e 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java @@ -32,6 +32,7 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.impl.GraphPathFinder; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetEdge; @@ -58,7 +59,7 @@ public void testGraphBuilder() { OsmProvider provider = new OsmProvider(file, true); OsmModule osmModule = OsmModule - .of(provider, gg, new VehicleParkingService()) + .of(provider, gg, new DefaultVehicleParkingService()) .withAreaVisibility(true) .build(); @@ -117,7 +118,7 @@ public void testBuildGraphDetailed() { File file = RESOURCE_LOADER.file("NYC_small.osm.pbf"); OsmProvider provider = new OsmProvider(file, true); OsmModule osmModule = OsmModule - .of(provider, gg, new VehicleParkingService()) + .of(provider, gg, new DefaultVehicleParkingService()) .withAreaVisibility(true) .build(); @@ -313,7 +314,7 @@ void testBarrierAtEnd() { File file = RESOURCE_LOADER.file("accessno-at-end.pbf"); OsmProvider provider = new OsmProvider(file, false); - OsmModule loader = OsmModule.of(provider, graph, new VehicleParkingService()).build(); + OsmModule loader = OsmModule.of(provider, graph, new DefaultVehicleParkingService()).build(); loader.buildGraph(); Vertex start = graph.getVertex(VertexLabel.osm(1)); @@ -330,7 +331,7 @@ void testBarrierAtEnd() { private BuildResult buildParkingLots() { var graph = new Graph(); - var service = new VehicleParkingService(); + var service = new DefaultVehicleParkingService(); var providers = Stream .of("B+R.osm.pbf", "P+R.osm.pbf") .map(RESOURCE_LOADER::file) @@ -364,7 +365,7 @@ private void testBuildingAreas(boolean skipVisibility) { OsmProvider provider = new OsmProvider(file, false); OsmModule loader = OsmModule - .of(provider, graph, new VehicleParkingService()) + .of(provider, graph, new DefaultVehicleParkingService()) .withAreaVisibility(!skipVisibility) .build(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java index a0b2e843816..5a63e4683b2 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Test; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.street.model.edge.AreaEdge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; @@ -31,7 +31,7 @@ public void testLinkEntriesToPlatforms() { OsmProvider provider = new OsmProvider(file, false); OsmModule osmModule = OsmModule - .of(provider, gg, new VehicleParkingService()) + .of(provider, gg, new DefaultVehicleParkingService()) .withPlatformEntriesLinking(true) .build(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java index edf6a6fe297..b81ecc6c6e5 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java @@ -21,7 +21,7 @@ import org.opentripplanner.routing.api.request.request.filter.AllowAllTransitFilter; import org.opentripplanner.routing.api.request.request.filter.TransitFilter; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; @@ -52,7 +52,7 @@ public static void onlyOnce() { File file = ResourceLoader.of(TriangleInequalityTest.class).file("NYC_small.osm.pbf"); OsmProvider provider = new OsmProvider(file, true); OsmModule osmModule = OsmModule - .of(provider, graph, new VehicleParkingService()) + .of(provider, graph, new DefaultVehicleParkingService()) .withAreaVisibility(true) .build(); osmModule.buildGraph(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java index 72b1ae6d374..7837f757b92 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java @@ -13,7 +13,7 @@ import org.opentripplanner.graph_builder.module.TestStreetLinkerModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.street.model.edge.StreetVehicleParkingLink; import org.opentripplanner.street.model.edge.VehicleParkingEdge; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; @@ -163,7 +163,7 @@ private Graph buildOsmGraph(String osmFileName, DataImportIssueStore issueStore) var timetableRepository = new TimetableRepository(siteRepository, deduplicator); OsmProvider provider = new OsmProvider(RESOURCE_LOADER.file(osmFileName), false); OsmModule loader = OsmModule - .of(provider, graph, new VehicleParkingService()) + .of(provider, graph, new DefaultVehicleParkingService()) .withIssueStore(issueStore) .withAreaVisibility(true) .withStaticParkAndRide(true) diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java index 291e3475b74..5c898fe446e 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java @@ -10,7 +10,7 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.api.request.StreetMode; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; @@ -39,7 +39,7 @@ public void setUp() throws Exception { var osmDataFile = ResourceLoader.of(UnroutableTest.class).file("bridge_construction.osm.pbf"); OsmProvider provider = new OsmProvider(osmDataFile, true); OsmModule osmBuilder = OsmModule - .of(provider, graph, new VehicleParkingService()) + .of(provider, graph, new DefaultVehicleParkingService()) .withAreaVisibility(true) .build(); osmBuilder.buildGraph(); diff --git a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java index 2f5f70da908..39350f01803 100644 --- a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java +++ b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java @@ -23,6 +23,7 @@ import org.opentripplanner.ext.emissions.EmissionsDataModel; import org.opentripplanner.framework.geometry.HashGridSpatialIndex; import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeRepository; @@ -68,7 +69,7 @@ public void testRoundTripSerializationForGTFSGraph() throws Exception { TestOtpModel model = ConstantsForTests.buildNewPortlandGraph(true); var weRepo = new DefaultWorldEnvelopeRepository(); var emissionsDataModel = new EmissionsDataModel(); - var parkingService = new VehicleParkingService(); + var parkingService = new DefaultVehicleParkingService(); testRoundTrip( model.graph(), model.timetableRepository(), @@ -86,7 +87,7 @@ public void testRoundTripSerializationForNetexGraph() throws Exception { TestOtpModel model = ConstantsForTests.buildNewMinimalNetexGraph(); var worldEnvelopeRepository = new DefaultWorldEnvelopeRepository(); var emissionsDataModel = new EmissionsDataModel(); - var parkingService = new VehicleParkingService(); + var parkingService = new DefaultVehicleParkingService(); testRoundTrip( model.graph(), model.timetableRepository(), diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java index 1366f85c788..347262449cb 100644 --- a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java +++ b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java @@ -23,7 +23,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graph.SerializedGraphObject; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.standalone.OtpStartupInfo; import org.opentripplanner.standalone.api.OtpServerRequestContext; @@ -99,7 +99,7 @@ public SpeedTest( graph, new DefaultRealtimeVehicleService(transitService), new DefaultVehicleRentalService(), - new VehicleParkingService(), + new DefaultVehicleParkingService(), timetableRepository, config.updatersConfig ); diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java index 1a8ffb563ed..451d8c6e77a 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java @@ -12,6 +12,7 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.I18NString; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; @@ -95,7 +96,7 @@ void notFound() { } private static VehicleParkingService buildParkingService(VehicleParkingSpaces capacity) { - var service = new VehicleParkingService(); + var service = new DefaultVehicleParkingService(); var parking = parkingBuilder() .carPlaces(capacity.getCarSpaces() != null) diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java index b3ea76928c6..81aea5ea8db 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java @@ -11,6 +11,7 @@ import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingTestGraphData; import org.opentripplanner.service.vehicleparking.VehicleParkingTestUtil; @@ -45,7 +46,7 @@ public void setup() { graphData.initGraph(); graph = graphData.getGraph(); timetableRepository = graphData.getTimetableRepository(); - vehicleParkingService = new VehicleParkingService(); + vehicleParkingService = new DefaultVehicleParkingService(); realTimeUpdateContext = new DefaultRealTimeUpdateContext(graph, timetableRepository); dataSource = (DataSource) Mockito.mock(DataSource.class); From a23ab8413b5b493a3e7649cf8fda6cccdb11203f Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Sun, 10 Nov 2024 23:10:28 +0100 Subject: [PATCH 047/169] Split vehicle parking into service and repository --- .../VehicleParkingGroupsLayerTest.java | 4 +-- .../VehicleParkingsLayerTest.java | 3 +- .../graph_builder/GraphBuilder.java | 6 ++-- .../module/StreetLinkerModule.java | 10 +++--- .../module/configure/GraphBuilderFactory.java | 4 +-- .../module/configure/GraphBuilderModules.java | 14 ++++---- .../graph_builder/module/osm/OsmModule.java | 14 ++++---- .../module/osm/OsmModuleBuilder.java | 10 +++--- .../opentripplanner/netex/NetexModule.java | 10 +++--- .../netex/configure/NetexConfigure.java | 6 ++-- .../VehicleParkingRepository.java | 14 ++++++++ .../vehicleparking/VehicleParkingService.java | 11 +++---- ...eModule.java => VehicleParkingModule.java} | 8 +++-- .../DefaultVehicleParkingService.java | 4 ++- .../configure/ConstructApplication.java | 9 ++++-- .../ConstructApplicationFactory.java | 9 +++--- .../configure/LoadApplicationFactory.java | 4 +-- .../configure/UpdaterConfigurator.java | 25 +++++++++++---- .../VehicleParkingAvailabilityUpdater.java | 12 ++++--- .../VehicleParkingUpdater.java | 10 +++--- .../opentripplanner/TestServerContext.java | 2 +- .../apis/gtfs/GraphQLIntegrationTest.java | 3 +- .../module/TestStreetLinkerModule.java | 6 ++-- .../module/VehicleParkingLinkingTest.java | 2 +- .../module/osm/OsmModuleTest.java | 2 +- .../routing/graph/GraphSerializationTest.java | 2 +- .../transit/speed_test/SpeedTest.java | 1 + ...VehicleParkingAvailabilityUpdaterTest.java | 6 ++-- .../VehicleParkingUpdaterTest.java | 32 ++++++++----------- 29 files changed, 140 insertions(+), 103 deletions(-) create mode 100644 application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java rename application/src/main/java/org/opentripplanner/service/vehicleparking/configure/{VehicleParkingServiceModule.java => VehicleParkingModule.java} (63%) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java index c7134c1ca31..06a6d7088a1 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java @@ -19,8 +19,8 @@ import org.opentripplanner.framework.i18n.TranslatedString; import org.opentripplanner.inspector.vector.KeyValue; import org.opentripplanner.inspector.vector.LayerParameters; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; @@ -90,7 +90,7 @@ public void setUp() { @Test public void vehicleParkingGroupGeometryTest() { - VehicleParkingService service = new DefaultVehicleParkingService(); + var service = new DefaultVehicleParkingService(); service.updateVehicleParking(List.of(vehicleParking), List.of()); var config = diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java index 112c3e70571..4e4b5e507af 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java @@ -24,7 +24,6 @@ import org.opentripplanner.framework.i18n.TranslatedString; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; @@ -86,7 +85,7 @@ public void setUp() { @Test public void vehicleParkingGeometryTest() { - VehicleParkingService service = new DefaultVehicleParkingService(); + var service = new DefaultVehicleParkingService(); service.updateVehicleParking(List.of(vehicleParking), List.of()); var config = diff --git a/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java b/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java index 104a75593fa..6fad376e374 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/GraphBuilder.java @@ -18,7 +18,7 @@ import org.opentripplanner.graph_builder.model.GraphBuilderModule; import org.opentripplanner.graph_builder.module.configure.DaggerGraphBuilderFactory; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.street.model.StreetLimitationParameters; @@ -64,7 +64,7 @@ public static GraphBuilder create( Graph graph, TimetableRepository timetableRepository, WorldEnvelopeRepository worldEnvelopeRepository, - VehicleParkingService vehicleParkingService, + VehicleParkingRepository vehicleParkingService, @Nullable EmissionsDataModel emissionsDataModel, @Nullable StopConsolidationRepository stopConsolidationRepository, StreetLimitationParameters streetLimitationParameters, @@ -84,7 +84,7 @@ public static GraphBuilder create( .graph(graph) .timetableRepository(timetableRepository) .worldEnvelopeRepository(worldEnvelopeRepository) - .vehicleParkingService(vehicleParkingService) + .vehicleParkingRepository(vehicleParkingService) .stopConsolidationRepository(stopConsolidationRepository) .streetLimitationParameters(streetLimitationParameters) .dataSources(dataSources) diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java b/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java index eadad8dc9b4..83a6f282204 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/StreetLinkerModule.java @@ -11,7 +11,7 @@ import org.opentripplanner.graph_builder.model.GraphBuilderModule; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.linking.LinkingDirection; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; import org.opentripplanner.street.model.edge.Edge; @@ -49,20 +49,20 @@ public class StreetLinkerModule implements GraphBuilderModule { private static final TraverseModeSet CAR_ONLY = new TraverseModeSet(TraverseMode.CAR); private static final TraverseModeSet WALK_ONLY = new TraverseModeSet(TraverseMode.WALK); private final Graph graph; - private final VehicleParkingService parkingService; + private final VehicleParkingRepository parkingRepository; private final TimetableRepository timetableRepository; private final DataImportIssueStore issueStore; private final Boolean addExtraEdgesToAreas; public StreetLinkerModule( Graph graph, - VehicleParkingService parkingService, + VehicleParkingRepository parkingRepository, TimetableRepository timetableRepository, DataImportIssueStore issueStore, boolean addExtraEdgesToAreas ) { this.graph = graph; - this.parkingService = parkingService; + this.parkingRepository = parkingRepository; this.timetableRepository = timetableRepository; this.issueStore = issueStore; this.addExtraEdgesToAreas = addExtraEdgesToAreas; @@ -314,7 +314,7 @@ private void linkVehicleParks(Graph graph, DataImportIssueStore issueStore) { } } if (!vehicleParkingToRemove.isEmpty()) { - parkingService.updateVehicleParking(List.of(), vehicleParkingToRemove); + parkingRepository.updateVehicleParking(List.of(), vehicleParkingToRemove); } } diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java index 8b95ce5d283..d4d00fdc2a0 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderFactory.java @@ -30,7 +30,7 @@ import org.opentripplanner.gtfs.graphbuilder.GtfsModule; import org.opentripplanner.netex.NetexModule; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.street.model.StreetLimitationParameters; @@ -89,7 +89,7 @@ Builder stopConsolidationRepository( ); @BindsInstance - Builder vehicleParkingService(VehicleParkingService parkingService); + Builder vehicleParkingRepository(VehicleParkingRepository parkingRepository); @BindsInstance Builder streetLimitationParameters(StreetLimitationParameters streetLimitationParameters); diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java index 3cec9aaf7bf..5371142d612 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/configure/GraphBuilderModules.java @@ -43,7 +43,7 @@ import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.api.request.preference.WalkPreferences; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.street.model.StreetLimitationParameters; import org.opentripplanner.transit.service.TimetableRepository; @@ -60,7 +60,7 @@ static OsmModule provideOsmModule( GraphBuilderDataSources dataSources, BuildConfig config, Graph graph, - VehicleParkingService parkingService, + VehicleParkingRepository parkingService, DataImportIssueStore issueStore, StreetLimitationParameters streetLimitationParameters ) { @@ -141,7 +141,7 @@ static NetexModule provideNetexModule( BuildConfig config, Graph graph, TimetableRepository timetableRepository, - VehicleParkingService parkingService, + VehicleParkingRepository parkingService, DataImportIssueStore issueStore ) { return new NetexConfigure(config) @@ -159,13 +159,13 @@ static NetexModule provideNetexModule( static StreetLinkerModule provideStreetLinkerModule( BuildConfig config, Graph graph, - VehicleParkingService parkingService, + VehicleParkingRepository parkingRepository, TimetableRepository timetableRepository, DataImportIssueStore issueStore ) { return new StreetLinkerModule( graph, - parkingService, + parkingRepository, timetableRepository, issueStore, config.areaVisibility @@ -177,7 +177,7 @@ static StreetLinkerModule provideStreetLinkerModule( static PruneIslands providePruneIslands( BuildConfig config, Graph graph, - VehicleParkingService parkingService, + VehicleParkingRepository parkingRepository, TimetableRepository timetableRepository, DataImportIssueStore issueStore ) { @@ -187,7 +187,7 @@ static PruneIslands providePruneIslands( issueStore, new StreetLinkerModule( graph, - parkingService, + parkingRepository, timetableRepository, issueStore, config.areaVisibility diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java index b026171f557..e3618d6f93d 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModule.java @@ -25,7 +25,7 @@ import org.opentripplanner.osm.wayproperty.WayProperties; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.util.ElevationUtils; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.street.model.StreetLimitationParameters; import org.opentripplanner.street.model.StreetTraversalPermission; @@ -52,7 +52,7 @@ public class OsmModule implements GraphBuilderModule { */ private final List providers; private final Graph graph; - private final VehicleParkingService parkingService; + private final VehicleParkingRepository parkingRepository; private final DataImportIssueStore issueStore; private final OsmProcessingParameters params; private final SafetyValueNormalizer normalizer; @@ -63,7 +63,7 @@ public class OsmModule implements GraphBuilderModule { OsmModule( Collection providers, Graph graph, - VehicleParkingService parkingService, + VehicleParkingRepository parkingService, DataImportIssueStore issueStore, StreetLimitationParameters streetLimitationParameters, OsmProcessingParameters params @@ -76,13 +76,13 @@ public class OsmModule implements GraphBuilderModule { this.vertexGenerator = new VertexGenerator(osmdb, graph, params.boardingAreaRefTags()); this.normalizer = new SafetyValueNormalizer(graph, issueStore); this.streetLimitationParameters = Objects.requireNonNull(streetLimitationParameters); - this.parkingService = parkingService; + this.parkingRepository = parkingService; } public static OsmModuleBuilder of( Collection providers, Graph graph, - VehicleParkingService service + VehicleParkingRepository service ) { return new OsmModuleBuilder(providers, graph, service); } @@ -90,7 +90,7 @@ public static OsmModuleBuilder of( public static OsmModuleBuilder of( OsmProvider provider, Graph graph, - VehicleParkingService service + VehicleParkingRepository service ) { return of(List.of(provider), graph, service); } @@ -175,7 +175,7 @@ private void build() { } if (!parkingLots.isEmpty()) { - parkingService.updateVehicleParking(parkingLots, List.of()); + parkingRepository.updateVehicleParking(parkingLots, List.of()); } var elevatorProcessor = new ElevatorProcessor(issueStore, osmdb, vertexGenerator); diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java index 1f66fa65308..2f7f4c506c9 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmModuleBuilder.java @@ -8,7 +8,7 @@ import org.opentripplanner.graph_builder.services.osm.EdgeNamer; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.street.model.StreetLimitationParameters; /** @@ -18,7 +18,7 @@ public class OsmModuleBuilder { private final Collection providers; private final Graph graph; - private final VehicleParkingService parkingService; + private final VehicleParkingRepository parkingRepository; private Set boardingAreaRefTags = Set.of(); private DataImportIssueStore issueStore = DataImportIssueStore.NOOP; private EdgeNamer edgeNamer = new DefaultNamer(); @@ -32,11 +32,11 @@ public class OsmModuleBuilder { OsmModuleBuilder( Collection providers, Graph graph, - VehicleParkingService parkingService + VehicleParkingRepository parkingRepository ) { this.providers = providers; this.graph = graph; - this.parkingService = parkingService; + this.parkingRepository = parkingRepository; } public OsmModuleBuilder withBoardingAreaRefTags(Set boardingAreaRefTags) { @@ -88,7 +88,7 @@ public OsmModule build() { return new OsmModule( providers, graph, - parkingService, + parkingRepository, issueStore, streetLimitationParameters, new OsmProcessingParameters( diff --git a/application/src/main/java/org/opentripplanner/netex/NetexModule.java b/application/src/main/java/org/opentripplanner/netex/NetexModule.java index 7d0dcbe0335..e5422c5ac77 100644 --- a/application/src/main/java/org/opentripplanner/netex/NetexModule.java +++ b/application/src/main/java/org/opentripplanner/netex/NetexModule.java @@ -13,7 +13,7 @@ import org.opentripplanner.model.calendar.ServiceDateInterval; import org.opentripplanner.model.impl.OtpTransitServiceBuilder; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.transit.service.TimetableRepository; @@ -30,7 +30,7 @@ public class NetexModule implements GraphBuilderModule { private final Graph graph; private final TimetableRepository timetableRepository; - private final VehicleParkingService parkingService; + private final VehicleParkingRepository parkingRepository; private final DataImportIssueStore issueStore; /** @@ -44,7 +44,7 @@ public class NetexModule implements GraphBuilderModule { public NetexModule( Graph graph, TimetableRepository timetableRepository, - VehicleParkingService parkingService, + VehicleParkingRepository parkingRepository, DataImportIssueStore issueStore, int subwayAccessTime, ServiceDateInterval transitPeriodLimit, @@ -52,7 +52,7 @@ public NetexModule( ) { this.graph = graph; this.timetableRepository = timetableRepository; - this.parkingService = parkingService; + this.parkingRepository = parkingRepository; this.issueStore = issueStore; this.subwayAccessTime = subwayAccessTime; this.transitPeriodLimit = transitPeriodLimit; @@ -107,7 +107,7 @@ public void buildGraph() { timetableRepository.validateTimeZones(); var lots = transitBuilder.vehicleParkings(); - parkingService.updateVehicleParking(lots, List.of()); + parkingRepository.updateVehicleParking(lots, List.of()); var linker = new VehicleParkingHelper(graph); lots.forEach(linker::linkVehicleParkingToGraph); } diff --git a/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java b/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java index 47a51d580f4..5771828395e 100644 --- a/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java +++ b/application/src/main/java/org/opentripplanner/netex/configure/NetexConfigure.java @@ -11,7 +11,7 @@ import org.opentripplanner.netex.config.NetexFeedParameters; import org.opentripplanner.netex.loader.NetexDataSourceHierarchy; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.transit.service.TimetableRepository; @@ -37,7 +37,7 @@ public NetexConfigure(BuildConfig builderParams) { public NetexModule createNetexModule( Iterable> netexSources, TimetableRepository timetableRepository, - VehicleParkingService parkingService, + VehicleParkingRepository parkingRepsitory, Graph graph, DataImportIssueStore issueStore ) { @@ -54,7 +54,7 @@ public NetexModule createNetexModule( return new NetexModule( graph, timetableRepository, - parkingService, + parkingRepsitory, issueStore, buildParams.getSubwayAccessTimeSeconds(), buildParams.getTransitServicePeriod(), diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java new file mode 100644 index 00000000000..f08e26ecb99 --- /dev/null +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java @@ -0,0 +1,14 @@ +package org.opentripplanner.service.vehicleparking; + +import java.util.Collection; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; + +/** + * The writable data store of parking facilities. + */ +public interface VehicleParkingRepository { + void updateVehicleParking( + Collection parkingToAdd, + Collection parkingToRemove + ); +} diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java index 753d390d2c2..3ca13165a05 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java @@ -1,17 +1,16 @@ package org.opentripplanner.service.vehicleparking; import com.google.common.collect.ImmutableListMultimap; -import java.util.Collection; import java.util.stream.Stream; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; +/** + * The read-only service for getting information about parking facilities. + *

+ * For writing data see {@link VehicleParkingRepository} + */ public interface VehicleParkingService { - void updateVehicleParking( - Collection parkingToAdd, - Collection parkingToRemove - ); - Stream getBikeParks(); Stream getCarParks(); diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingModule.java similarity index 63% rename from application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java rename to application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingModule.java index 8b6cb3af7c7..c7224f28dd6 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingModule.java @@ -2,11 +2,15 @@ import dagger.Binds; import dagger.Module; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; @Module -public interface VehicleParkingServiceModule { +public interface VehicleParkingModule { @Binds VehicleParkingService bindService(DefaultVehicleParkingService service); + + @Binds + VehicleParkingRepository bindRepository(DefaultVehicleParkingService service); } diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java index 7c860dd5d94..6f51d84ec66 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java @@ -10,6 +10,7 @@ import java.util.HashSet; import java.util.Set; import java.util.stream.Stream; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; @@ -23,7 +24,8 @@ *

THIS CLASS IS THREAD-SAFE

*/ @Singleton -public class DefaultVehicleParkingService implements Serializable, VehicleParkingService { +public class DefaultVehicleParkingService + implements Serializable, VehicleParkingService, VehicleParkingRepository { @Inject public DefaultVehicleParkingService() {} diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java index 64a63cf84af..c49a5ae9477 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java @@ -19,6 +19,7 @@ import org.opentripplanner.routing.algorithm.raptoradapter.transit.mappers.TransitLayerUpdater; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleRepository; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalRepository; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; @@ -95,7 +96,6 @@ public class ConstructApplication { .timetableRepository(timetableRepository) .graphVisualizer(graphVisualizer) .worldEnvelopeRepository(worldEnvelopeRepository) - .vehicleParkingService(vehicleParkingService) .emissionsDataModel(emissionsDataModel) .dataImportIssueSummary(issueSummary) .stopConsolidationRepository(stopConsolidationRepository) @@ -130,7 +130,7 @@ public GraphBuilder createGraphBuilder() { graph(), timetableRepository(), factory.worldEnvelopeRepository(), - factory.vehicleParkingService(), + factory.vehicleParkingRepository(), factory.emissionsDataModel(), factory.stopConsolidationRepository(), factory.streetLimitationParameters(), @@ -167,6 +167,7 @@ private void setupTransitRoutingServer() { graph(), realtimeVehicleRepository(), vehicleRentalRepository(), + vehicleParkingRepository(), vehicleParkingService(), timetableRepository(), routerConfig().updaterConfig() @@ -275,6 +276,10 @@ public VehicleParkingService vehicleParkingService() { return factory.vehicleParkingService(); } + public VehicleParkingRepository vehicleParkingRepository() { + return factory.vehicleParkingRepository(); + } + public Graph graph() { return factory.graph(); } diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java index 9a484dec5c3..a5166d5ad64 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java @@ -22,7 +22,9 @@ import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.configure.RealtimeVehicleRepositoryModule; import org.opentripplanner.service.realtimevehicles.configure.RealtimeVehicleServiceModule; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.configure.VehicleParkingModule; import org.opentripplanner.service.vehiclerental.VehicleRentalRepository; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.vehiclerental.configure.VehicleRentalRepositoryModule; @@ -55,6 +57,7 @@ RealtimeVehicleRepositoryModule.class, VehicleRentalServiceModule.class, VehicleRentalRepositoryModule.class, + VehicleParkingModule.class, ConstructApplicationModule.class, RideHailingServicesModule.class, EmissionsServiceModule.class, @@ -75,8 +78,9 @@ public interface ConstructApplicationFactory { RealtimeVehicleRepository realtimeVehicleRepository(); RealtimeVehicleService realtimeVehicleService(); VehicleRentalRepository vehicleRentalRepository(); - VehicleParkingService vehicleParkingService(); VehicleRentalService vehicleRentalService(); + VehicleParkingRepository vehicleParkingRepository(); + VehicleParkingService vehicleParkingService(); DataImportIssueSummary dataImportIssueSummary(); @Nullable @@ -118,9 +122,6 @@ interface Builder { @BindsInstance Builder worldEnvelopeRepository(WorldEnvelopeRepository worldEnvelopeRepository); - @BindsInstance - Builder vehicleParkingService(VehicleParkingService vehicleParkingService); - @BindsInstance Builder stopConsolidationRepository( @Nullable StopConsolidationRepository stopConsolidationRepository diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java index e269393e039..3ccafc88ec5 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java @@ -12,7 +12,7 @@ import org.opentripplanner.graph_builder.GraphBuilderDataSources; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.vehicleparking.VehicleParkingService; -import org.opentripplanner.service.vehicleparking.configure.VehicleParkingServiceModule; +import org.opentripplanner.service.vehicleparking.configure.VehicleParkingModule; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.configure.WorldEnvelopeRepositoryModule; import org.opentripplanner.standalone.config.CommandLineParameters; @@ -32,7 +32,7 @@ GsDataSourceModule.class, WorldEnvelopeRepositoryModule.class, StopConsolidationRepositoryModule.class, - VehicleParkingServiceModule.class, + VehicleParkingModule.class, } ) public interface LoadApplicationFactory { diff --git a/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java b/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java index 3be06edd7e2..74ecd9ad4bf 100644 --- a/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java +++ b/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java @@ -12,6 +12,7 @@ import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleRepository; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalRepository; import org.opentripplanner.transit.service.TimetableRepository; @@ -50,7 +51,8 @@ public class UpdaterConfigurator { private final UpdatersParameters updatersParameters; private final RealtimeVehicleRepository realtimeVehicleRepository; private final VehicleRentalRepository vehicleRentalRepository; - private final VehicleParkingService vehicleParkingService; + private final VehicleParkingRepository parkingRepository; + private final VehicleParkingService parkingService; private SiriTimetableSnapshotSource siriTimetableSnapshotSource = null; private TimetableSnapshotSource gtfsTimetableSnapshotSource = null; @@ -58,7 +60,8 @@ private UpdaterConfigurator( Graph graph, RealtimeVehicleRepository realtimeVehicleRepository, VehicleRentalRepository vehicleRentalRepository, - VehicleParkingService vehicleParkingService, + VehicleParkingRepository parkingRepository, + VehicleParkingService parkingService, TimetableRepository timetableRepository, UpdatersParameters updatersParameters ) { @@ -67,14 +70,16 @@ private UpdaterConfigurator( this.vehicleRentalRepository = vehicleRentalRepository; this.timetableRepository = timetableRepository; this.updatersParameters = updatersParameters; - this.vehicleParkingService = vehicleParkingService; + this.parkingRepository = parkingRepository; + this.parkingService = parkingService; } public static void configure( Graph graph, RealtimeVehicleRepository realtimeVehicleRepository, VehicleRentalRepository vehicleRentalRepository, - VehicleParkingService vehicleParkingService, + VehicleParkingRepository parkingRepository, + VehicleParkingService parkingService, TimetableRepository timetableRepository, UpdatersParameters updatersParameters ) { @@ -82,7 +87,8 @@ public static void configure( graph, realtimeVehicleRepository, vehicleRentalRepository, - vehicleParkingService, + parkingRepository, + parkingService, timetableRepository, updatersParameters ) @@ -201,13 +207,18 @@ private List createUpdatersFromConfig() { openingHoursCalendarService ); updaters.add( - new VehicleParkingUpdater(configItem, source, graph.getLinker(), vehicleParkingService) + new VehicleParkingUpdater(configItem, source, graph.getLinker(), parkingRepository) ); } case AVAILABILITY_ONLY -> { var source = AvailabilityDatasourceFactory.create(configItem); updaters.add( - new VehicleParkingAvailabilityUpdater(configItem, source, vehicleParkingService) + new VehicleParkingAvailabilityUpdater( + configItem, + source, + parkingRepository, + parkingService + ) ); } } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java index 03c820a58e4..8ad92c5f929 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java @@ -4,6 +4,7 @@ import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; @@ -27,18 +28,21 @@ public class VehicleParkingAvailabilityUpdater extends PollingGraphUpdater { VehicleParkingAvailabilityUpdater.class ); private final DataSource source; + private final VehicleParkingService service; private WriteToGraphCallback saveResultOnGraph; - private final VehicleParkingService vehicleParkingService; + private final VehicleParkingRepository repository; public VehicleParkingAvailabilityUpdater( VehicleParkingUpdaterParameters parameters, DataSource source, - VehicleParkingService vehicleParkingService + VehicleParkingRepository parkingRepository, + VehicleParkingService parkingService ) { super(parameters); this.source = source; - this.vehicleParkingService = vehicleParkingService; + this.repository = parkingRepository; + this.service = parkingService; LOG.info("Creating vehicle-parking updater running every {}: {}", pollingPeriod(), source); } @@ -66,7 +70,7 @@ private class AvailabilityUpdater implements GraphWriterRunnable { private AvailabilityUpdater(List updates) { this.updates = List.copyOf(updates); this.parkingById = - vehicleParkingService + service .getVehicleParkings() .collect(Collectors.toUnmodifiableMap(VehicleParking::getId, Function.identity())); } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java index d4b8e8b7b71..8e4cf8a862b 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdater.java @@ -12,7 +12,7 @@ import org.opentripplanner.routing.linking.DisposableEdgeCollection; import org.opentripplanner.routing.linking.LinkingDirection; import org.opentripplanner.routing.linking.VertexLinker; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; @@ -45,20 +45,20 @@ public class VehicleParkingUpdater extends PollingGraphUpdater { private WriteToGraphCallback saveResultOnGraph; private final VertexLinker linker; - private final VehicleParkingService vehicleParkingService; + private final VehicleParkingRepository parkingRepository; public VehicleParkingUpdater( VehicleParkingUpdaterParameters parameters, DataSource source, VertexLinker vertexLinker, - VehicleParkingService vehicleParkingService + VehicleParkingRepository parkingRepository ) { super(parameters); this.source = source; // Creation of network linker library will not modify the graph this.linker = vertexLinker; // Adding a vehicle parking station service needs a graph writer runnable - this.vehicleParkingService = vehicleParkingService; + this.parkingRepository = parkingRepository; LOG.info("Creating vehicle-parking updater running every {}: {}", pollingPeriod(), source); } @@ -155,7 +155,7 @@ public void run(RealTimeUpdateContext context) { tempEdgesByPark.put(updatedVehicleParking, disposableEdgeCollectionsForVertex); } - vehicleParkingService.updateVehicleParking(toAdd, toRemove); + parkingRepository.updateVehicleParking(toAdd, toRemove); oldVehicleParkings.removeAll(toRemove); oldVehicleParkings.addAll(toAdd); diff --git a/application/src/test/java/org/opentripplanner/TestServerContext.java b/application/src/test/java/org/opentripplanner/TestServerContext.java index b9631593f27..3e4f69f54a4 100644 --- a/application/src/test/java/org/opentripplanner/TestServerContext.java +++ b/application/src/test/java/org/opentripplanner/TestServerContext.java @@ -11,8 +11,8 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeService; diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java index e0930ad8cd5..9070f4f1375 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java @@ -71,7 +71,6 @@ import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.service.vehiclerental.model.TestFreeFloatingRentalVehicleBuilder; @@ -142,7 +141,7 @@ class GraphQLIntegrationTest { private static GraphQLRequestContext context; private static final Deduplicator DEDUPLICATOR = new Deduplicator(); - private static final VehicleParkingService parkingService = new DefaultVehicleParkingService(); + private static final DefaultVehicleParkingService parkingService = new DefaultVehicleParkingService(); @BeforeAll static void setup() { diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java index 0ed7edd6653..ee405713f73 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java @@ -2,8 +2,8 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.transit.service.TimetableRepository; public class TestStreetLinkerModule { @@ -15,12 +15,12 @@ public static void link(Graph graph, TimetableRepository timetableRepository) { public static void link( Graph graph, - VehicleParkingService vehicleParkingService, + VehicleParkingRepository parkingRepository, TimetableRepository timetableRepository ) { new StreetLinkerModule( graph, - vehicleParkingService, + parkingRepository, timetableRepository, DataImportIssueStore.NOOP, false diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java index 9d6fc3ee54b..4f32ab60e76 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java @@ -9,8 +9,8 @@ import org.junit.jupiter.api.Test; import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingTestGraphData; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; import org.opentripplanner.street.model.StreetTraversalPermission; import org.opentripplanner.street.model._data.StreetModelForTest; diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java index 49efdb6d47e..dc40bda6654 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java @@ -32,8 +32,8 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.impl.GraphPathFinder; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetEdge; import org.opentripplanner.street.model.vertex.BarrierVertex; diff --git a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java index 39350f01803..f023b14a737 100644 --- a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java +++ b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java @@ -23,8 +23,8 @@ import org.opentripplanner.ext.emissions.EmissionsDataModel; import org.opentripplanner.framework.geometry.HashGridSpatialIndex; import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java index 347262449cb..10e456d9eb7 100644 --- a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java +++ b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java @@ -100,6 +100,7 @@ public SpeedTest( new DefaultRealtimeVehicleService(transitService), new DefaultVehicleRentalService(), new DefaultVehicleParkingService(), + new DefaultVehicleParkingService(), timetableRepository, config.updatersConfig ); diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java index 451d8c6e77a..e9ce4226318 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java @@ -13,7 +13,6 @@ import org.opentripplanner.framework.i18n.I18NString; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.standalone.config.routerconfig.updaters.VehicleParkingUpdaterConfig; @@ -51,6 +50,7 @@ void updateCarAvailability() { var updater = new VehicleParkingAvailabilityUpdater( PARAMETERS, new StubDatasource(DEFAULT_UPDATE), + service, service ); @@ -68,6 +68,7 @@ void updateBicycleAvailability() { var updater = new VehicleParkingAvailabilityUpdater( PARAMETERS, new StubDatasource(DEFAULT_UPDATE), + service, service ); @@ -85,6 +86,7 @@ void notFound() { var updater = new VehicleParkingAvailabilityUpdater( PARAMETERS, new StubDatasource(new AvailabiltyUpdate(id("not-found"), 100)), + service, service ); @@ -95,7 +97,7 @@ void notFound() { assertNull(updated.getAvailability()); } - private static VehicleParkingService buildParkingService(VehicleParkingSpaces capacity) { + private static DefaultVehicleParkingService buildParkingService(VehicleParkingSpaces capacity) { var service = new DefaultVehicleParkingService(); var parking = parkingBuilder() diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java index 81aea5ea8db..b035cd02b56 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java @@ -11,10 +11,9 @@ import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.VehicleParkingTestGraphData; import org.opentripplanner.service.vehicleparking.VehicleParkingTestUtil; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; @@ -37,7 +36,7 @@ class VehicleParkingUpdaterTest { private DefaultRealTimeUpdateContext realTimeUpdateContext; private VehicleParkingUpdater vehicleParkingUpdater; - private VehicleParkingService vehicleParkingService; + private DefaultVehicleParkingService parkingService; @BeforeEach @SuppressWarnings("unchecked") @@ -46,7 +45,7 @@ public void setup() { graphData.initGraph(); graph = graphData.getGraph(); timetableRepository = graphData.getTimetableRepository(); - vehicleParkingService = new DefaultVehicleParkingService(); + parkingService = new DefaultVehicleParkingService(); realTimeUpdateContext = new DefaultRealTimeUpdateContext(graph, timetableRepository); dataSource = (DataSource) Mockito.mock(DataSource.class); @@ -77,7 +76,7 @@ public String configRef() { } }; vehicleParkingUpdater = - new VehicleParkingUpdater(parameters, dataSource, graph.getLinker(), vehicleParkingService); + new VehicleParkingUpdater(parameters, dataSource, graph.getLinker(), parkingService); } @Test @@ -105,10 +104,7 @@ void updateVehicleParkingTest() { assertVehicleParkingsInGraph(1); - var vehicleParkingInGraph = vehicleParkingService - .getVehicleParkings() - .findFirst() - .orElseThrow(); + var vehicleParkingInGraph = parkingService.getVehicleParkings().findFirst().orElseThrow(); assertEquals(vehiclePlaces, vehicleParkingInGraph.getAvailability()); assertEquals(vehiclePlaces, vehicleParkingInGraph.getCapacity()); @@ -121,7 +117,7 @@ void updateVehicleParkingTest() { assertVehicleParkingsInGraph(1); - vehicleParkingInGraph = vehicleParkingService.getVehicleParkings().findFirst().orElseThrow(); + vehicleParkingInGraph = parkingService.getVehicleParkings().findFirst().orElseThrow(); assertEquals(vehiclePlaces, vehicleParkingInGraph.getAvailability()); assertEquals(vehiclePlaces, vehicleParkingInGraph.getCapacity()); } @@ -156,7 +152,7 @@ void addNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, vehicleParkingService.getVehicleParkings().count()); + assertEquals(1, parkingService.getVehicleParkings().count()); assertVehicleParkingNotLinked(); } @@ -173,10 +169,10 @@ void updateNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, vehicleParkingService.getVehicleParkings().count()); + assertEquals(1, parkingService.getVehicleParkings().count()); assertEquals( vehiclePlaces, - vehicleParkingService.getVehicleParkings().findFirst().orElseThrow().getAvailability() + parkingService.getVehicleParkings().findFirst().orElseThrow().getAvailability() ); assertVehicleParkingNotLinked(); @@ -192,10 +188,10 @@ void updateNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, vehicleParkingService.getVehicleParkings().count()); + assertEquals(1, parkingService.getVehicleParkings().count()); assertEquals( vehiclePlaces, - vehicleParkingService.getVehicleParkings().findFirst().orElseThrow().getAvailability() + parkingService.getVehicleParkings().findFirst().orElseThrow().getAvailability() ); assertVehicleParkingNotLinked(); } @@ -210,12 +206,12 @@ void deleteNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, vehicleParkingService.getVehicleParkings().count()); + assertEquals(1, parkingService.getVehicleParkings().count()); when(dataSource.getUpdates()).thenReturn(List.of()); runUpdaterOnce(); - assertEquals(0, vehicleParkingService.getVehicleParkings().count()); + assertEquals(0, parkingService.getVehicleParkings().count()); } private void assertVehicleParkingsInGraph(int vehicleParkingNumber) { @@ -256,7 +252,7 @@ private void assertVehicleParkingsInGraph(int vehicleParkingNumber) { ); } - assertEquals(vehicleParkingNumber, vehicleParkingService.getVehicleParkings().count()); + assertEquals(vehicleParkingNumber, parkingService.getVehicleParkings().count()); } private void runUpdaterOnce() { From f063bd992803ab1087a7a95b72e45482e546df6b Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Sun, 10 Nov 2024 23:33:25 +0100 Subject: [PATCH 048/169] Split into two modules --- .../routing/graph/SerializedGraphObject.java | 8 ++++---- .../configure/VehicleParkingRepositoryModule.java | 13 +++++++++++++ ...Module.java => VehicleParkingServiceModule.java} | 6 +----- .../org/opentripplanner/standalone/OTPMain.java | 2 +- .../standalone/configure/ConstructApplication.java | 3 ++- .../configure/ConstructApplicationFactory.java | 9 +++++++-- .../standalone/configure/LoadApplication.java | 10 +++++----- .../configure/LoadApplicationFactory.java | 8 ++++---- .../routing/graph/GraphSerializationTest.java | 6 +++--- 9 files changed, 40 insertions(+), 25 deletions(-) create mode 100644 application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java rename application/src/main/java/org/opentripplanner/service/vehicleparking/configure/{VehicleParkingModule.java => VehicleParkingServiceModule.java} (63%) diff --git a/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java b/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java index 60fbb595c5c..a152b96682d 100644 --- a/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java +++ b/application/src/main/java/org/opentripplanner/routing/graph/SerializedGraphObject.java @@ -25,7 +25,7 @@ import org.opentripplanner.model.projectinfo.GraphFileHeader; import org.opentripplanner.model.projectinfo.OtpProjectInfo; import org.opentripplanner.routing.graph.kryosupport.KryoBuilder; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; import org.opentripplanner.standalone.config.RouterConfig; @@ -80,13 +80,13 @@ public class SerializedGraphObject implements Serializable { private final int routingTripPatternCounter; public final EmissionsDataModel emissionsDataModel; public final StreetLimitationParameters streetLimitationParameters; - public final VehicleParkingService vehicleParkingService; + public final VehicleParkingRepository parkingRepository; public SerializedGraphObject( Graph graph, TimetableRepository timetableRepository, WorldEnvelopeRepository worldEnvelopeRepository, - VehicleParkingService vehicleParkingService, + VehicleParkingRepository parkingRepository, BuildConfig buildConfig, RouterConfig routerConfig, DataImportIssueSummary issueSummary, @@ -98,7 +98,7 @@ public SerializedGraphObject( this.edges = graph.getEdges(); this.timetableRepository = timetableRepository; this.worldEnvelopeRepository = worldEnvelopeRepository; - this.vehicleParkingService = vehicleParkingService; + this.parkingRepository = parkingRepository; this.buildConfig = buildConfig; this.routerConfig = routerConfig; this.issueSummary = issueSummary; diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java new file mode 100644 index 00000000000..44e353aa3ef --- /dev/null +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java @@ -0,0 +1,13 @@ +package org.opentripplanner.service.vehicleparking.configure; + +import dagger.Binds; +import dagger.Module; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; + +@Module +public interface VehicleParkingRepositoryModule { + @Binds + VehicleParkingRepository bindService(DefaultVehicleParkingService service); + +} diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingModule.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java similarity index 63% rename from application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingModule.java rename to application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java index c7224f28dd6..50b48ef51e0 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingModule.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java @@ -2,15 +2,11 @@ import dagger.Binds; import dagger.Module; -import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; @Module -public interface VehicleParkingModule { +public interface VehicleParkingServiceModule { @Binds VehicleParkingService bindService(DefaultVehicleParkingService service); - - @Binds - VehicleParkingRepository bindRepository(DefaultVehicleParkingService service); } diff --git a/application/src/main/java/org/opentripplanner/standalone/OTPMain.java b/application/src/main/java/org/opentripplanner/standalone/OTPMain.java index fd283abd8cd..e21807f8b7a 100644 --- a/application/src/main/java/org/opentripplanner/standalone/OTPMain.java +++ b/application/src/main/java/org/opentripplanner/standalone/OTPMain.java @@ -152,7 +152,7 @@ private static void startOTPServer(CommandLineParameters cli) { app.graph(), app.timetableRepository(), app.worldEnvelopeRepository(), - app.vehicleParkingService(), + app.vehicleParkingRepository(), config.buildConfig(), config.routerConfig(), DataImportIssueSummary.combine(graphBuilder.issueSummary(), app.dataImportIssueSummary()), diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java index c49a5ae9477..91b3173a018 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java @@ -77,7 +77,7 @@ public class ConstructApplication { GraphBuilderDataSources graphBuilderDataSources, DataImportIssueSummary issueSummary, EmissionsDataModel emissionsDataModel, - VehicleParkingService vehicleParkingService, + VehicleParkingRepository vehicleParkingRepository, @Nullable StopConsolidationRepository stopConsolidationRepository, StreetLimitationParameters streetLimitationParameters ) { @@ -96,6 +96,7 @@ public class ConstructApplication { .timetableRepository(timetableRepository) .graphVisualizer(graphVisualizer) .worldEnvelopeRepository(worldEnvelopeRepository) + .vehicleParkingRepository(vehicleParkingRepository) .emissionsDataModel(emissionsDataModel) .dataImportIssueSummary(issueSummary) .stopConsolidationRepository(stopConsolidationRepository) diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java index a5166d5ad64..bc8be6957da 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java @@ -24,7 +24,7 @@ import org.opentripplanner.service.realtimevehicles.configure.RealtimeVehicleServiceModule; import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingService; -import org.opentripplanner.service.vehicleparking.configure.VehicleParkingModule; +import org.opentripplanner.service.vehicleparking.configure.VehicleParkingServiceModule; import org.opentripplanner.service.vehiclerental.VehicleRentalRepository; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.vehiclerental.configure.VehicleRentalRepositoryModule; @@ -57,7 +57,7 @@ RealtimeVehicleRepositoryModule.class, VehicleRentalServiceModule.class, VehicleRentalRepositoryModule.class, - VehicleParkingModule.class, + VehicleParkingServiceModule.class, ConstructApplicationModule.class, RideHailingServicesModule.class, EmissionsServiceModule.class, @@ -127,6 +127,11 @@ Builder stopConsolidationRepository( @Nullable StopConsolidationRepository stopConsolidationRepository ); + @BindsInstance + Builder vehicleParkingRepository( + VehicleParkingRepository parkingRepository + ); + @BindsInstance Builder dataImportIssueSummary(DataImportIssueSummary issueSummary); diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java index 8fc7176a134..021af778345 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplication.java @@ -8,7 +8,7 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graph.SerializedGraphObject; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.standalone.config.CommandLineParameters; import org.opentripplanner.standalone.config.ConfigModel; @@ -57,7 +57,7 @@ public ConstructApplication appConstruction(SerializedGraphObject obj) { obj.graph, obj.timetableRepository, obj.worldEnvelopeRepository, - obj.vehicleParkingService, + obj.parkingRepository, obj.issueSummary, obj.emissionsDataModel, obj.stopConsolidationRepository, @@ -71,7 +71,7 @@ public ConstructApplication appConstruction() { factory.emptyGraph(), factory.emptyTimetableRepository(), factory.emptyWorldEnvelopeRepository(), - factory.emptyVehicleParkingService(), + factory.emptyVehicleParkingRepository(), DataImportIssueSummary.empty(), factory.emptyEmissionsDataModel(), factory.emptyStopConsolidationRepository(), @@ -94,7 +94,7 @@ private ConstructApplication createAppConstruction( Graph graph, TimetableRepository timetableRepository, WorldEnvelopeRepository worldEnvelopeRepository, - VehicleParkingService vehicleParkingService, + VehicleParkingRepository parkingRepository, DataImportIssueSummary issueSummary, @Nullable EmissionsDataModel emissionsDataModel, @Nullable StopConsolidationRepository stopConsolidationRepository, @@ -109,7 +109,7 @@ private ConstructApplication createAppConstruction( graphBuilderDataSources(), issueSummary, emissionsDataModel, - vehicleParkingService, + parkingRepository, stopConsolidationRepository, streetLimitationParameters ); diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java index 3ccafc88ec5..b054fac3ca5 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/LoadApplicationFactory.java @@ -11,8 +11,8 @@ import org.opentripplanner.ext.stopconsolidation.configure.StopConsolidationRepositoryModule; import org.opentripplanner.graph_builder.GraphBuilderDataSources; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; -import org.opentripplanner.service.vehicleparking.configure.VehicleParkingModule; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; +import org.opentripplanner.service.vehicleparking.configure.VehicleParkingRepositoryModule; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.configure.WorldEnvelopeRepositoryModule; import org.opentripplanner.standalone.config.CommandLineParameters; @@ -32,7 +32,7 @@ GsDataSourceModule.class, WorldEnvelopeRepositoryModule.class, StopConsolidationRepositoryModule.class, - VehicleParkingModule.class, + VehicleParkingRepositoryModule.class, } ) public interface LoadApplicationFactory { @@ -62,7 +62,7 @@ public interface LoadApplicationFactory { StreetLimitationParameters emptyStreetLimitationParameters(); @Singleton - VehicleParkingService emptyVehicleParkingService(); + VehicleParkingRepository emptyVehicleParkingRepository(); @Component.Builder interface Builder { diff --git a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java index f023b14a737..c4aba539fd3 100644 --- a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java +++ b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java @@ -23,7 +23,7 @@ import org.opentripplanner.ext.emissions.EmissionsDataModel; import org.opentripplanner.framework.geometry.HashGridSpatialIndex; import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeRepository; @@ -193,7 +193,7 @@ private void testRoundTrip( Graph originalGraph, TimetableRepository originalTimetableRepository, WorldEnvelopeRepository worldEnvelopeRepository, - VehicleParkingService vehicleParkingService, + VehicleParkingRepository vehicleParkingRepository, EmissionsDataModel emissionsDataModel ) throws Exception { // Now round-trip the graph through serialization. @@ -204,7 +204,7 @@ private void testRoundTrip( originalGraph, originalTimetableRepository, worldEnvelopeRepository, - vehicleParkingService, + vehicleParkingRepository, BuildConfig.DEFAULT, RouterConfig.DEFAULT, DataImportIssueSummary.empty(), From 984b8ed0d547c9d3cc3ae2eeaa45dc9ea0b0e396 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 11 Nov 2024 09:30:58 +0100 Subject: [PATCH 049/169] Extract separate repository implementation --- .../VehicleParkingRepository.java | 6 ++ .../VehicleParkingRepositoryModule.java | 5 +- .../DefaultVehicleParkingRepository.java | 78 +++++++++++++++++++ .../DefaultVehicleParkingService.java | 71 +++-------------- .../ConstructApplicationFactory.java | 4 +- .../configure/UpdaterConfigurator.java | 7 +- .../VehicleParkingAvailabilityUpdater.java | 8 +- ...VehicleParkingAvailabilityUpdaterTest.java | 14 ++-- .../VehicleParkingUpdaterTest.java | 29 +++---- 9 files changed, 122 insertions(+), 100 deletions(-) create mode 100644 application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java index f08e26ecb99..cdb6f195f10 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java @@ -1,7 +1,10 @@ package org.opentripplanner.service.vehicleparking; +import com.google.common.collect.ImmutableListMultimap; import java.util.Collection; +import java.util.stream.Stream; import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; /** * The writable data store of parking facilities. @@ -11,4 +14,7 @@ void updateVehicleParking( Collection parkingToAdd, Collection parkingToRemove ); + Stream getVehicleParkings(); + + ImmutableListMultimap getVehicleParkingGroups(); } diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java index 44e353aa3ef..1a4086e325a 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java @@ -3,11 +3,10 @@ import dagger.Binds; import dagger.Module; import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; @Module public interface VehicleParkingRepositoryModule { @Binds - VehicleParkingRepository bindService(DefaultVehicleParkingService service); - + VehicleParkingRepository bindService(DefaultVehicleParkingRepository repo); } diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java new file mode 100644 index 00000000000..b26d8a2dac2 --- /dev/null +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java @@ -0,0 +1,78 @@ +package org.opentripplanner.service.vehicleparking.internal; + +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ImmutableListMultimap; +import com.google.common.collect.Multimap; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; +import java.util.stream.Stream; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; +import org.opentripplanner.service.vehicleparking.model.VehicleParking; +import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; + +@Singleton +public class DefaultVehicleParkingRepository implements VehicleParkingRepository { + + @Inject + public DefaultVehicleParkingRepository() {} + + /** + * To ensure that his is thread-safe, the set stored here should always be immutable. + *

+ * The volatile keyword is used to ensure safe publication by clearing CPU caches. + */ + private volatile Set vehicleParkings = Set.of(); + + /** + * To ensure that his is thread-safe, {@link ImmutableListMultimap} is used. + *

+ * The volatile keyword is used to ensure safe publication by clearing CPU caches. + */ + private volatile ImmutableListMultimap vehicleParkingGroups = ImmutableListMultimap.of(); + + /** + * Does atomic update of {@link VehicleParking} and index of {@link VehicleParkingGroup} in this + * service by replacing the existing with a new copy that includes old ones that were not removed + * in the update and the new ones that were added in the update. + */ + @Override + public void updateVehicleParking( + Collection parkingToAdd, + Collection parkingToRemove + ) { + Multimap updatedVehicleParkingGroups = ArrayListMultimap.create( + vehicleParkingGroups + ); + parkingToRemove.forEach(vehicleParking -> { + var vehicleParkingGroup = vehicleParking.getVehicleParkingGroup(); + if (vehicleParkingGroup != null) { + updatedVehicleParkingGroups.remove(vehicleParking.getVehicleParkingGroup(), vehicleParking); + } + }); + parkingToAdd.forEach(vehicleParking -> { + var vehicleParkingGroup = vehicleParking.getVehicleParkingGroup(); + if (vehicleParkingGroup != null) { + updatedVehicleParkingGroups.put(vehicleParking.getVehicleParkingGroup(), vehicleParking); + } + }); + vehicleParkingGroups = ImmutableListMultimap.copyOf(updatedVehicleParkingGroups); + + Set updatedVehicleParkings = new HashSet<>(vehicleParkings); + updatedVehicleParkings.removeAll(parkingToRemove); + updatedVehicleParkings.addAll(parkingToAdd); + vehicleParkings = Set.copyOf(updatedVehicleParkings); + } + + @Override + public Stream getVehicleParkings() { + return Stream.empty(); + } + + @Override + public ImmutableListMultimap getVehicleParkingGroups() { + return null; + } +} diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java index 6f51d84ec66..04ff1558347 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java @@ -1,14 +1,9 @@ package org.opentripplanner.service.vehicleparking.internal; -import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ImmutableListMultimap; -import com.google.common.collect.Multimap; import jakarta.inject.Inject; import jakarta.inject.Singleton; import java.io.Serializable; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; import java.util.stream.Stream; import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingService; @@ -24,86 +19,42 @@ *

THIS CLASS IS THREAD-SAFE

*/ @Singleton -public class DefaultVehicleParkingService - implements Serializable, VehicleParkingService, VehicleParkingRepository { +public class DefaultVehicleParkingService implements Serializable, VehicleParkingService { - @Inject - public DefaultVehicleParkingService() {} - - /** - * To ensure that his is thread-safe, the set stored here should always be immutable. - *

- * The volatile keyword is used to ensure safe publication by clearing CPU caches. - */ - private volatile Set vehicleParkings = Set.of(); - - /** - * To ensure that his is thread-safe, {@link ImmutableListMultimap} is used. - *

- * The volatile keyword is used to ensure safe publication by clearing CPU caches. - */ - private volatile ImmutableListMultimap vehicleParkingGroups = ImmutableListMultimap.of(); + private final VehicleParkingRepository repository; - /** - * Does atomic update of {@link VehicleParking} and index of {@link VehicleParkingGroup} in this - * service by replacing the existing with a new copy that includes old ones that were not removed - * in the update and the new ones that were added in the update. - */ - @Override - public void updateVehicleParking( - Collection parkingToAdd, - Collection parkingToRemove - ) { - Multimap updatedVehicleParkingGroups = ArrayListMultimap.create( - vehicleParkingGroups - ); - parkingToRemove.forEach(vehicleParking -> { - var vehicleParkingGroup = vehicleParking.getVehicleParkingGroup(); - if (vehicleParkingGroup != null) { - updatedVehicleParkingGroups.remove(vehicleParking.getVehicleParkingGroup(), vehicleParking); - } - }); - parkingToAdd.forEach(vehicleParking -> { - var vehicleParkingGroup = vehicleParking.getVehicleParkingGroup(); - if (vehicleParkingGroup != null) { - updatedVehicleParkingGroups.put(vehicleParking.getVehicleParkingGroup(), vehicleParking); - } - }); - vehicleParkingGroups = ImmutableListMultimap.copyOf(updatedVehicleParkingGroups); - - Set updatedVehicleParkings = new HashSet<>(vehicleParkings); - updatedVehicleParkings.removeAll(parkingToRemove); - updatedVehicleParkings.addAll(parkingToAdd); - vehicleParkings = Set.copyOf(updatedVehicleParkings); + @Inject + public DefaultVehicleParkingService(VehicleParkingRepository repository) { + this.repository = repository; } @Override public Stream getBikeParks() { - return vehicleParkings.stream().filter(VehicleParking::hasBicyclePlaces); + return repository.getVehicleParkings().filter(VehicleParking::hasBicyclePlaces); } @Override public Stream getCarParks() { - return vehicleParkings.stream().filter(VehicleParking::hasAnyCarPlaces); + return repository.getVehicleParkings().filter(VehicleParking::hasAnyCarPlaces); } @Override public Stream getVehicleParkings() { - return vehicleParkings.stream(); + return repository.getVehicleParkings(); } @Override public ImmutableListMultimap getVehicleParkingGroups() { - return vehicleParkingGroups; + return repository.getVehicleParkingGroups(); } @Override public boolean hasBikeParking() { - return vehicleParkings.stream().anyMatch(VehicleParking::hasBicyclePlaces); + return repository.getVehicleParkings().anyMatch(VehicleParking::hasBicyclePlaces); } @Override public boolean hasCarParking() { - return vehicleParkings.stream().anyMatch(VehicleParking::hasAnyCarPlaces); + return repository.getVehicleParkings().anyMatch(VehicleParking::hasAnyCarPlaces); } } diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java index bc8be6957da..d6310c0c616 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplicationFactory.java @@ -128,9 +128,7 @@ Builder stopConsolidationRepository( ); @BindsInstance - Builder vehicleParkingRepository( - VehicleParkingRepository parkingRepository - ); + Builder vehicleParkingRepository(VehicleParkingRepository parkingRepository); @BindsInstance Builder dataImportIssueSummary(DataImportIssueSummary issueSummary); diff --git a/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java b/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java index 74ecd9ad4bf..7cb0c2fdc29 100644 --- a/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java +++ b/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java @@ -213,12 +213,7 @@ private List createUpdatersFromConfig() { case AVAILABILITY_ONLY -> { var source = AvailabilityDatasourceFactory.create(configItem); updaters.add( - new VehicleParkingAvailabilityUpdater( - configItem, - source, - parkingRepository, - parkingService - ) + new VehicleParkingAvailabilityUpdater(configItem, source, parkingRepository) ); } } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java index 8ad92c5f929..c4de4de23a1 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java @@ -5,7 +5,6 @@ import java.util.function.Function; import java.util.stream.Collectors; import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.transit.model.framework.FeedScopedId; @@ -28,7 +27,6 @@ public class VehicleParkingAvailabilityUpdater extends PollingGraphUpdater { VehicleParkingAvailabilityUpdater.class ); private final DataSource source; - private final VehicleParkingService service; private WriteToGraphCallback saveResultOnGraph; private final VehicleParkingRepository repository; @@ -36,13 +34,11 @@ public class VehicleParkingAvailabilityUpdater extends PollingGraphUpdater { public VehicleParkingAvailabilityUpdater( VehicleParkingUpdaterParameters parameters, DataSource source, - VehicleParkingRepository parkingRepository, - VehicleParkingService parkingService + VehicleParkingRepository parkingRepository ) { super(parameters); this.source = source; this.repository = parkingRepository; - this.service = parkingService; LOG.info("Creating vehicle-parking updater running every {}: {}", pollingPeriod(), source); } @@ -70,7 +66,7 @@ private class AvailabilityUpdater implements GraphWriterRunnable { private AvailabilityUpdater(List updates) { this.updates = List.copyOf(updates); this.parkingById = - service + repository .getVehicleParkings() .collect(Collectors.toUnmodifiableMap(VehicleParking::getId, Function.identity())); } diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java index e9ce4226318..e6e436de975 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java @@ -12,7 +12,8 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.I18NString; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.standalone.config.routerconfig.updaters.VehicleParkingUpdaterConfig; @@ -50,7 +51,6 @@ void updateCarAvailability() { var updater = new VehicleParkingAvailabilityUpdater( PARAMETERS, new StubDatasource(DEFAULT_UPDATE), - service, service ); @@ -68,7 +68,6 @@ void updateBicycleAvailability() { var updater = new VehicleParkingAvailabilityUpdater( PARAMETERS, new StubDatasource(DEFAULT_UPDATE), - service, service ); @@ -86,7 +85,6 @@ void notFound() { var updater = new VehicleParkingAvailabilityUpdater( PARAMETERS, new StubDatasource(new AvailabiltyUpdate(id("not-found"), 100)), - service, service ); @@ -97,16 +95,16 @@ void notFound() { assertNull(updated.getAvailability()); } - private static DefaultVehicleParkingService buildParkingService(VehicleParkingSpaces capacity) { - var service = new DefaultVehicleParkingService(); + private static VehicleParkingRepository buildParkingService(VehicleParkingSpaces capacity) { + var repo = new DefaultVehicleParkingRepository(); var parking = parkingBuilder() .carPlaces(capacity.getCarSpaces() != null) .bicyclePlaces(capacity.getBicycleSpaces() != null) .capacity(capacity) .build(); - service.updateVehicleParking(List.of(parking), List.of()); - return service; + repo.updateVehicleParking(List.of(parking), List.of()); + return repo; } private static VehicleParking.VehicleParkingBuilder parkingBuilder() { diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java index b035cd02b56..dbabc3dd89c 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java @@ -11,9 +11,10 @@ import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.opentripplanner.routing.graph.Graph; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingTestGraphData; import org.opentripplanner.service.vehicleparking.VehicleParkingTestUtil; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; import org.opentripplanner.service.vehicleparking.model.VehicleParkingState; @@ -36,7 +37,7 @@ class VehicleParkingUpdaterTest { private DefaultRealTimeUpdateContext realTimeUpdateContext; private VehicleParkingUpdater vehicleParkingUpdater; - private DefaultVehicleParkingService parkingService; + private VehicleParkingRepository parkingRepository; @BeforeEach @SuppressWarnings("unchecked") @@ -45,7 +46,7 @@ public void setup() { graphData.initGraph(); graph = graphData.getGraph(); timetableRepository = graphData.getTimetableRepository(); - parkingService = new DefaultVehicleParkingService(); + parkingRepository = new DefaultVehicleParkingRepository(); realTimeUpdateContext = new DefaultRealTimeUpdateContext(graph, timetableRepository); dataSource = (DataSource) Mockito.mock(DataSource.class); @@ -76,7 +77,7 @@ public String configRef() { } }; vehicleParkingUpdater = - new VehicleParkingUpdater(parameters, dataSource, graph.getLinker(), parkingService); + new VehicleParkingUpdater(parameters, dataSource, graph.getLinker(), parkingRepository); } @Test @@ -104,7 +105,7 @@ void updateVehicleParkingTest() { assertVehicleParkingsInGraph(1); - var vehicleParkingInGraph = parkingService.getVehicleParkings().findFirst().orElseThrow(); + var vehicleParkingInGraph = parkingRepository.getVehicleParkings().findFirst().orElseThrow(); assertEquals(vehiclePlaces, vehicleParkingInGraph.getAvailability()); assertEquals(vehiclePlaces, vehicleParkingInGraph.getCapacity()); @@ -117,7 +118,7 @@ void updateVehicleParkingTest() { assertVehicleParkingsInGraph(1); - vehicleParkingInGraph = parkingService.getVehicleParkings().findFirst().orElseThrow(); + vehicleParkingInGraph = parkingRepository.getVehicleParkings().findFirst().orElseThrow(); assertEquals(vehiclePlaces, vehicleParkingInGraph.getAvailability()); assertEquals(vehiclePlaces, vehicleParkingInGraph.getCapacity()); } @@ -152,7 +153,7 @@ void addNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, parkingService.getVehicleParkings().count()); + assertEquals(1, parkingRepository.getVehicleParkings().count()); assertVehicleParkingNotLinked(); } @@ -169,10 +170,10 @@ void updateNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, parkingService.getVehicleParkings().count()); + assertEquals(1, parkingRepository.getVehicleParkings().count()); assertEquals( vehiclePlaces, - parkingService.getVehicleParkings().findFirst().orElseThrow().getAvailability() + parkingRepository.getVehicleParkings().findFirst().orElseThrow().getAvailability() ); assertVehicleParkingNotLinked(); @@ -188,10 +189,10 @@ void updateNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, parkingService.getVehicleParkings().count()); + assertEquals(1, parkingRepository.getVehicleParkings().count()); assertEquals( vehiclePlaces, - parkingService.getVehicleParkings().findFirst().orElseThrow().getAvailability() + parkingRepository.getVehicleParkings().findFirst().orElseThrow().getAvailability() ); assertVehicleParkingNotLinked(); } @@ -206,12 +207,12 @@ void deleteNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, parkingService.getVehicleParkings().count()); + assertEquals(1, parkingRepository.getVehicleParkings().count()); when(dataSource.getUpdates()).thenReturn(List.of()); runUpdaterOnce(); - assertEquals(0, parkingService.getVehicleParkings().count()); + assertEquals(0, parkingRepository.getVehicleParkings().count()); } private void assertVehicleParkingsInGraph(int vehicleParkingNumber) { @@ -252,7 +253,7 @@ private void assertVehicleParkingsInGraph(int vehicleParkingNumber) { ); } - assertEquals(vehicleParkingNumber, parkingService.getVehicleParkings().count()); + assertEquals(vehicleParkingNumber, parkingRepository.getVehicleParkings().count()); } private void runUpdaterOnce() { From be47aaf74bbba25e99a848a8d7c0ecd573e8ad97 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 11 Nov 2024 09:38:54 +0100 Subject: [PATCH 050/169] Properly implement repository --- .../internal/DefaultVehicleParkingRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java index b26d8a2dac2..660b539052e 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java @@ -68,11 +68,11 @@ public void updateVehicleParking( @Override public Stream getVehicleParkings() { - return Stream.empty(); + return vehicleParkings.stream(); } @Override public ImmutableListMultimap getVehicleParkingGroups() { - return null; + return vehicleParkingGroups; } } From 985817aa89db84ec4f71ccd7ab9858aef1c28442 Mon Sep 17 00:00:00 2001 From: sharhio Date: Mon, 11 Nov 2024 13:06:20 +0200 Subject: [PATCH 051/169] refactoring, specify docs --- .../SmooveBikeRentalDataSourceTest.java | 2 +- .../SmooveBikeRentalDataSourceParameters.java | 6 +-- .../sources/VehicleRentalSourceFactory.java | 6 ++- .../updater/AllowedRentalType.java | 7 --- .../GbfsVehicleRentalDataSource.java | 48 ++++++++----------- .../datasources/params/AllowedRentalType.java | 7 +++ ...GbfsVehicleRentalDataSourceParameters.java | 9 ++-- .../VehicleRentalDataSourceParameters.java | 3 +- .../VehicleRentalUpdaterTest.java | 6 +-- .../GbfsVehicleRentalDataSourceTest.java | 2 +- doc/user/UpdaterConfig.md | 6 ++- 11 files changed, 49 insertions(+), 53 deletions(-) delete mode 100644 application/src/main/java/org/opentripplanner/updater/AllowedRentalType.java create mode 100644 application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java diff --git a/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java b/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java index c9a327bea13..d080cf584f9 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java @@ -7,7 +7,7 @@ import java.util.List; import org.junit.jupiter.api.Test; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; -import org.opentripplanner.updater.AllowedRentalType; +import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; class SmooveBikeRentalDataSourceTest { diff --git a/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java b/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java index d509fa97b75..35e5557a49b 100644 --- a/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java +++ b/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java @@ -1,7 +1,7 @@ package org.opentripplanner.ext.smoovebikerental; import javax.annotation.Nullable; -import org.opentripplanner.updater.AllowedRentalType; +import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; import org.opentripplanner.updater.vehicle_rental.datasources.params.VehicleRentalDataSourceParameters; @@ -33,7 +33,7 @@ public VehicleRentalSourceType sourceType() { } @Override - public AllowedRentalType allowedRentalType() { - return allowedRentalType; + public boolean allowRentalType(AllowedRentalType rentalType) { + return allowedRentalType == null || allowedRentalType == AllowedRentalType.ALL || rentalType == allowedRentalType; } } diff --git a/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java b/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java index 5906b7ffc33..165ea3fd8c2 100644 --- a/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java @@ -9,9 +9,9 @@ import org.opentripplanner.ext.smoovebikerental.SmooveBikeRentalDataSourceParameters; import org.opentripplanner.standalone.config.framework.json.NodeAdapter; import org.opentripplanner.standalone.config.routerconfig.updaters.HttpHeadersConfig; -import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; +import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters; import org.opentripplanner.updater.vehicle_rental.datasources.params.VehicleRentalDataSourceParameters; @@ -130,9 +130,11 @@ private AllowedRentalType allowedRentalType() { return c .of("allowedRentalType") .since(V2_7) - .summary("The type of rental data to include.") + .summary("Temporary parameter. The type of rental data to include.") .description( """ + This parameter is temporary and will be removed in a future version of OTP. + The type of rental data to include. This can be one of the following: - `ALL`: Include all data types. diff --git a/application/src/main/java/org/opentripplanner/updater/AllowedRentalType.java b/application/src/main/java/org/opentripplanner/updater/AllowedRentalType.java deleted file mode 100644 index dff4cdcedae..00000000000 --- a/application/src/main/java/org/opentripplanner/updater/AllowedRentalType.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.opentripplanner.updater; - -public enum AllowedRentalType { - STATIONS, - VEHICLES, - ALL, -} diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java index aa766b5eb48..70840249066 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java @@ -22,7 +22,7 @@ import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalSystem; -import org.opentripplanner.updater.AllowedRentalType; +import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -77,11 +77,7 @@ public List getUpdates() { List stations = new LinkedList<>(); - if ( - params.allowedRentalType() == null || - params.allowedRentalType() == AllowedRentalType.ALL || - params.allowedRentalType() == AllowedRentalType.STATIONS - ) { + if (params.allowRentalType(AllowedRentalType.STATIONS)) { // Both station information and status are required for all systems using stations GBFSStationInformation stationInformation = loader.getFeed(GBFSStationInformation.class); GBFSStationStatus stationStatus = loader.getFeed(GBFSStationStatus.class); @@ -117,29 +113,23 @@ public List getUpdates() { } } - if ( - params.allowedRentalType() == null || - params.allowedRentalType() == AllowedRentalType.ALL || - params.allowedRentalType() == AllowedRentalType.VEHICLES - ) { - // Append the floating bike stations. - if (OTPFeature.FloatingBike.isOn()) { - GBFSFreeBikeStatus freeBikeStatus = loader.getFeed(GBFSFreeBikeStatus.class); - if (freeBikeStatus != null) { - GbfsFreeVehicleStatusMapper freeVehicleStatusMapper = new GbfsFreeVehicleStatusMapper( - system, - vehicleTypes - ); - stations.addAll( - freeBikeStatus - .getData() - .getBikes() - .stream() - .map(freeVehicleStatusMapper::mapFreeVehicleStatus) - .filter(Objects::nonNull) - .toList() - ); - } + // Append the floating bike stations. + if (OTPFeature.FloatingBike.isOn() && params.allowRentalType(AllowedRentalType.VEHICLES)) { + GBFSFreeBikeStatus freeBikeStatus = loader.getFeed(GBFSFreeBikeStatus.class); + if (freeBikeStatus != null) { + GbfsFreeVehicleStatusMapper freeVehicleStatusMapper = new GbfsFreeVehicleStatusMapper( + system, + vehicleTypes + ); + stations.addAll( + freeBikeStatus + .getData() + .getBikes() + .stream() + .map(freeVehicleStatusMapper::mapFreeVehicleStatus) + .filter(Objects::nonNull) + .toList() + ); } } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java new file mode 100644 index 00000000000..acf7c7690b9 --- /dev/null +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java @@ -0,0 +1,7 @@ +package org.opentripplanner.updater.vehicle_rental.datasources.params; + +public enum AllowedRentalType { + STATIONS, + VEHICLES, + ALL, +} diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java index 473da63da7f..46dab2909fe 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java @@ -1,6 +1,5 @@ package org.opentripplanner.updater.vehicle_rental.datasources.params; -import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; @@ -21,7 +20,11 @@ public VehicleRentalSourceType sourceType() { } @Override - public AllowedRentalType allowedRentalType() { - return allowedRentalType; + public boolean allowRentalType(AllowedRentalType rentalType) { + return ( + allowedRentalType == null || + allowedRentalType == AllowedRentalType.ALL || + allowedRentalType == rentalType + ); } } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java index b035ca71fbd..88af23ac1e6 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java @@ -1,7 +1,6 @@ package org.opentripplanner.updater.vehicle_rental.datasources.params; import javax.annotation.Nullable; -import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; @@ -15,5 +14,5 @@ public interface VehicleRentalDataSourceParameters { HttpHeaders httpHeaders(); - AllowedRentalType allowedRentalType(); + boolean allowRentalType(AllowedRentalType rentalType); } diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java index b1ca4173dac..eca1f78d059 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java @@ -15,12 +15,12 @@ import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.transit.service.TimetableRepository; -import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.DefaultRealTimeUpdateContext; import org.opentripplanner.updater.GraphUpdaterManager; import org.opentripplanner.updater.GraphWriterRunnable; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.datasources.VehicleRentalDatasource; +import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; import org.opentripplanner.updater.vehicle_rental.datasources.params.VehicleRentalDataSourceParameters; class VehicleRentalUpdaterTest { @@ -106,8 +106,8 @@ public HttpHeaders httpHeaders() { } @Override - public AllowedRentalType allowedRentalType() { - return AllowedRentalType.ALL; + public boolean allowRentalType(AllowedRentalType rentalType) { + return true; } } } diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java index bf557282b7d..acc987d6786 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java @@ -14,8 +14,8 @@ import org.opentripplanner.service.vehiclerental.model.GeofencingZone; import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; -import org.opentripplanner.updater.AllowedRentalType; import org.opentripplanner.updater.spi.HttpHeaders; +import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters; /** diff --git a/doc/user/UpdaterConfig.md b/doc/user/UpdaterConfig.md index 6638c1e95b4..bd56207ea40 100644 --- a/doc/user/UpdaterConfig.md +++ b/doc/user/UpdaterConfig.md @@ -317,7 +317,7 @@ GBFS form factors: |---------------------------------------------------------------------------------------|:---------------:|---------------------------------------------------------------------------------|:----------:|---------------|:-----:| | type = "vehicle-rental" | `enum` | The type of the updater. | *Required* | | 1.5 | | [allowKeepingRentedVehicleAtDestination](#u_1_allowKeepingRentedVehicleAtDestination) | `boolean` | If a vehicle should be allowed to be kept at the end of a station-based rental. | *Optional* | `false` | 2.1 | -| [allowedRentalType](#u_1_allowedRentalType) | `enum` | The type of rental data to include. | *Optional* | `"all"` | 2.7 | +| [allowedRentalType](#u_1_allowedRentalType) | `enum` | Temporary parameter. The type of rental data to include. | *Optional* | `"all"` | 2.7 | | frequency | `duration` | How often the data should be updated. | *Optional* | `"PT1M"` | 1.5 | | [geofencingZones](#u_1_geofencingZones) | `boolean` | Compute rental restrictions based on GBFS 2.2 geofencing zones. | *Optional* | `false` | 2.3 | | language | `string` | TODO | *Optional* | | 2.1 | @@ -353,7 +353,9 @@ For this to be possible three things need to be configured: **Path:** /updaters/[1] **Enum values:** `stations` | `vehicles` | `all` -The type of rental data to include. +Temporary parameter. The type of rental data to include. + +This parameter is temporary and will be removed in a future version of OTP. The type of rental data to include. This can be one of the following: From 3b3b135963db5df85b501268f5ca320e21d52cff Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 11 Nov 2024 12:59:35 +0100 Subject: [PATCH 052/169] Update tests --- .../vehicleparkings/VehicleParkingGroupsLayerTest.java | 7 ++++--- .../layers/vehicleparkings/VehicleParkingsLayerTest.java | 7 ++++--- .../test/java/org/opentripplanner/ConstantsForTests.java | 8 ++++---- .../opentripplanner/apis/gtfs/GraphQLIntegrationTest.java | 8 +++++--- .../VehicleParkingAvailabilityUpdaterTest.java | 8 ++++---- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java index 06a6d7088a1..b8a88c11703 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerTest.java @@ -20,6 +20,7 @@ import org.opentripplanner.inspector.vector.KeyValue; import org.opentripplanner.inspector.vector.LayerParameters; import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; @@ -90,8 +91,8 @@ public void setUp() { @Test public void vehicleParkingGroupGeometryTest() { - var service = new DefaultVehicleParkingService(); - service.updateVehicleParking(List.of(vehicleParking), List.of()); + var repository = new DefaultVehicleParkingRepository(); + repository.updateVehicleParking(List.of(vehicleParking), List.of()); var config = """ @@ -115,7 +116,7 @@ public void vehicleParkingGroupGeometryTest() { var tiles = VectorTileConfig.mapVectorTilesParameters(nodeAdapter, "vectorTiles"); assertEquals(1, tiles.layers().size()); var builder = new VehicleParkingGroupsLayerBuilderWithPublicGeometry( - service, + new DefaultVehicleParkingService(repository), tiles.layers().get(0), Locale.US ); diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java index 4e4b5e507af..ae4386e9dd6 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerTest.java @@ -23,6 +23,7 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.framework.i18n.TranslatedString; import org.opentripplanner.model.calendar.openinghours.OpeningHoursCalendarService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces; @@ -85,8 +86,8 @@ public void setUp() { @Test public void vehicleParkingGeometryTest() { - var service = new DefaultVehicleParkingService(); - service.updateVehicleParking(List.of(vehicleParking), List.of()); + var repo = new DefaultVehicleParkingRepository(); + repo.updateVehicleParking(List.of(vehicleParking), List.of()); var config = """ @@ -109,7 +110,7 @@ public void vehicleParkingGeometryTest() { var nodeAdapter = newNodeAdapterForTest(config); var tiles = VectorTileConfig.mapVectorTilesParameters(nodeAdapter, "vectorTiles"); assertEquals(1, tiles.layers().size()); - var builder = new VehicleParkingsLayerBuilder(service, tiles.layers().getFirst(), Locale.US); + var builder = new VehicleParkingsLayerBuilder(new DefaultVehicleParkingService(repo), tiles.layers().getFirst(), Locale.US); List geometries = builder.getGeometries(new Envelope(0.99, 1.01, 1.99, 2.01)); diff --git a/application/src/test/java/org/opentripplanner/ConstantsForTests.java b/application/src/test/java/org/opentripplanner/ConstantsForTests.java index 8f8eacd3d88..cedd295bbfc 100644 --- a/application/src/test/java/org/opentripplanner/ConstantsForTests.java +++ b/application/src/test/java/org/opentripplanner/ConstantsForTests.java @@ -31,7 +31,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.linking.LinkingDirection; import org.opentripplanner.routing.linking.VertexLinker; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.street.StreetVehicleRentalLink; @@ -136,7 +136,7 @@ public static TestOtpModel buildNewPortlandGraph(boolean withElevation) { { OsmProvider osmProvider = new OsmProvider(PORTLAND_CENTRAL_OSM, false); OsmModule osmModule = OsmModule - .of(osmProvider, graph, new DefaultVehicleParkingService()) + .of(osmProvider, graph, new DefaultVehicleParkingRepository()) .withStaticParkAndRide(true) .withStaticBikeParkAndRide(true) .build(); @@ -186,7 +186,7 @@ public static TestOtpModel buildOsmGraph(File osmFile) { // Add street data from OSM OsmProvider osmProvider = new OsmProvider(osmFile, true); OsmModule osmModule = OsmModule - .of(osmProvider, graph, new DefaultVehicleParkingService()) + .of(osmProvider, graph, new DefaultVehicleParkingRepository()) .build(); osmModule.buildGraph(); return new TestOtpModel(graph, timetableRepository); @@ -229,7 +229,7 @@ public static TestOtpModel buildNewMinimalNetexGraph() { try { var deduplicator = new Deduplicator(); var siteRepository = new SiteRepository(); - var parkingService = new DefaultVehicleParkingService(); + var parkingService = new DefaultVehicleParkingRepository(); var graph = new Graph(deduplicator); var timetableRepository = new TimetableRepository(siteRepository, deduplicator); // Add street data from OSM diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java index 9070f4f1375..e14bded2478 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java @@ -70,6 +70,8 @@ import org.opentripplanner.routing.services.TransitAlertService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; @@ -141,11 +143,11 @@ class GraphQLIntegrationTest { private static GraphQLRequestContext context; private static final Deduplicator DEDUPLICATOR = new Deduplicator(); - private static final DefaultVehicleParkingService parkingService = new DefaultVehicleParkingService(); + private static final VehicleParkingRepository parkingRepository = new DefaultVehicleParkingRepository(); @BeforeAll static void setup() { - parkingService.updateVehicleParking( + parkingRepository.updateVehicleParking( List.of( VehicleParking .builder() @@ -316,7 +318,7 @@ public Set getRoutesForStop(StopLocation stop) { transitService, new DefaultFareService(), defaultVehicleRentalService, - parkingService, + new DefaultVehicleParkingService(parkingRepository), realtimeVehicleService, finder, new RouteRequest() diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java index e6e436de975..26e8403abe9 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java @@ -47,7 +47,7 @@ class VehicleParkingAvailabilityUpdaterTest { @Test void updateCarAvailability() { - var service = buildParkingService(VehicleParkingSpaces.builder().carSpaces(10).build()); + var service = buildParkingRepository(VehicleParkingSpaces.builder().carSpaces(10).build()); var updater = new VehicleParkingAvailabilityUpdater( PARAMETERS, new StubDatasource(DEFAULT_UPDATE), @@ -64,7 +64,7 @@ void updateCarAvailability() { @Test void updateBicycleAvailability() { - var service = buildParkingService(VehicleParkingSpaces.builder().bicycleSpaces(15).build()); + var service = buildParkingRepository(VehicleParkingSpaces.builder().bicycleSpaces(15).build()); var updater = new VehicleParkingAvailabilityUpdater( PARAMETERS, new StubDatasource(DEFAULT_UPDATE), @@ -81,7 +81,7 @@ void updateBicycleAvailability() { @Test void notFound() { - var service = buildParkingService(VehicleParkingSpaces.builder().bicycleSpaces(15).build()); + var service = buildParkingRepository(VehicleParkingSpaces.builder().bicycleSpaces(15).build()); var updater = new VehicleParkingAvailabilityUpdater( PARAMETERS, new StubDatasource(new AvailabiltyUpdate(id("not-found"), 100)), @@ -95,7 +95,7 @@ void notFound() { assertNull(updated.getAvailability()); } - private static VehicleParkingRepository buildParkingService(VehicleParkingSpaces capacity) { + private static VehicleParkingRepository buildParkingRepository(VehicleParkingSpaces capacity) { var repo = new DefaultVehicleParkingRepository(); var parking = parkingBuilder() From 2e3259620b4731e117ebce758296db5d22870b2f Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 11 Nov 2024 13:19:24 +0100 Subject: [PATCH 053/169] Update tests --- .../configure/ConstructApplication.java | 1 - .../updater/configure/UpdaterConfigurator.java | 6 ------ .../org/opentripplanner/TestServerContext.java | 3 ++- .../LegacyRouteRequestMapperTest.java | 3 ++- .../routerequest/RouteRequestMapperTest.java | 3 ++- .../mapping/TripRequestMapperTest.java | 3 ++- .../module/OsmBoardingLocationsModuleTest.java | 4 ++-- .../module/StreetLinkerModuleTest.java | 4 ++-- .../module/TestStreetLinkerModule.java | 4 ++-- .../module/VehicleParkingLinkingTest.java | 4 ++-- .../islandpruning/IslandPruningUtils.java | 4 ++-- .../module/linking/LinkingTest.java | 4 ++-- .../graph_builder/module/osm/OsmModuleTest.java | 17 +++++++++-------- .../module/osm/PlatformLinkerTest.java | 4 ++-- .../module/osm/TriangleInequalityTest.java | 4 ++-- .../module/osm/UnconnectedAreasTest.java | 4 ++-- .../module/osm/UnroutableTest.java | 4 ++-- .../routing/graph/GraphSerializationTest.java | 10 +++++----- .../transit/speed_test/SpeedTest.java | 5 ++--- 19 files changed, 44 insertions(+), 47 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java index 91b3173a018..eb3fae5275f 100644 --- a/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java +++ b/application/src/main/java/org/opentripplanner/standalone/configure/ConstructApplication.java @@ -169,7 +169,6 @@ private void setupTransitRoutingServer() { realtimeVehicleRepository(), vehicleRentalRepository(), vehicleParkingRepository(), - vehicleParkingService(), timetableRepository(), routerConfig().updaterConfig() ); diff --git a/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java b/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java index 7cb0c2fdc29..1106d621873 100644 --- a/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java +++ b/application/src/main/java/org/opentripplanner/updater/configure/UpdaterConfigurator.java @@ -13,7 +13,6 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.realtimevehicles.RealtimeVehicleRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalRepository; import org.opentripplanner.transit.service.TimetableRepository; import org.opentripplanner.updater.DefaultRealTimeUpdateContext; @@ -52,7 +51,6 @@ public class UpdaterConfigurator { private final RealtimeVehicleRepository realtimeVehicleRepository; private final VehicleRentalRepository vehicleRentalRepository; private final VehicleParkingRepository parkingRepository; - private final VehicleParkingService parkingService; private SiriTimetableSnapshotSource siriTimetableSnapshotSource = null; private TimetableSnapshotSource gtfsTimetableSnapshotSource = null; @@ -61,7 +59,6 @@ private UpdaterConfigurator( RealtimeVehicleRepository realtimeVehicleRepository, VehicleRentalRepository vehicleRentalRepository, VehicleParkingRepository parkingRepository, - VehicleParkingService parkingService, TimetableRepository timetableRepository, UpdatersParameters updatersParameters ) { @@ -71,7 +68,6 @@ private UpdaterConfigurator( this.timetableRepository = timetableRepository; this.updatersParameters = updatersParameters; this.parkingRepository = parkingRepository; - this.parkingService = parkingService; } public static void configure( @@ -79,7 +75,6 @@ public static void configure( RealtimeVehicleRepository realtimeVehicleRepository, VehicleRentalRepository vehicleRentalRepository, VehicleParkingRepository parkingRepository, - VehicleParkingService parkingService, TimetableRepository timetableRepository, UpdatersParameters updatersParameters ) { @@ -88,7 +83,6 @@ public static void configure( realtimeVehicleRepository, vehicleRentalRepository, parkingRepository, - parkingService, timetableRepository, updatersParameters ) diff --git a/application/src/test/java/org/opentripplanner/TestServerContext.java b/application/src/test/java/org/opentripplanner/TestServerContext.java index 3e4f69f54a4..e20720bd7d8 100644 --- a/application/src/test/java/org/opentripplanner/TestServerContext.java +++ b/application/src/test/java/org/opentripplanner/TestServerContext.java @@ -12,6 +12,7 @@ import org.opentripplanner.service.realtimevehicles.RealtimeVehicleService; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; @@ -91,7 +92,7 @@ public static VehicleRentalService createVehicleRentalService() { } public static VehicleParkingService createVehicleParkingService() { - return new DefaultVehicleParkingService(); + return new DefaultVehicleParkingService(new DefaultVehicleParkingRepository()); } public static EmissionsService createEmissionsService() { diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java index bf80f5f2185..43dd10dbdce 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/LegacyRouteRequestMapperTest.java @@ -35,6 +35,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graphfinder.GraphFinder; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.street.search.TraverseMode; @@ -62,7 +63,7 @@ class LegacyRouteRequestMapperTest implements PlanTestConstants { transitService, new DefaultFareService(), new DefaultVehicleRentalService(), - new DefaultVehicleParkingService(), + new DefaultVehicleParkingService(new DefaultVehicleParkingRepository()), new DefaultRealtimeVehicleService(transitService), GraphFinder.getInstance(graph, transitService::findRegularStops), new RouteRequest() diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java index 618ad89f046..34cb865c81a 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/mapping/routerequest/RouteRequestMapperTest.java @@ -31,6 +31,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graphfinder.GraphFinder; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.transit.model.framework.FeedScopedId; @@ -72,7 +73,7 @@ class RouteRequestMapperTest { transitService, new DefaultFareService(), new DefaultVehicleRentalService(), - new DefaultVehicleParkingService(), + new DefaultVehicleParkingService(new DefaultVehicleParkingRepository()), new DefaultRealtimeVehicleService(transitService), GraphFinder.getInstance(graph, transitService::findRegularStops), new RouteRequest() diff --git a/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java b/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java index 67dbe5c18d9..b3c64e0aecb 100644 --- a/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/apis/transmodel/mapping/TripRequestMapperTest.java @@ -47,6 +47,7 @@ import org.opentripplanner.routing.core.VehicleRoutingOptimizeType; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeRepository; @@ -145,7 +146,7 @@ void setup() { new DefaultWorldEnvelopeService(new DefaultWorldEnvelopeRepository()), new DefaultRealtimeVehicleService(transitService), new DefaultVehicleRentalService(), - new DefaultVehicleParkingService(), + new DefaultVehicleParkingService(new DefaultVehicleParkingRepository()), new DefaultEmissionsService(new EmissionsDataModel()), null, RouterConfig.DEFAULT.flexParameters(), diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java index c7295640a18..c55e482e533 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/OsmBoardingLocationsModuleTest.java @@ -14,7 +14,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.street.model.edge.AreaEdge; import org.opentripplanner.street.model.edge.BoardingLocationToStopLink; import org.opentripplanner.street.model.edge.Edge; @@ -84,7 +84,7 @@ void addAndLinkBoardingLocations(boolean areaVisibility, Set linkedVerti new NonLocalizedString("bus stop not connected to street network") ); var osmModule = OsmModule - .of(provider, graph, new DefaultVehicleParkingService()) + .of(provider, graph, new DefaultVehicleParkingRepository()) .withBoardingAreaRefTags(Set.of("ref", "ref:IFOPT")) .withAreaVisibility(areaVisibility) .build(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java index 425fa186312..4f54581fdb8 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/StreetLinkerModuleTest.java @@ -18,7 +18,7 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.model.StopTime; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetTransitStopLink; @@ -174,7 +174,7 @@ public TestModel() { module = new StreetLinkerModule( graph, - new DefaultVehicleParkingService(), + new DefaultVehicleParkingRepository(), timetableRepository, DataImportIssueStore.NOOP, false diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java index ee405713f73..551564cbb05 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/TestStreetLinkerModule.java @@ -3,14 +3,14 @@ import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.transit.service.TimetableRepository; public class TestStreetLinkerModule { /** For test only */ public static void link(Graph graph, TimetableRepository timetableRepository) { - link(graph, new DefaultVehicleParkingService(), timetableRepository); + link(graph, new DefaultVehicleParkingRepository(), timetableRepository); } public static void link( diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java index 4f32ab60e76..02795b45042 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java @@ -10,7 +10,7 @@ import org.opentripplanner.framework.geometry.WgsCoordinate; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.service.vehicleparking.VehicleParkingTestGraphData; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehicleparking.model.VehicleParkingHelper; import org.opentripplanner.street.model.StreetTraversalPermission; import org.opentripplanner.street.model._data.StreetModelForTest; @@ -170,7 +170,7 @@ public void removeVehicleParkingWithOneEntranceAndNonExistingVertexTest() { ) .build(); - var vehicleParkingService = new DefaultVehicleParkingService(); + var vehicleParkingService = new DefaultVehicleParkingRepository(); vehicleParkingService.updateVehicleParking(List.of(vehicleParking), List.of()); helper.linkVehicleParkingToGraph(vehicleParking); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java b/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java index e6ce7410ae6..d71a60a972e 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/islandpruning/IslandPruningUtils.java @@ -5,7 +5,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.transit.model.framework.Deduplicator; import org.opentripplanner.transit.service.SiteRepository; import org.opentripplanner.transit.service.TimetableRepository; @@ -26,7 +26,7 @@ static Graph buildOsmGraph( // Add street data from OSM OsmProvider osmProvider = new OsmProvider(osmFile, true); OsmModule osmModule = OsmModule - .of(osmProvider, graph, new DefaultVehicleParkingService()) + .of(osmProvider, graph, new DefaultVehicleParkingRepository()) .withEdgeNamer(new TestNamer()) .build(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java index 9f124e25ac9..a6afa89707f 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/linking/LinkingTest.java @@ -21,7 +21,7 @@ import org.opentripplanner.graph_builder.module.osm.OsmModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.street.model.StreetTraversalPermission; import org.opentripplanner.street.model._data.StreetModelForTest; import org.opentripplanner.street.model.edge.StreetEdge; @@ -158,7 +158,7 @@ public static TestOtpModel buildGraphNoTransit() { File file = ResourceLoader.of(LinkingTest.class).file("columbus.osm.pbf"); OsmProvider provider = new OsmProvider(file, false); - OsmModule osmModule = OsmModule.of(provider, gg, new DefaultVehicleParkingService()).build(); + OsmModule osmModule = OsmModule.of(provider, gg, new DefaultVehicleParkingRepository()).build(); osmModule.buildGraph(); return new TestOtpModel(gg, timetableRepository); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java index dc40bda6654..3c391a57246 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java @@ -32,7 +32,8 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.impl.GraphPathFinder; -import org.opentripplanner.service.vehicleparking.VehicleParkingService; +import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.edge.StreetEdge; @@ -59,7 +60,7 @@ public void testGraphBuilder() { OsmProvider provider = new OsmProvider(file, true); OsmModule osmModule = OsmModule - .of(provider, gg, new DefaultVehicleParkingService()) + .of(provider, gg, new DefaultVehicleParkingRepository()) .withAreaVisibility(true) .build(); @@ -118,7 +119,7 @@ public void testBuildGraphDetailed() { File file = RESOURCE_LOADER.file("NYC_small.osm.pbf"); OsmProvider provider = new OsmProvider(file, true); OsmModule osmModule = OsmModule - .of(provider, gg, new DefaultVehicleParkingService()) + .of(provider, gg, new DefaultVehicleParkingRepository()) .withAreaVisibility(true) .build(); @@ -283,7 +284,7 @@ public void testLocalizedString() { @Test void addParkingLotsToService() { - var service = buildParkingLots().service; + var service = new DefaultVehicleParkingService(buildParkingLots().repository); assertEquals(11, service.getVehicleParkings().count()); assertEquals(6, service.getBikeParks().count()); @@ -314,7 +315,7 @@ void testBarrierAtEnd() { File file = RESOURCE_LOADER.file("accessno-at-end.pbf"); OsmProvider provider = new OsmProvider(file, false); - OsmModule loader = OsmModule.of(provider, graph, new DefaultVehicleParkingService()).build(); + OsmModule loader = OsmModule.of(provider, graph, new DefaultVehicleParkingRepository()).build(); loader.buildGraph(); Vertex start = graph.getVertex(VertexLabel.osm(1)); @@ -331,7 +332,7 @@ void testBarrierAtEnd() { private BuildResult buildParkingLots() { var graph = new Graph(); - var service = new DefaultVehicleParkingService(); + var service = new DefaultVehicleParkingRepository(); var providers = Stream .of("B+R.osm.pbf", "P+R.osm.pbf") .map(RESOURCE_LOADER::file) @@ -346,7 +347,7 @@ private BuildResult buildParkingLots() { return new BuildResult(graph, service); } - private record BuildResult(Graph graph, VehicleParkingService service) {} + private record BuildResult(Graph graph, VehicleParkingRepository repository) {} /** * This reads test file with area and tests if it can be routed if visibility is used and if it @@ -365,7 +366,7 @@ private void testBuildingAreas(boolean skipVisibility) { OsmProvider provider = new OsmProvider(file, false); OsmModule loader = OsmModule - .of(provider, graph, new DefaultVehicleParkingService()) + .of(provider, graph, new DefaultVehicleParkingRepository()) .withAreaVisibility(!skipVisibility) .build(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java index 5a63e4683b2..f952bf90710 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/PlatformLinkerTest.java @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Test; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.street.model.edge.AreaEdge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; @@ -31,7 +31,7 @@ public void testLinkEntriesToPlatforms() { OsmProvider provider = new OsmProvider(file, false); OsmModule osmModule = OsmModule - .of(provider, gg, new DefaultVehicleParkingService()) + .of(provider, gg, new DefaultVehicleParkingRepository()) .withPlatformEntriesLinking(true) .build(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java index b81ecc6c6e5..ffc1f661dcc 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/TriangleInequalityTest.java @@ -21,7 +21,7 @@ import org.opentripplanner.routing.api.request.request.filter.AllowAllTransitFilter; import org.opentripplanner.routing.api.request.request.filter.TransitFilter; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; @@ -52,7 +52,7 @@ public static void onlyOnce() { File file = ResourceLoader.of(TriangleInequalityTest.class).file("NYC_small.osm.pbf"); OsmProvider provider = new OsmProvider(file, true); OsmModule osmModule = OsmModule - .of(provider, graph, new DefaultVehicleParkingService()) + .of(provider, graph, new DefaultVehicleParkingRepository()) .withAreaVisibility(true) .build(); osmModule.buildGraph(); diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java index 7837f757b92..103dafa61b9 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnconnectedAreasTest.java @@ -13,7 +13,7 @@ import org.opentripplanner.graph_builder.module.TestStreetLinkerModule; import org.opentripplanner.osm.OsmProvider; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.street.model.edge.StreetVehicleParkingLink; import org.opentripplanner.street.model.edge.VehicleParkingEdge; import org.opentripplanner.street.model.vertex.VehicleParkingEntranceVertex; @@ -163,7 +163,7 @@ private Graph buildOsmGraph(String osmFileName, DataImportIssueStore issueStore) var timetableRepository = new TimetableRepository(siteRepository, deduplicator); OsmProvider provider = new OsmProvider(RESOURCE_LOADER.file(osmFileName), false); OsmModule loader = OsmModule - .of(provider, graph, new DefaultVehicleParkingService()) + .of(provider, graph, new DefaultVehicleParkingRepository()) .withIssueStore(issueStore) .withAreaVisibility(true) .withStaticParkAndRide(true) diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java index 5c898fe446e..138c3e67181 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/UnroutableTest.java @@ -10,7 +10,7 @@ import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.api.request.StreetMode; import org.opentripplanner.routing.graph.Graph; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.model.vertex.Vertex; import org.opentripplanner.street.model.vertex.VertexLabel; @@ -39,7 +39,7 @@ public void setUp() throws Exception { var osmDataFile = ResourceLoader.of(UnroutableTest.class).file("bridge_construction.osm.pbf"); OsmProvider provider = new OsmProvider(osmDataFile, true); OsmModule osmBuilder = OsmModule - .of(provider, graph, new DefaultVehicleParkingService()) + .of(provider, graph, new DefaultVehicleParkingRepository()) .withAreaVisibility(true) .build(); osmBuilder.buildGraph(); diff --git a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java index c4aba539fd3..400a9eba2ba 100644 --- a/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java +++ b/application/src/test/java/org/opentripplanner/routing/graph/GraphSerializationTest.java @@ -24,7 +24,7 @@ import org.opentripplanner.framework.geometry.HashGridSpatialIndex; import org.opentripplanner.graph_builder.issue.api.DataImportIssueSummary; import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.worldenvelope.WorldEnvelopeRepository; import org.opentripplanner.service.worldenvelope.internal.DefaultWorldEnvelopeRepository; import org.opentripplanner.standalone.config.BuildConfig; @@ -69,12 +69,12 @@ public void testRoundTripSerializationForGTFSGraph() throws Exception { TestOtpModel model = ConstantsForTests.buildNewPortlandGraph(true); var weRepo = new DefaultWorldEnvelopeRepository(); var emissionsDataModel = new EmissionsDataModel(); - var parkingService = new DefaultVehicleParkingService(); + var parkingRepository = new DefaultVehicleParkingRepository(); testRoundTrip( model.graph(), model.timetableRepository(), weRepo, - parkingService, + parkingRepository, emissionsDataModel ); } @@ -87,12 +87,12 @@ public void testRoundTripSerializationForNetexGraph() throws Exception { TestOtpModel model = ConstantsForTests.buildNewMinimalNetexGraph(); var worldEnvelopeRepository = new DefaultWorldEnvelopeRepository(); var emissionsDataModel = new EmissionsDataModel(); - var parkingService = new DefaultVehicleParkingService(); + var parkingRepository = new DefaultVehicleParkingRepository(); testRoundTrip( model.graph(), model.timetableRepository(), worldEnvelopeRepository, - parkingService, + parkingRepository, emissionsDataModel ); } diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java index 10e456d9eb7..ee8c9bc5ba9 100644 --- a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java +++ b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java @@ -23,7 +23,7 @@ import org.opentripplanner.routing.graph.Graph; import org.opentripplanner.routing.graph.SerializedGraphObject; import org.opentripplanner.service.realtimevehicles.internal.DefaultRealtimeVehicleService; -import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingService; +import org.opentripplanner.service.vehicleparking.internal.DefaultVehicleParkingRepository; import org.opentripplanner.service.vehiclerental.internal.DefaultVehicleRentalService; import org.opentripplanner.standalone.OtpStartupInfo; import org.opentripplanner.standalone.api.OtpServerRequestContext; @@ -99,8 +99,7 @@ public SpeedTest( graph, new DefaultRealtimeVehicleService(transitService), new DefaultVehicleRentalService(), - new DefaultVehicleParkingService(), - new DefaultVehicleParkingService(), + new DefaultVehicleParkingRepository(), timetableRepository, config.updatersConfig ); From 565bae28b7086129726f5fff9216f52026051ea6 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 11 Nov 2024 13:26:17 +0100 Subject: [PATCH 054/169] Rename methods --- .../configure/VehicleParkingRepositoryModule.java | 2 +- .../vehicleparking/configure/VehicleParkingServiceModule.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java index 1a4086e325a..23c5b3e0e51 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingRepositoryModule.java @@ -8,5 +8,5 @@ @Module public interface VehicleParkingRepositoryModule { @Binds - VehicleParkingRepository bindService(DefaultVehicleParkingRepository repo); + VehicleParkingRepository bind(DefaultVehicleParkingRepository repo); } diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java index 50b48ef51e0..50dbe4b2bcb 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/configure/VehicleParkingServiceModule.java @@ -8,5 +8,5 @@ @Module public interface VehicleParkingServiceModule { @Binds - VehicleParkingService bindService(DefaultVehicleParkingService service); + VehicleParkingService bind(DefaultVehicleParkingService service); } From e639f2a655f0ad62f490e45d497b643bafbea995 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 11 Nov 2024 13:30:34 +0100 Subject: [PATCH 055/169] Update codegen config --- .../apis/gtfs/generated/graphql-codegen.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml index 2a7f2a95ba0..abc380d41e1 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml @@ -43,7 +43,7 @@ config: AlertCauseType: org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLAlertCauseType#GraphQLAlertCauseType AlertEffectType: org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLAlertEffectType#GraphQLAlertEffectType AlertSeverityLevelType: org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLAlertSeverityLevelType#GraphQLAlertSeverityLevelType - BikePark: org.opentripplanner.routing.vehicle_parking.VehicleParking#VehicleParking + BikePark: org.opentripplanner.service.vehicleparking.model.VehicleParking#VehicleParking BikeRentalStation: org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace#VehicleRentalPlace BikeRentalStationUris: org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris#VehicleRentalStationUris VehicleRentalStation: org.opentripplanner.service.vehiclerental.model.VehicleRentalStation#VehicleRentalStation @@ -55,7 +55,7 @@ config: BikesAllowed: org.opentripplanner.apis.gtfs.generated.GraphQLTypes.GraphQLBikesAllowed#GraphQLBikesAllowed BookingInfo: org.opentripplanner.transit.model.timetable.booking.BookingInfo#BookingInfo BookingTime: org.opentripplanner.transit.model.timetable.booking.BookingTime#BookingTime - CarPark: org.opentripplanner.routing.vehicle_parking.VehicleParking#VehicleParking + CarPark: org.opentripplanner.service.vehicleparking.model.VehicleParking#VehicleParking ContactInfo: org.opentripplanner.transit.model.organization.ContactInfo Cluster: Object Coordinates: org.locationtech.jts.geom.Coordinate#Coordinate @@ -104,9 +104,9 @@ config: Trip: org.opentripplanner.transit.model.timetable.Trip#Trip TripOccupancy: org.opentripplanner.apis.gtfs.model.TripOccupancy#TripOccupancy Unknown: org.opentripplanner.apis.gtfs.model.UnknownModel#UnknownModel - VehicleParking: org.opentripplanner.routing.vehicle_parking.VehicleParking#VehicleParking - VehicleParkingSpaces: org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces#VehicleParkingSpaces - VehicleParkingState: org.opentripplanner.routing.vehicle_parking.VehicleParkingState#VehicleParkingState + VehicleParking: org.opentripplanner.service.vehicleparking.model.VehicleParking#VehicleParking + VehicleParkingSpaces: org.opentripplanner.service.vehicleparking.model.VehicleParkingSpaces#VehicleParkingSpaces + VehicleParkingState: org.opentripplanner.service.vehicleparking.model.VehicleParkingState#VehicleParkingState VertexType: String SystemNotice: org.opentripplanner.model.SystemNotice#SystemNotice VehiclePosition: org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle#RealtimeVehicle From 64d39784663e3539d58b9d55c0c175c96ce6a1cc Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Mon, 11 Nov 2024 15:02:03 +0000 Subject: [PATCH 056/169] rename the enum again --- .../apis/gtfs/datafetchers/LegImpl.java | 8 ++++---- .../apis/transmodel/model/plan/LegType.java | 6 +++--- .../routing/alternativelegs/AlternativeLegs.java | 12 ++++++------ .../alternativelegs/NavigationDirection.java | 16 ++++++++++++++++ .../routing/alternativelegs/SearchTime.java | 6 ------ .../routing/stoptimes/AlternativeLegsTest.java | 10 +++++----- 6 files changed, 34 insertions(+), 24 deletions(-) create mode 100644 application/src/main/java/org/opentripplanner/routing/alternativelegs/NavigationDirection.java delete mode 100644 application/src/main/java/org/opentripplanner/routing/alternativelegs/SearchTime.java diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java index 54a40cef843..b02ea12e525 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java @@ -28,7 +28,7 @@ import org.opentripplanner.routing.alertpatch.TransitAlert; import org.opentripplanner.routing.alternativelegs.AlternativeLegs; import org.opentripplanner.routing.alternativelegs.AlternativeLegsFilter; -import org.opentripplanner.routing.alternativelegs.SearchTime; +import org.opentripplanner.routing.alternativelegs.NavigationDirection; import org.opentripplanner.transit.model.network.Route; import org.opentripplanner.transit.model.organization.Agency; import org.opentripplanner.transit.model.timetable.Trip; @@ -278,15 +278,15 @@ private Leg getSource(DataFetchingEnvironment environment) { @Override public DataFetcher> previousLegs() { - return alternativeLegs(SearchTime.BEFORE); + return alternativeLegs(NavigationDirection.PREVIOUS); } @Override public DataFetcher> nextLegs() { - return alternativeLegs(SearchTime.AFTER); + return alternativeLegs(NavigationDirection.NEXT); } - private DataFetcher> alternativeLegs(SearchTime timeLine) { + private DataFetcher> alternativeLegs(NavigationDirection timeLine) { return environment -> { if (environment.getSource() instanceof ScheduledTransitLeg originalLeg) { var args = new GraphQLTypes.GraphQLLegNextLegsArgs(environment.getArguments()); diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java index 6ca8c74070e..4b405f50f66 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/plan/LegType.java @@ -33,7 +33,7 @@ import org.opentripplanner.model.plan.TransitLeg; import org.opentripplanner.model.plan.legreference.LegReferenceSerializer; import org.opentripplanner.routing.alternativelegs.AlternativeLegs; -import org.opentripplanner.routing.alternativelegs.SearchTime; +import org.opentripplanner.routing.alternativelegs.NavigationDirection; public class LegType { @@ -486,7 +486,7 @@ public static GraphQLObjectType create( leg, env.getArgument("previous"), GqlUtil.getTransitService(env), - SearchTime.BEFORE, + NavigationDirection.PREVIOUS, env.getArgument("filter") ); }) @@ -526,7 +526,7 @@ public static GraphQLObjectType create( leg, env.getArgument("next"), GqlUtil.getTransitService(env), - SearchTime.AFTER, + NavigationDirection.NEXT, env.getArgument("filter") ); }) diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java index b71287a1c0e..7b685cf8193 100644 --- a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java +++ b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java @@ -45,7 +45,7 @@ public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - SearchTime timeLine, + NavigationDirection timeLine, AlternativeLegsFilter filter ) { return getAlternativeLegs(leg, numberLegs, transitService, timeLine, filter, false, false); @@ -73,7 +73,7 @@ public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - SearchTime timeLine, + NavigationDirection timeLine, AlternativeLegsFilter filter, boolean exactOriginStop, boolean exactDestinationStop @@ -96,7 +96,7 @@ public static List getAlternativeLegs( ScheduledTransitLeg::getStartTime ); - if (timeLine == SearchTime.BEFORE) { + if (timeLine == NavigationDirection.PREVIOUS) { legComparator = legComparator.reversed(); } @@ -127,7 +127,7 @@ private static Stream generateLegs( TripPatternBetweenStops tripPatternBetweenStops, ZonedDateTime departureTime, LocalDate originalDate, - SearchTime timeLine + NavigationDirection timeLine ) { TripPattern pattern = tripPatternBetweenStops.tripPattern; int boardingPosition = tripPatternBetweenStops.positions.boardingPosition; @@ -140,7 +140,7 @@ private static Stream generateLegs( tts.getServiceDayMidnight() + tts.getRealtimeDeparture() ); - if (timeLine == SearchTime.BEFORE) { + if (timeLine == NavigationDirection.PREVIOUS) { comparator = comparator.reversed(); } @@ -170,7 +170,7 @@ private static Stream generateLegs( continue; } - boolean departureTimeInRange = timeLine == SearchTime.BEFORE + boolean departureTimeInRange = timeLine == NavigationDirection.PREVIOUS ? tripTimes.getDepartureTime(boardingPosition) <= secondsSinceMidnight : tripTimes.getDepartureTime(boardingPosition) >= secondsSinceMidnight; diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/NavigationDirection.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/NavigationDirection.java new file mode 100644 index 00000000000..8254e3e28b7 --- /dev/null +++ b/application/src/main/java/org/opentripplanner/routing/alternativelegs/NavigationDirection.java @@ -0,0 +1,16 @@ +package org.opentripplanner.routing.alternativelegs; + +/** + * This enum describes how the user navigates on a list of items. + */ +public enum NavigationDirection { + /** + * Get the next set of items. + */ + NEXT, + + /** + * Get the previous set of items. + */ + PREVIOUS, +} diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/SearchTime.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/SearchTime.java deleted file mode 100644 index 1417dba47d2..00000000000 --- a/application/src/main/java/org/opentripplanner/routing/alternativelegs/SearchTime.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.opentripplanner.routing.alternativelegs; - -public enum SearchTime { - AFTER, - BEFORE, -} diff --git a/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java b/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java index 3380e8deb9f..65e99825a9e 100644 --- a/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java +++ b/application/src/test/java/org/opentripplanner/routing/stoptimes/AlternativeLegsTest.java @@ -12,7 +12,7 @@ import org.opentripplanner.model.plan.legreference.ScheduledTransitLegReference; import org.opentripplanner.routing.alternativelegs.AlternativeLegs; import org.opentripplanner.routing.alternativelegs.AlternativeLegsFilter; -import org.opentripplanner.routing.alternativelegs.SearchTime; +import org.opentripplanner.routing.alternativelegs.NavigationDirection; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.transit.service.DefaultTransitService; @@ -52,7 +52,7 @@ void testPreviousLegs() { originalLeg, 3, transitService, - SearchTime.BEFORE, + NavigationDirection.PREVIOUS, AlternativeLegsFilter.NO_FILTER ); @@ -86,7 +86,7 @@ void testNextLegs() { originalLeg, 3, transitService, - SearchTime.AFTER, + NavigationDirection.NEXT, AlternativeLegsFilter.NO_FILTER ); @@ -120,7 +120,7 @@ void testCircularRoutes() { originalLeg, 2, transitService, - SearchTime.AFTER, + NavigationDirection.NEXT, AlternativeLegsFilter.NO_FILTER ); @@ -148,7 +148,7 @@ void testComplexCircularRoutes() { originalLeg, 2, transitService, - SearchTime.AFTER, + NavigationDirection.NEXT, AlternativeLegsFilter.NO_FILTER ); var legs = toString(alternativeLegs); From 6cee461a5e9916d9b44b6d231e569f982a9dd2cd Mon Sep 17 00:00:00 2001 From: JustCris Date: Mon, 11 Nov 2024 16:31:01 +0100 Subject: [PATCH 057/169] remove name from RentalVehicle gtfs graphql API --- .../apis/gtfs/generated/GraphQLDataFetchers.java | 4 ---- .../resources/org/opentripplanner/apis/gtfs/schema.graphqls | 4 ---- .../apis/gtfs/expectations/rental-vehicle.json | 1 - .../apis/gtfs/expectations/vehicle-rentals-bybbox.json | 3 +-- .../opentripplanner/apis/gtfs/queries/rental-vehicle.graphql | 1 - .../apis/gtfs/queries/vehicle-rentals-bybbox.graphql | 2 +- 6 files changed, 2 insertions(+), 13 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index cd381f1ae73..b3c688d5d4a 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -1290,10 +1290,6 @@ public default DataFetcher lon() { return null; } - public default DataFetcher name() { - return null; - } - public default DataFetcher operative() { return null; } diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index 2b6178ca34f..b93a4b5580e 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -78,8 +78,6 @@ interface VehicleRental { lat: Float "Longitude of the vehicle rental object (WGS 84)" lon: Float - "Name of the vehicle" - name: String! "If true, rental object is not disabled." operative: Boolean "The vehicle rental network information. This is referred as system in the GBFS terminology." @@ -1785,8 +1783,6 @@ type RentalVehicle implements Node & PlaceInterface & VehicleRental { lat: Float "Longitude of the vehicle (WGS 84)" lon: Float - "Name of the vehicle" - name: String! "ID of the rental network." network: String @deprecated(reason : "Use `networkId` from `rentalNetwork` instead.") "If true, vehicle is not disabled." diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json index 9017fe77a93..62c4313130a 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json @@ -2,7 +2,6 @@ "data": { "rentalVehicle": { "vehicleId":"Network-1:free-floating-bicycle", - "name":"free-floating-bicycle", "allowPickupNow":true, "lon":19.01, "lat":47.52, diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json index bbc07a907d5..61d74bbf244 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json @@ -6,13 +6,13 @@ "allowPickupNow": false, "lat": 47.51, "lon": 18.99, - "name": "FooStation", "operative": false, "rentalNetwork": { "networkId": "Network-1", "url": "https://foo.bar" }, "rentalUris": null, + "name": "FooStation", "stationId": "Network-1:FooStation", "vehiclesAvailable": 10, "availableVehicles": { @@ -65,7 +65,6 @@ "allowPickupNow": true, "lat": 47.52, "lon": 19.01, - "name": "free-floating-bicycle", "operative": true, "rentalNetwork": { "networkId": "Network-1", diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/rental-vehicle.graphql b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/rental-vehicle.graphql index 9a912781c56..aff813620f0 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/rental-vehicle.graphql +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/rental-vehicle.graphql @@ -1,7 +1,6 @@ { rentalVehicle(id: "Network-1:free-floating-bicycle") { vehicleId - name allowPickupNow lon lat diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql index c30a71a5ddd..872230b46d2 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql @@ -9,7 +9,6 @@ allowPickupNow lat lon - name operative rentalNetwork { networkId @@ -28,6 +27,7 @@ } } ... on VehicleRentalStation { + name stationId vehiclesAvailable availableVehicles { From c8bf492a101cc2828ae823987291b6c8e79e8a63 Mon Sep 17 00:00:00 2001 From: JustCris Date: Mon, 11 Nov 2024 16:46:06 +0100 Subject: [PATCH 058/169] remove name from GraphQLRentalVehicle and RentalVehicleImpl --- .../apis/gtfs/datafetchers/RentalVehicleImpl.java | 5 ----- .../apis/gtfs/generated/GraphQLDataFetchers.java | 2 -- 2 files changed, 7 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RentalVehicleImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RentalVehicleImpl.java index c4fb92c0ef4..f1656827b97 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RentalVehicleImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RentalVehicleImpl.java @@ -32,11 +32,6 @@ public DataFetcher lon() { return environment -> getSource(environment).getLongitude(); } - @Override - public DataFetcher name() { - return environment -> getSource(environment).getName().toString(environment.getLocale()); - } - @Override public DataFetcher network() { return environment -> getSource(environment).getNetwork(); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index b3c688d5d4a..4a4296a142d 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -854,8 +854,6 @@ public interface GraphQLRentalVehicle { public DataFetcher lon(); - public DataFetcher name(); - public DataFetcher network(); public DataFetcher operative(); From 2087243e2b377ccecb0aa7686cbfca811dcbe416 Mon Sep 17 00:00:00 2001 From: JustCris Date: Tue, 12 Nov 2024 10:47:27 +0100 Subject: [PATCH 059/169] revert deletion of name in RentalVehicle type --- .../apis/gtfs/datafetchers/RentalVehicleImpl.java | 5 +++++ .../apis/gtfs/generated/GraphQLDataFetchers.java | 2 ++ .../resources/org/opentripplanner/apis/gtfs/schema.graphqls | 2 ++ .../apis/gtfs/expectations/rental-vehicle.json | 1 + .../apis/gtfs/expectations/vehicle-rentals-bybbox.json | 1 + .../opentripplanner/apis/gtfs/queries/rental-vehicle.graphql | 1 + .../apis/gtfs/queries/vehicle-rentals-bybbox.graphql | 1 + 7 files changed, 13 insertions(+) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RentalVehicleImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RentalVehicleImpl.java index f1656827b97..c4fb92c0ef4 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RentalVehicleImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RentalVehicleImpl.java @@ -32,6 +32,11 @@ public DataFetcher lon() { return environment -> getSource(environment).getLongitude(); } + @Override + public DataFetcher name() { + return environment -> getSource(environment).getName().toString(environment.getLocale()); + } + @Override public DataFetcher network() { return environment -> getSource(environment).getNetwork(); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index 4a4296a142d..b3c688d5d4a 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -854,6 +854,8 @@ public interface GraphQLRentalVehicle { public DataFetcher lon(); + public DataFetcher name(); + public DataFetcher network(); public DataFetcher operative(); diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index b93a4b5580e..1013e51f925 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -1783,6 +1783,8 @@ type RentalVehicle implements Node & PlaceInterface & VehicleRental { lat: Float "Longitude of the vehicle (WGS 84)" lon: Float + "Name of the vehicle" + name: String! "ID of the rental network." network: String @deprecated(reason : "Use `networkId` from `rentalNetwork` instead.") "If true, vehicle is not disabled." diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json index 62c4313130a..9017fe77a93 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json @@ -2,6 +2,7 @@ "data": { "rentalVehicle": { "vehicleId":"Network-1:free-floating-bicycle", + "name":"free-floating-bicycle", "allowPickupNow":true, "lon":19.01, "lat":47.52, diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json index 61d74bbf244..c93c6ba5c88 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json @@ -71,6 +71,7 @@ "url": "https://foo.bar" }, "rentalUris": null, + "name": "free-floating-bicycle", "vehicleId": "Network-1:free-floating-bicycle", "vehicleType": { "formFactor": "BICYCLE", diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/rental-vehicle.graphql b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/rental-vehicle.graphql index aff813620f0..9a912781c56 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/rental-vehicle.graphql +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/rental-vehicle.graphql @@ -1,6 +1,7 @@ { rentalVehicle(id: "Network-1:free-floating-bicycle") { vehicleId + name allowPickupNow lon lat diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql index 872230b46d2..db42e991e5f 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql @@ -20,6 +20,7 @@ web } ... on RentalVehicle { + name vehicleId vehicleType { formFactor From 17228b2c07f17493c7a463b7c956b1ef18b1f6c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rich=C3=A1rd=20K=C5=91szegi?= Date: Thu, 17 Oct 2024 15:01:46 +0200 Subject: [PATCH 060/169] debug client: resolve coordinates for stop ids --- .../components/MapView/NavigationMarkers.tsx | 16 ++++++---- .../MapView/useCoordinateResolver.ts | 30 +++++++++++++++++ client/src/hooks/useQuayCoordinateQuery.ts | 32 +++++++++++++++++++ 3 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 client/src/components/MapView/useCoordinateResolver.ts create mode 100644 client/src/hooks/useQuayCoordinateQuery.ts diff --git a/client/src/components/MapView/NavigationMarkers.tsx b/client/src/components/MapView/NavigationMarkers.tsx index 6d043038ae9..2ae62cab8f2 100644 --- a/client/src/components/MapView/NavigationMarkers.tsx +++ b/client/src/components/MapView/NavigationMarkers.tsx @@ -2,6 +2,7 @@ import { TripQueryVariables } from '../../gql/graphql.ts'; import { Marker } from 'react-map-gl'; import markerFlagStart from '../../static/img/marker-flag-start-shadowed.png'; import markerFlagEnd from '../../static/img/marker-flag-end-shadowed.png'; +import { useCoordinateResolver } from './useCoordinateResolver.ts'; export function NavigationMarkers({ setCursor, @@ -14,13 +15,16 @@ export function NavigationMarkers({ setTripQueryVariables: (variables: TripQueryVariables) => void; loading: boolean; }) { + const fromCoordinates = useCoordinateResolver(tripQueryVariables.from); + const toCoordinates = useCoordinateResolver(tripQueryVariables.to); + return ( <> - {tripQueryVariables.from.coordinates && ( + {fromCoordinates && ( setCursor('grabbing')} onDragEnd={(e) => { setCursor('auto'); @@ -36,11 +40,11 @@ export function NavigationMarkers({ )} - {tripQueryVariables.to.coordinates && ( + {toCoordinates && ( setCursor('grabbing')} onDragEnd={(e) => { setCursor('auto'); diff --git a/client/src/components/MapView/useCoordinateResolver.ts b/client/src/components/MapView/useCoordinateResolver.ts new file mode 100644 index 00000000000..e44472df549 --- /dev/null +++ b/client/src/components/MapView/useCoordinateResolver.ts @@ -0,0 +1,30 @@ +import { Location } from '../../gql/graphql.ts'; +import { useQuayCoordinateQuery } from '../../hooks/useQuayCoordinateQuery.ts'; + +interface Coordinates { + latitude: number; + longitude: number; +} + +export function useCoordinateResolver(location: Location): Coordinates | undefined { + const quay = useQuayCoordinateQuery(location); + + if (quay) { + const { latitude, longitude } = quay; + + if (latitude && longitude) { + return { + latitude, + longitude, + }; + } + } + + if (location.coordinates) { + return { + ...location.coordinates, + }; + } + + return undefined; +} diff --git a/client/src/hooks/useQuayCoordinateQuery.ts b/client/src/hooks/useQuayCoordinateQuery.ts new file mode 100644 index 00000000000..e2e401a950b --- /dev/null +++ b/client/src/hooks/useQuayCoordinateQuery.ts @@ -0,0 +1,32 @@ +import { useEffect, useState } from 'react'; +import { request } from 'graphql-request'; // eslint-disable-line import/no-unresolved +import { Location, QueryType } from '../gql/graphql.ts'; +import { getApiUrl } from '../util/getApiUrl.ts'; +import { graphql } from '../gql'; + +const query = graphql(` + query quayCoordinate($id: String!) { + quay(id: $id) { + latitude + longitude + } + } +`); + +export const useQuayCoordinateQuery = (location: Location) => { + const [data, setData] = useState(null); + + useEffect(() => { + const fetchData = async () => { + if (location.place) { + const variables = { id: location.place }; + setData((await request(getApiUrl(), query, variables)) as QueryType); + } else { + setData(null); + } + }; + fetchData(); + }, [location]); + + return data?.quay; +}; From 1287304f20376a3869be4394035976c9256cf8cd Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Tue, 12 Nov 2024 13:03:16 +0100 Subject: [PATCH 061/169] Reapply "Remove legacy bike access mapping" This reverts commit 26a654f97b336d0e649b95b6fcbf5e6a4d52d182. --- .../gtfs/mapping/BikeAccessMapper.java | 59 +++---------------- .../gtfs/mapping/BikeAccessMapperTest.java | 38 ------------ 2 files changed, 9 insertions(+), 88 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/gtfs/mapping/BikeAccessMapper.java b/application/src/main/java/org/opentripplanner/gtfs/mapping/BikeAccessMapper.java index 12f7edcf8c1..4175dabcbc4 100644 --- a/application/src/main/java/org/opentripplanner/gtfs/mapping/BikeAccessMapper.java +++ b/application/src/main/java/org/opentripplanner/gtfs/mapping/BikeAccessMapper.java @@ -5,64 +5,23 @@ import org.opentripplanner.transit.model.network.BikeAccess; /** - * Model bike access for GTFS trips. - *

- * The GTFS bike extensions is originally discussed at: https://groups.google.com/d/msg/gtfs-changes/QqaGOuNmG7o/xyqORy-T4y0J - *

- * It proposes "route_bikes_allowed" in routes.txt and "trip_bikes_allowed" in trips.txt with the - * following semantics: - *

- * 2: bikes allowed
1: no bikes allowed
0: no information (same as field omitted)
- *

- * The values in trips.txt override the values in routes.txt. - *

- * An alternative proposal is discussed in: https://groups.google.com/d/msg/gtfs-changes/rEiSeKNc4cs/gTTnQ_yXtPgJ - *

- * Here, the field "bikes_allowed" is used in both routes.txt and trip.txt with the following - * semantics: - *

- * 2: no bikes allowed
1: bikes allowed
0: no information (same as field omitted)
- *

- * Here, the 0,1,2 semantics have been changed to match the convention used in the - * "wheelchair_accessible" field in trips.txt. - *

- * A number of feeds are still using the original proposal and a number of feeds have been updated - * to use the new proposal. For now, we support both, using "bikes_allowed" if specified and then - * "trip_bikes_allowed". + * Model bike access for GTFS trips by using the bikes_allowed fields from route and trip. */ class BikeAccessMapper { public static BikeAccess mapForTrip(Trip rhs) { - //noinspection deprecation - return mapValues(rhs.getBikesAllowed(), rhs.getTripBikesAllowed()); + return mapValues(rhs.getBikesAllowed()); } public static BikeAccess mapForRoute(Route rhs) { - //noinspection deprecation - return mapValues(rhs.getBikesAllowed(), rhs.getRouteBikesAllowed()); + return mapValues(rhs.getBikesAllowed()); } - private static BikeAccess mapValues(int bikesAllowed, int legacyBikesAllowed) { - if (bikesAllowed != 0) { - switch (bikesAllowed) { - case 1: - return BikeAccess.ALLOWED; - case 2: - return BikeAccess.NOT_ALLOWED; - default: - return BikeAccess.UNKNOWN; - } - } else if (legacyBikesAllowed != 0) { - switch (legacyBikesAllowed) { - case 1: - return BikeAccess.NOT_ALLOWED; - case 2: - return BikeAccess.ALLOWED; - default: - return BikeAccess.UNKNOWN; - } - } - - return BikeAccess.UNKNOWN; + private static BikeAccess mapValues(int bikesAllowed) { + return switch (bikesAllowed) { + case 1 -> BikeAccess.ALLOWED; + case 2 -> BikeAccess.NOT_ALLOWED; + default -> BikeAccess.UNKNOWN; + }; } } diff --git a/application/src/test/java/org/opentripplanner/gtfs/mapping/BikeAccessMapperTest.java b/application/src/test/java/org/opentripplanner/gtfs/mapping/BikeAccessMapperTest.java index a17886311dc..d7d16f534f2 100644 --- a/application/src/test/java/org/opentripplanner/gtfs/mapping/BikeAccessMapperTest.java +++ b/application/src/test/java/org/opentripplanner/gtfs/mapping/BikeAccessMapperTest.java @@ -11,10 +11,7 @@ public class BikeAccessMapperTest { private static final int BIKES_ALLOWED = 1; private static final int BIKES_NOT_ALLOWED = 2; - private static final int TRIP_BIKES_ALLOWED = 2; private static final int TRIP_BIKES_NOT_ALLOWED = 1; - private static final int ROUTE_BIKES_ALLOWED = 2; - private static final int ROUTE_BIKES_NOT_ALLOWED = 1; @Test public void testTripProvidedValues() { @@ -28,25 +25,12 @@ public void testTripProvidedValues() { assertEquals(BikeAccess.NOT_ALLOWED, BikeAccessMapper.mapForTrip(trip)); } - @Test - public void testLegacyTripProvidedValues() { - Trip trip = new Trip(); - assertEquals(BikeAccess.UNKNOWN, BikeAccessMapper.mapForTrip(trip)); - - trip.setTripBikesAllowed(TRIP_BIKES_ALLOWED); - assertEquals(BikeAccess.ALLOWED, BikeAccessMapper.mapForTrip(trip)); - - trip.setTripBikesAllowed(TRIP_BIKES_NOT_ALLOWED); - assertEquals(BikeAccess.NOT_ALLOWED, BikeAccessMapper.mapForTrip(trip)); - } - @Test public void testTripProvidedValuesPrecedence() { Trip trip = new Trip(); assertEquals(BikeAccess.UNKNOWN, BikeAccessMapper.mapForTrip(trip)); trip.setBikesAllowed(BIKES_ALLOWED); - trip.setTripBikesAllowed(TRIP_BIKES_NOT_ALLOWED); assertEquals(BikeAccess.ALLOWED, BikeAccessMapper.mapForTrip(trip)); } @@ -61,26 +45,4 @@ public void testRouteProvidedValues() { route.setBikesAllowed(BIKES_NOT_ALLOWED); assertEquals(BikeAccess.NOT_ALLOWED, BikeAccessMapper.mapForRoute(route)); } - - @Test - public void testLegacyRouteProvidedValues() { - Route route = new Route(); - assertEquals(BikeAccess.UNKNOWN, BikeAccessMapper.mapForRoute(route)); - - route.setRouteBikesAllowed(ROUTE_BIKES_ALLOWED); - assertEquals(BikeAccess.ALLOWED, BikeAccessMapper.mapForRoute(route)); - - route.setRouteBikesAllowed(ROUTE_BIKES_NOT_ALLOWED); - assertEquals(BikeAccess.NOT_ALLOWED, BikeAccessMapper.mapForRoute(route)); - } - - @Test - public void testRouteProvidedValuesPrecedence() { - Route route = new Route(); - assertEquals(BikeAccess.UNKNOWN, BikeAccessMapper.mapForRoute(route)); - - route.setBikesAllowed(BIKES_ALLOWED); - route.setRouteBikesAllowed(ROUTE_BIKES_NOT_ALLOWED); - assertEquals(BikeAccess.ALLOWED, BikeAccessMapper.mapForRoute(route)); - } } From 61ca1831d3b19a70b17caf4336f7f94a48699d81 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Tue, 12 Nov 2024 13:07:03 +0100 Subject: [PATCH 062/169] Remove unused variable --- .../org/opentripplanner/gtfs/mapping/BikeAccessMapperTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/application/src/test/java/org/opentripplanner/gtfs/mapping/BikeAccessMapperTest.java b/application/src/test/java/org/opentripplanner/gtfs/mapping/BikeAccessMapperTest.java index d7d16f534f2..d5ed02dfd9c 100644 --- a/application/src/test/java/org/opentripplanner/gtfs/mapping/BikeAccessMapperTest.java +++ b/application/src/test/java/org/opentripplanner/gtfs/mapping/BikeAccessMapperTest.java @@ -11,7 +11,6 @@ public class BikeAccessMapperTest { private static final int BIKES_ALLOWED = 1; private static final int BIKES_NOT_ALLOWED = 2; - private static final int TRIP_BIKES_NOT_ALLOWED = 1; @Test public void testTripProvidedValues() { From d1f8e3c0527b7760639159f0ac30dfd47e1cdecd Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Tue, 12 Nov 2024 14:57:03 +0100 Subject: [PATCH 063/169] Update application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java Co-authored-by: Joel Lappalainen --- .../opentripplanner/framework/application/OTPFeature.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java b/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java index 2e8bab44816..6631287613b 100644 --- a/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java +++ b/application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java @@ -22,10 +22,10 @@ public enum OTPFeature { false, false, """ - Turning this on make sure that Rail stops without scheduled patterns still get included + Turning this on guarantees that Rail stops without scheduled departures still get included when generating transfers using `ConsiderPatternsForDirectTransfers`. It is common for stops - to be assign at realtime for Rail, if so turning this on will help to avoid dropping transfers - which are needed, when the stop become in use later. Turning this on, if + to be assign at real-time for Rail. Turning this on will help to avoid dropping transfers which + are needed, when the stop is in use later. Turning this on, if ConsiderPatternsForDirectTransfers is off has no effect. """ ), From e5163507e6b5d654b6d93615d5afe8bc7b0ccd09 Mon Sep 17 00:00:00 2001 From: sharhio Date: Wed, 13 Nov 2024 09:41:30 +0200 Subject: [PATCH 064/169] use all instead off null --- .../VehicleRentalServiceDirectoryFetcher.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java b/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java index 8cd0ac0ebc5..bf846238eed 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java @@ -18,6 +18,7 @@ import org.opentripplanner.updater.spi.GraphUpdater; import org.opentripplanner.updater.vehicle_rental.VehicleRentalUpdater; import org.opentripplanner.updater.vehicle_rental.datasources.VehicleRentalDataSourceFactory; +import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -112,7 +113,7 @@ private static List buildListOfNetworksFr // overloadingAllowed - not part of GBFS, not supported here false, // allowedRentalType not supported - null + AllowedRentalType.ALL ) ); } else { From 993bed1ab06c76c1db58fc806ad554ef69974f25 Mon Sep 17 00:00:00 2001 From: sharhio Date: Wed, 13 Nov 2024 10:47:16 +0200 Subject: [PATCH 065/169] documented, never null constructor --- .../sources/VehicleRentalSourceFactory.java | 15 ++------ .../datasources/params/AllowedRentalType.java | 33 ++++++++++++++-- ...GbfsVehicleRentalDataSourceParameters.java | 4 ++ doc/user/UpdaterConfig.md | 38 +++++++++---------- 4 files changed, 53 insertions(+), 37 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java b/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java index 165ea3fd8c2..a3819053d62 100644 --- a/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java @@ -1,5 +1,6 @@ package org.opentripplanner.standalone.config.routerconfig.updaters.sources; +import static org.opentripplanner.standalone.config.framework.json.EnumMapper.docEnumValueList; import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V1_5; import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V2_1; import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V2_2; @@ -130,18 +131,8 @@ private AllowedRentalType allowedRentalType() { return c .of("allowedRentalType") .since(V2_7) - .summary("Temporary parameter. The type of rental data to include.") - .description( - """ - This parameter is temporary and will be removed in a future version of OTP. - - The type of rental data to include. This can be one of the following: - - - `ALL`: Include all data types. - - `STATIONS`: Include station data only. - - `VEHICLES`: Include floating vehicle data only. - """ - ) + .summary(AllowedRentalType.ALL.typeDescription()) + .description(docEnumValueList(AllowedRentalType.values())) .asEnum(AllowedRentalType.ALL); } } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java index acf7c7690b9..f8ede8bbebf 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java @@ -1,7 +1,32 @@ package org.opentripplanner.updater.vehicle_rental.datasources.params; -public enum AllowedRentalType { - STATIONS, - VEHICLES, - ALL, +import org.opentripplanner.framework.doc.DocumentedEnum; + +/** + * This is temporary and will be removed in a future version of OTP. + * + * Enum to specify the type of rental data that is allowed to be read from the data source. + */ +public enum AllowedRentalType implements DocumentedEnum { + STATIONS("Only station data is allowed."), + VEHICLES("Only vehicle data is allowed."), + ALL("All types of rental data are allowed."); + + private final String description; + + AllowedRentalType(String description) { + this.description = description.stripIndent().trim(); + } + + @Override + public String typeDescription() { + return ( + "Temporary parameter. Use this to specify the type of rental data that is allowed to be read from the data source." + ); + } + + @Override + public String enumValueDescription() { + return description; + } } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java index 46dab2909fe..75a6aad0959 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java @@ -1,5 +1,6 @@ package org.opentripplanner.updater.vehicle_rental.datasources.params; +import java.util.Objects; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; @@ -14,6 +15,9 @@ public record GbfsVehicleRentalDataSourceParameters( AllowedRentalType allowedRentalType ) implements VehicleRentalDataSourceParameters { + public GbfsVehicleRentalDataSourceParameters { + Objects.requireNonNull(allowedRentalType); + } @Override public VehicleRentalSourceType sourceType() { return VehicleRentalSourceType.GBFS; diff --git a/doc/user/UpdaterConfig.md b/doc/user/UpdaterConfig.md index bd56207ea40..1c47fc77e63 100644 --- a/doc/user/UpdaterConfig.md +++ b/doc/user/UpdaterConfig.md @@ -313,19 +313,19 @@ GBFS form factors: -| Config Parameter | Type | Summary | Req./Opt. | Default Value | Since | -|---------------------------------------------------------------------------------------|:---------------:|---------------------------------------------------------------------------------|:----------:|---------------|:-----:| -| type = "vehicle-rental" | `enum` | The type of the updater. | *Required* | | 1.5 | -| [allowKeepingRentedVehicleAtDestination](#u_1_allowKeepingRentedVehicleAtDestination) | `boolean` | If a vehicle should be allowed to be kept at the end of a station-based rental. | *Optional* | `false` | 2.1 | -| [allowedRentalType](#u_1_allowedRentalType) | `enum` | Temporary parameter. The type of rental data to include. | *Optional* | `"all"` | 2.7 | -| frequency | `duration` | How often the data should be updated. | *Optional* | `"PT1M"` | 1.5 | -| [geofencingZones](#u_1_geofencingZones) | `boolean` | Compute rental restrictions based on GBFS 2.2 geofencing zones. | *Optional* | `false` | 2.3 | -| language | `string` | TODO | *Optional* | | 2.1 | -| [network](#u_1_network) | `string` | The name of the network to override the one derived from the source data. | *Optional* | | 1.5 | -| overloadingAllowed | `boolean` | Allow leaving vehicles at a station even though there are no free slots. | *Optional* | `false` | 2.2 | -| [sourceType](#u_1_sourceType) | `enum` | What source of vehicle rental updater to use. | *Required* | | 1.5 | -| url | `string` | The URL to download the data from. | *Required* | | 1.5 | -| [headers](#u_1_headers) | `map of string` | HTTP headers to add to the request. Any header key, value can be inserted. | *Optional* | | 1.5 | +| Config Parameter | Type | Summary | Req./Opt. | Default Value | Since | +|---------------------------------------------------------------------------------------|:---------------:|-------------------------------------------------------------------------------------------------------------------|:----------:|---------------|:-----:| +| type = "vehicle-rental" | `enum` | The type of the updater. | *Required* | | 1.5 | +| [allowKeepingRentedVehicleAtDestination](#u_1_allowKeepingRentedVehicleAtDestination) | `boolean` | If a vehicle should be allowed to be kept at the end of a station-based rental. | *Optional* | `false` | 2.1 | +| [allowedRentalType](#u_1_allowedRentalType) | `enum` | Temporary parameter. Use this to specify the type of rental data that is allowed to be read from the data source. | *Optional* | `"all"` | 2.7 | +| frequency | `duration` | How often the data should be updated. | *Optional* | `"PT1M"` | 1.5 | +| [geofencingZones](#u_1_geofencingZones) | `boolean` | Compute rental restrictions based on GBFS 2.2 geofencing zones. | *Optional* | `false` | 2.3 | +| language | `string` | TODO | *Optional* | | 2.1 | +| [network](#u_1_network) | `string` | The name of the network to override the one derived from the source data. | *Optional* | | 1.5 | +| overloadingAllowed | `boolean` | Allow leaving vehicles at a station even though there are no free slots. | *Optional* | `false` | 2.2 | +| [sourceType](#u_1_sourceType) | `enum` | What source of vehicle rental updater to use. | *Required* | | 1.5 | +| url | `string` | The URL to download the data from. | *Required* | | 1.5 | +| [headers](#u_1_headers) | `map of string` | HTTP headers to add to the request. Any header key, value can be inserted. | *Optional* | | 1.5 | ##### Parameter details @@ -353,15 +353,11 @@ For this to be possible three things need to be configured: **Path:** /updaters/[1] **Enum values:** `stations` | `vehicles` | `all` -Temporary parameter. The type of rental data to include. +Temporary parameter. Use this to specify the type of rental data that is allowed to be read from the data source. -This parameter is temporary and will be removed in a future version of OTP. - -The type of rental data to include. This can be one of the following: - -- `ALL`: Include all data types. -- `STATIONS`: Include station data only. -- `VEHICLES`: Include floating vehicle data only. + - `stations` Only station data is allowed. + - `vehicles` Only vehicle data is allowed. + - `all` All types of rental data are allowed.

geofencingZones

From b1fd4d231ef2b4cff67f777c6b755085503384fd Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Wed, 13 Nov 2024 12:03:46 +0200 Subject: [PATCH 066/169] filter by allowed rental networks from request --- .../street/model/edge/StreetEdge.java | 49 ++++++++++++------- .../model/edge/StreetEdgeGeofencingTest.java | 8 ++- 2 files changed, 37 insertions(+), 20 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java index 8e9e63c5576..7ff16bcb1e0 100644 --- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java +++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java @@ -2,6 +2,7 @@ import java.io.IOException; import java.io.ObjectOutputStream; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; @@ -976,6 +977,26 @@ static int defaultMillimeterLength(LineString geometry) { return (int) (SphericalDistanceLibrary.length(geometry) * 1000); } + private State makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(State s0, String network) { + var preferences = s0.getRequest().preferences(); + var edit = doTraverse(s0, TraverseMode.WALK, false); + if (edit != null) { + edit.dropFloatingVehicle(s0.vehicleRentalFormFactor(), network, s0.getRequest().arriveBy()); + if (network != null) { + edit.resetStartedInNoDropOffZone(); + } + State state = edit.makeState(); + if (state != null && network != null) { + var allowedNetworks = preferences.rental(state.currentMode()).allowedNetworks(); + if (!allowedNetworks.contains(network)) { + return null; + } + } + return state; + } + return null; + } + /** * A very special case: an arriveBy rental search has started in a no-drop-off zone * we don't know yet which rental network we will end up using. @@ -987,31 +1008,21 @@ static int defaultMillimeterLength(LineString geometry) { * zone applies to where we pick up a vehicle with a specific network. */ private State[] splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching(State s0) { - var networks = Stream.concat( + var states = tov.rentalRestrictions().noDropOffNetworks().stream().map(network -> makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, network)).filter(Objects::nonNull).toList(); + var statesStream = states.stream(); + + if (!states.isEmpty()) { // null is a special rental network that speculatively assumes that you can take any vehicle // you have to check in the rental edge if this has search has been started in a no-drop off zone - Stream.of((String) null), - tov.rentalRestrictions().noDropOffNetworks().stream() - ); - - var states = networks.map(network -> { - var edit = doTraverse(s0, TraverseMode.WALK, false); - if (edit != null) { - edit.dropFloatingVehicle(s0.vehicleRentalFormFactor(), network, s0.getRequest().arriveBy()); - if (network != null) { - edit.resetStartedInNoDropOffZone(); - } - return edit.makeState(); - } - return null; - }); + statesStream = Stream.concat(Stream.of(makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, null)), + statesStream); + } StateEditor walking = doTraverse(s0, TraverseMode.WALK, false); if (walking != null) { - var forkState = walking.makeState(); - states = Stream.concat(Stream.of(forkState), states); + statesStream = Stream.concat(Stream.of(walking.makeState()), statesStream); } - return State.ofStream(states); + return State.ofStream(statesStream); } /** diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java index 4a1596d3450..e112b1b017e 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java @@ -261,7 +261,7 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { // we return 3 states: one for the speculative renting of a vehicle, but with the information // of which networks' no-drop-off zones it started in - assertEquals(4, states.length); + assertEquals(3, states.length); // first the fallback walk state final State walkState = states[0]; @@ -286,16 +286,22 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { assertEquals(NETWORK_TIER, tierState.getVehicleRentalNetwork()); assertEquals(Set.of(), tierState.stateData.noRentalDropOffZonesAtStartOfReverseSearch); + /* + * These rental networks are not allowed in the request so they are no longer returned final State birdState = states[3]; assertEquals(RENTING_FLOATING, birdState.getVehicleRentalState()); assertEquals(BICYCLE, birdState.currentMode()); assertEquals(NETWORK_BIRD, birdState.getVehicleRentalNetwork()); assertEquals(Set.of(), birdState.stateData.noRentalDropOffZonesAtStartOfReverseSearch); + */ } private static StreetSearchRequest defaultArriveByRequest() { return StreetSearchRequest .of() + .withPreferences(p -> + p.withBike(b -> b.withRental(r -> r.withAllowedNetworks(Set.of(NETWORK_TIER)))) + ) .withMode(StreetMode.SCOOTER_RENTAL) .withArriveBy(true) .build(); From 30f2df047800080327a2910faa36a3a223fb999d Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Wed, 13 Nov 2024 12:16:26 +0200 Subject: [PATCH 067/169] better comments for speculative rental vehicle code, remove one of the tests which both test the same thing --- .../org/opentripplanner/street/model/edge/StreetEdge.java | 4 ++++ .../street/model/edge/StreetEdgeGeofencingTest.java | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java index 8e9e63c5576..87a5c9b9ff6 100644 --- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java +++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java @@ -1006,6 +1006,10 @@ private State[] splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching(St return null; }); + // Also include a state which continues walking, because the vehicle rental states are + // speculation. It is possible that the rental states don't end up at the target at all + // due to mode limitations or not finding a place to pick up the rental vehicle, or that + // the rental possibility is simply more expensive than walking. StateEditor walking = doTraverse(s0, TraverseMode.WALK, false); if (walking != null) { var forkState = walking.makeState(); diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java index 4a1596d3450..5a09a6d9afe 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java @@ -259,8 +259,8 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { var states = edge.traverse(haveRentedState); - // we return 3 states: one for the speculative renting of a vehicle, but with the information - // of which networks' no-drop-off zones it started in + // we return 4 states: one for continuing walking, one for the speculative renting of + // a vehicle, but with the information of which networks' no-drop-off zones it started in assertEquals(4, states.length); // first the fallback walk state @@ -268,7 +268,7 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { assertEquals(HAVE_RENTED, walkState.getVehicleRentalState()); assertEquals(WALK, walkState.currentMode()); - // then the speculative renting case + // then the speculative renting case for unknown rental network final State speculativeRenting = states[1]; assertEquals(RENTING_FLOATING, speculativeRenting.getVehicleRentalState()); assertEquals(BICYCLE, speculativeRenting.currentMode()); @@ -280,6 +280,7 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { speculativeRenting.stateData.noRentalDropOffZonesAtStartOfReverseSearch ); + // then the speculative renting cases for specific rental networks final State tierState = states[2]; assertEquals(RENTING_FLOATING, tierState.getVehicleRentalState()); assertEquals(BICYCLE, tierState.currentMode()); From e093dfacc1933b886e676d95cd1c2594223fb5ea Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Wed, 13 Nov 2024 12:21:39 +0200 Subject: [PATCH 068/169] really remove one of the tests which both test the same thing --- .../model/edge/StreetEdgeGeofencingTest.java | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java index 5a09a6d9afe..6c0d0cf0e09 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java @@ -301,56 +301,6 @@ private static StreetSearchRequest defaultArriveByRequest() { .withArriveBy(true) .build(); } - - @Test - public void hslFailTst() { - StreetVertex V5 = intersectionVertex("V5", 1, 1); - StreetVertex V6 = intersectionVertex("V6", 2, 2); - V6.addRentalRestriction(NO_DROP_OFF_TIER); - Edge edge = streetEdge(V5, V6); - var req = hslArriveByRequest(); - var haveRentedState = State - .getInitialStates(Set.of(V6), req) - .stream() - .filter(s -> s.getVehicleRentalState() == HAVE_RENTED) - .findAny() - .get(); - var states = edge.traverse(haveRentedState); - assertEquals(3, states.length); - State stateUnknownNetwork = Arrays - .stream(states) - .filter(s -> s.getVehicleRentalState() == RENTING_FLOATING && s.unknownRentalNetwork()) - .findAny() - .get(); - State stateTierNetwork = Arrays - .stream(states) - .filter(s -> - s.getVehicleRentalState() == RENTING_FLOATING && - s.getVehicleRentalNetwork() == NETWORK_TIER - ) - .findAny() - .get(); - State stateWalk = Arrays - .stream(states) - .filter(s -> s.getVehicleRentalState() == HAVE_RENTED) - .findAny() - .get(); - assertNotNull(stateUnknownNetwork); - assertNotNull(stateTierNetwork); - assertNotNull(stateWalk); - assertEquals(stateWalk.currentMode(), WALK); - } - - private static StreetSearchRequest hslArriveByRequest() { - return StreetSearchRequest - .of() - .withPreferences(p -> - p.withBike(b -> b.withRental(r -> r.withAllowedNetworks(Set.of(NETWORK_TIER)))) - ) - .withMode(StreetMode.BIKE_RENTAL) - .withArriveBy(true) - .build(); - } } private static GeofencingZoneExtension noDropOffRestriction(String networkTier) { From 481c3b8ce4cbf68dcc3b6206ed54331c68e02eae Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Wed, 13 Nov 2024 12:35:18 +0200 Subject: [PATCH 069/169] remove unused imports --- .../street/model/edge/StreetEdgeGeofencingTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java index 6c0d0cf0e09..0fb954c5d46 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java @@ -13,12 +13,10 @@ import static org.opentripplanner.street.search.state.VehicleRentalState.HAVE_RENTED; import static org.opentripplanner.street.search.state.VehicleRentalState.RENTING_FLOATING; -import java.util.Arrays; import java.util.Set; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.opentripplanner.routing.api.request.StreetMode; -import org.opentripplanner.routing.api.request.preference.RoutingPreferences; import org.opentripplanner.service.vehiclerental.model.GeofencingZone; import org.opentripplanner.service.vehiclerental.street.BusinessAreaBorder; import org.opentripplanner.service.vehiclerental.street.GeofencingZoneExtension; From 204624b3d30e33d5b05589b087fbc5292fcb9b64 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 13 Nov 2024 13:12:48 +0100 Subject: [PATCH 070/169] Rename all methods in TransitService according to naming conventions --- .../ext/geocoder/LuceneIndexTest.java | 6 +- .../layers/TestTransitService.java | 2 +- .../opentripplanner/ext/flex/FlexRouter.java | 4 +- .../ext/geocoder/StopClusterMapper.java | 6 +- .../reportapi/model/GraphReportBuilder.java | 6 +- .../ext/reportapi/model/TransfersReport.java | 4 +- .../reportapi/resource/ReportResource.java | 2 +- .../ext/restapi/model/ApiRouterInfo.java | 2 +- .../restapi/model/ApiTravelOptionsMaker.java | 2 +- .../ext/restapi/resources/IndexAPI.java | 40 +++---- .../ext/vectortiles/VectorTilesResource.java | 2 +- .../ext/vectortiles/layers/LayerFilters.java | 2 +- .../areastops/AreaStopPropertyMapper.java | 2 +- .../DigitransitStationPropertyMapper.java | 4 +- .../layers/stations/StationsLayerBuilder.java | 2 +- ...DigitransitRealtimeStopPropertyMapper.java | 2 +- .../stops/DigitransitStopPropertyMapper.java | 4 +- .../apis/gtfs/datafetchers/AgencyImpl.java | 2 +- .../apis/gtfs/datafetchers/AlertImpl.java | 26 ++-- .../apis/gtfs/datafetchers/FeedImpl.java | 2 +- .../apis/gtfs/datafetchers/QueryTypeImpl.java | 37 +++--- .../apis/gtfs/datafetchers/RouteImpl.java | 6 +- .../apis/gtfs/datafetchers/RouteTypeImpl.java | 2 +- .../apis/gtfs/datafetchers/StopImpl.java | 24 ++-- .../apis/gtfs/datafetchers/TripImpl.java | 6 +- .../filter/PatternByDateFilterUtil.java | 2 +- .../transmodel/TransmodelGraphQLSchema.java | 33 +++-- .../model/framework/AuthorityType.java | 2 +- .../model/framework/OperatorType.java | 4 +- .../model/network/GroupOfLinesType.java | 4 +- .../model/network/JourneyPatternType.java | 2 +- .../transmodel/model/network/LineType.java | 40 ++++--- .../model/siri/et/EstimatedCallType.java | 4 +- .../transmodel/model/siri/sx/AffectsType.java | 12 +- .../model/siri/sx/PtSituationElementType.java | 15 +-- .../model/stop/PlaceAtDistanceType.java | 2 +- .../apis/transmodel/model/stop/QuayType.java | 8 +- .../transmodel/model/stop/StopPlaceType.java | 19 ++- .../timetable/DatedServiceJourneyQuery.java | 4 +- .../timetable/DatedServiceJourneyType.java | 2 +- .../model/timetable/ServiceJourneyType.java | 10 +- .../timetable/TimetabledPassingTimeType.java | 2 +- .../GraphInspectorVectorTileResource.java | 2 +- .../PatternConsideringNearbyStopFinder.java | 4 +- .../ScheduledTransitLegReference.java | 10 +- .../routing/TripTimeOnDateHelper.java | 8 +- .../mapping/RaptorPathToItineraryMapper.java | 2 +- .../RouteRequestToFilterChainMapper.java | 2 +- .../raptoradapter/router/TransitRouter.java | 2 +- .../transit/mappers/TransfersMapper.java | 2 +- .../transit/mappers/TransitLayerMapper.java | 4 +- .../alternativelegs/AlternativeLegs.java | 6 +- .../routing/graphfinder/PatternAtStop.java | 4 +- .../PlaceFinderTraverseVisitor.java | 4 +- .../routing/stoptimes/StopTimesHelper.java | 10 +- .../DefaultRealtimeVehicleService.java | 2 +- .../service/DefaultTransitService.java | 113 ++++++++---------- .../transit/service/TransitEditorService.java | 7 ++ .../transit/service/TransitService.java | 94 +++++++-------- .../updater/GtfsRealtimeFuzzyTripMatcher.java | 4 +- .../updater/siri/AddedTripBuilder.java | 4 +- .../updater/siri/EntityResolver.java | 18 ++- .../updater/siri/SiriFuzzyTripMatcher.java | 6 +- .../siri/SiriTimetableSnapshotSource.java | 6 +- .../updater/siri/mapper/AffectsMapper.java | 2 +- .../updater/trip/TimetableSnapshotSource.java | 20 ++-- .../VehiclePositionUpdaterRunnable.java | 6 +- .../apis/gtfs/GraphQLIntegrationTest.java | 4 +- .../model/impl/OtpTransitServiceImplTest.java | 2 +- .../graph/DefaultRoutingServiceTest.java | 18 +-- .../stoptimes/StopTimesHelperTest.java | 4 +- .../service/DefaultTransitServiceTest.java | 12 +- .../transit/speed_test/SpeedTest.java | 4 +- .../siri/SiriTimetableSnapshotSourceTest.java | 28 ++--- .../updater/trip/RealtimeTestEnvironment.java | 10 +- .../trip/TimetableSnapshotSourceTest.java | 6 +- .../trip/moduletests/addition/AddedTest.java | 10 +- .../trip/moduletests/delay/DelayedTest.java | 4 +- .../trip/moduletests/delay/SkippedTest.java | 8 +- 79 files changed, 387 insertions(+), 427 deletions(-) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/geocoder/LuceneIndexTest.java b/application/src/ext-test/java/org/opentripplanner/ext/geocoder/LuceneIndexTest.java index 18d61a3db42..3aee149999b 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/geocoder/LuceneIndexTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/geocoder/LuceneIndexTest.java @@ -135,7 +135,7 @@ static void setup() { .build(); @Override - public List getModesOfStopLocation(StopLocation stop) { + public List findTransitModes(StopLocation stop) { if (stop.getGtfsVehicleType() != null) { return List.of(stop.getGtfsVehicleType()); } else { @@ -144,7 +144,7 @@ public List getModesOfStopLocation(StopLocation stop) { } @Override - public Agency getAgencyForId(FeedScopedId id) { + public Agency getAgency(FeedScopedId id) { if (id.equals(BVG.getId())) { return BVG; } @@ -152,7 +152,7 @@ public Agency getAgencyForId(FeedScopedId id) { } @Override - public Set getRoutesForStop(StopLocation stop) { + public Set findRoutes(StopLocation stop) { return Set.of(TimetableRepositoryForTest.route("route1").withAgency(BVG).build()); } diff --git a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/TestTransitService.java b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/TestTransitService.java index b97cbcdc6fe..37ea737626f 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/TestTransitService.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/vectortiles/layers/TestTransitService.java @@ -15,7 +15,7 @@ public TestTransitService(TimetableRepository timetableRepository) { } @Override - public Set getRoutesForStop(StopLocation stop) { + public Set findRoutes(StopLocation stop) { return Set.of( TimetableRepositoryForTest.route("1").withMode(TransitMode.RAIL).withGtfsType(100).build() ); diff --git a/application/src/ext/java/org/opentripplanner/ext/flex/FlexRouter.java b/application/src/ext/java/org/opentripplanner/ext/flex/FlexRouter.java index 103a27e7554..46d9e527980 100644 --- a/application/src/ext/java/org/opentripplanner/ext/flex/FlexRouter.java +++ b/application/src/ext/java/org/opentripplanner/ext/flex/FlexRouter.java @@ -192,7 +192,7 @@ public TransitStopVertex getStopVertexForStopId(FeedScopedId stopId) { @Override public Collection getTransfersFromStop(StopLocation stop) { - return transitService.getTransfersByStop(stop); + return transitService.findPathTransfers(stop); } @Override @@ -207,7 +207,7 @@ public Collection getTransfersToStop(StopLocation stop) { @Override public boolean isDateActive(FlexServiceDate date, FlexTrip trip) { - int serviceCode = transitService.getServiceCodeForId(trip.getTrip().getServiceId()); + int serviceCode = transitService.getServiceCode(trip.getTrip().getServiceId()); return date.isTripServiceRunning(serviceCode); } } diff --git a/application/src/ext/java/org/opentripplanner/ext/geocoder/StopClusterMapper.java b/application/src/ext/java/org/opentripplanner/ext/geocoder/StopClusterMapper.java index 3a6546cfe1e..daecb7f6a4e 100644 --- a/application/src/ext/java/org/opentripplanner/ext/geocoder/StopClusterMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/geocoder/StopClusterMapper.java @@ -174,7 +174,7 @@ private static Optional map(List stopLocations) } private List agenciesForStopLocation(StopLocation stop) { - return transitService.getRoutesForStop(stop).stream().map(Route::getAgency).distinct().toList(); + return transitService.findRoutes(stop).stream().map(Route::getAgency).distinct().toList(); } private List agenciesForStopLocationsGroup(StopLocationsGroup group) { @@ -190,7 +190,7 @@ StopCluster.Location toLocation(FeedScopedId id) { var loc = transitService.getStopLocation(id); if (loc != null) { var feedPublisher = toFeedPublisher(transitService.getFeedInfo(id.getFeedId())); - var modes = transitService.getModesOfStopLocation(loc).stream().map(Enum::name).toList(); + var modes = transitService.findTransitModes(loc).stream().map(Enum::name).toList(); var agencies = agenciesForStopLocation(loc) .stream() .map(StopClusterMapper::toAgency) @@ -209,7 +209,7 @@ StopCluster.Location toLocation(FeedScopedId id) { var group = transitService.getStopLocationsGroup(id); var feedPublisher = toFeedPublisher(transitService.getFeedInfo(id.getFeedId())); var modes = transitService - .getModesOfStopLocationsGroup(group) + .findTransitModes(group) .stream() .map(Enum::name) .toList(); diff --git a/application/src/ext/java/org/opentripplanner/ext/reportapi/model/GraphReportBuilder.java b/application/src/ext/java/org/opentripplanner/ext/reportapi/model/GraphReportBuilder.java index 7f819c70792..338d425db9a 100644 --- a/application/src/ext/java/org/opentripplanner/ext/reportapi/model/GraphReportBuilder.java +++ b/application/src/ext/java/org/opentripplanner/ext/reportapi/model/GraphReportBuilder.java @@ -41,9 +41,9 @@ public static GraphStats build(OtpServerRequestContext context) { new StreetStats(edgeTypes, vertexTypes), new TransitStats( stopCounts, - transitService.getAllTrips().size(), - transitService.getAllTripPatterns().size(), - transitService.getAllRoutes().size(), + transitService.listTrips().size(), + transitService.listTripPatterns().size(), + transitService.listRoutes().size(), constrainedTransferCounts ) ); diff --git a/application/src/ext/java/org/opentripplanner/ext/reportapi/model/TransfersReport.java b/application/src/ext/java/org/opentripplanner/ext/reportapi/model/TransfersReport.java index cff5d2f791e..e9b5ac8a236 100644 --- a/application/src/ext/java/org/opentripplanner/ext/reportapi/model/TransfersReport.java +++ b/application/src/ext/java/org/opentripplanner/ext/reportapi/model/TransfersReport.java @@ -152,7 +152,7 @@ private TxPoint pointInfo(TransferPoint p, boolean boarding) { if (p instanceof TripTransferPoint tp) { var trip = tp.getTrip(); var route = trip.getRoute(); - var ptn = transitService.getPatternForTrip(trip); + var ptn = transitService.findPattern(trip); r.operator = getName(trip.getOperator()); r.type = "Trip"; r.entityId = trip.getId().getId(); @@ -162,7 +162,7 @@ private TxPoint pointInfo(TransferPoint p, boolean boarding) { addLocation(r, ptn, stop, trip, boarding); } else if (p instanceof RouteStopTransferPoint rp) { var route = rp.getRoute(); - var ptn = transitService.getPatternsForRoute(route).stream().findFirst().orElse(null); + var ptn = transitService.findPatterns(route).stream().findFirst().orElse(null); r.operator = getName(route.getOperator()); r.type = "Route"; r.entityId = route.getId().getId(); diff --git a/application/src/ext/java/org/opentripplanner/ext/reportapi/resource/ReportResource.java b/application/src/ext/java/org/opentripplanner/ext/reportapi/resource/ReportResource.java index e06aec71b53..56a224d3d68 100644 --- a/application/src/ext/java/org/opentripplanner/ext/reportapi/resource/ReportResource.java +++ b/application/src/ext/java/org/opentripplanner/ext/reportapi/resource/ReportResource.java @@ -49,7 +49,7 @@ public String getTransfersAsCsv() { @Produces(MediaType.TEXT_PLAIN) public String getTransitGroupPriorities() { return TransitGroupPriorityReport.build( - transitService.getAllTripPatterns(), + transitService.listTripPatterns(), defaultRequest.journey().transit() ); } diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java index a0bbb1116b3..1500799204e 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java @@ -43,7 +43,7 @@ public ApiRouterInfo( this.buildTime = Date.from(graph.buildTime); this.transitServiceStarts = transitService.getTransitServiceStarts().toEpochSecond(); this.transitServiceEnds = transitService.getTransitServiceEnds().toEpochSecond(); - this.transitModes = ModeMapper.mapToApi(transitService.getTransitModes()); + this.transitModes = ModeMapper.mapToApi(transitService.listTransitModes()); this.envelope = envelope; this.hasBikeSharing = mapHasBikeSharing(vehicleRentalService); this.hasBikePark = mapHasBikePark(vehicleParkingService); diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java index cf424392d70..ce01a4f61a2 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiTravelOptionsMaker.java @@ -33,7 +33,7 @@ public static List makeOptions( ) { var service = graph.getVehicleParkingService(); return makeOptions( - transitService.getTransitModes(), + transitService.listTransitModes(), vehicleRentalService.hasRentalBikes(), service.hasBikeParking(), service.hasCarParking() diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/resources/IndexAPI.java b/application/src/ext/java/org/opentripplanner/ext/restapi/resources/IndexAPI.java index ccf18217148..7dbfabed156 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/resources/IndexAPI.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/resources/IndexAPI.java @@ -93,7 +93,7 @@ public IndexAPI( @GET @Path("/feeds") public Collection getFeeds() { - return transitService().getFeedIds(); + return transitService().listFeedIds(); } @GET @@ -108,7 +108,7 @@ public ApiFeedInfo getFeedInfo(@PathParam("feedId") String feedId) { @Path("/agencies/{feedId}") public Collection getAgencies(@PathParam("feedId") String feedId) { Collection agencies = transitService() - .getAgencies() + .listAgencies() .stream() .filter(agency -> agency.getId().getFeedId().equals(feedId)) .collect(Collectors.toList()); @@ -138,7 +138,7 @@ public Response getAgencyRoutes( var agency = agency(feedId, agencyId); Collection routes = transitService() - .getAllRoutes() + .listRoutes() .stream() .filter(r -> r.getAgency() == agency) .collect(Collectors.toList()); @@ -235,7 +235,7 @@ public List getStopsInRadius( public List getRoutesForStop(@PathParam("stopId") String stopId) { var stop = stop(stopId); return transitService() - .getPatternsForStop(stop) + .findPatterns(stop) .stream() .map(TripPattern::getRoute) .map(RouteMapper::mapToApiShort) @@ -247,7 +247,7 @@ public List getRoutesForStop(@PathParam("stopId") String stopId) public List getPatternsForStop(@PathParam("stopId") String stopId) { var stop = stop(stopId); return transitService() - .getPatternsForStop(stop) + .findPatterns(stop) .stream() .map(TripPatternMapper::mapToApiShort) .collect(Collectors.toList()); @@ -275,7 +275,7 @@ public Collection getStopTimesForStop( : Instant.ofEpochSecond(startTimeSeconds); return transitService() - .stopTimesForStop( + .findStopTimesInPattern( stop(stopIdString), startTime, Duration.ofSeconds(timeRange), @@ -303,7 +303,7 @@ public List getStoptimesForStopAndDate( var stop = stop(stopId); var serviceDate = parseServiceDate("date", date); List stopTimes = transitService() - .getStopTimesForStop( + .findStopTimesInPattern( stop, serviceDate, omitNonPickups ? ArrivalDeparture.DEPARTURES : ArrivalDeparture.BOTH, @@ -322,7 +322,7 @@ public Collection getTransfers(@PathParam("stopId") String stopId) // get the transfers for the stop return transitService() - .getTransfersByStop(stop) + .findPathTransfers(stop) .stream() .map(TransferMapper::mapToApi) .collect(Collectors.toList()); @@ -344,7 +344,7 @@ public Collection getAlertsForStop(@PathParam("stopId") String stopId) @GET @Path("/routes") public List getRoutes(@QueryParam("hasStop") List stopIds) { - Collection routes = transitService().getAllRoutes(); + Collection routes = transitService().listRoutes(); // Filter routes to include only those that pass through all given stops if (stopIds != null) { // Protective copy, we are going to calculate the intersection destructively @@ -352,7 +352,7 @@ public List getRoutes(@QueryParam("hasStop") List stopIds for (String stopId : stopIds) { var stop = stop(stopId); Set routesHere = new HashSet<>(); - for (TripPattern pattern : transitService().getPatternsForStop(stop)) { + for (TripPattern pattern : transitService().findPatterns(stop)) { routesHere.add(pattern.getRoute()); } routes.retainAll(routesHere); @@ -372,7 +372,7 @@ public ApiRoute getRoute(@PathParam("routeId") String routeId) { @GET @Path("/routes/{routeId}/patterns") public List getPatternsForRoute(@PathParam("routeId") String routeId) { - Collection patterns = transitService().getPatternsForRoute(route(routeId)); + Collection patterns = transitService().findPatterns(route(routeId)); return TripPatternMapper.mapToApiShort(patterns); } @@ -383,7 +383,7 @@ public List getStopsForRoute(@PathParam("routeId") String routeId) var route = route(routeId); Set stops = new HashSet<>(); - Collection patterns = transitService().getPatternsForRoute(route); + Collection patterns = transitService().findPatterns(route); for (TripPattern pattern : patterns) { stops.addAll(pattern.getStops()); } @@ -396,7 +396,7 @@ public List getStopsForRoute(@PathParam("routeId") String routeId) public List getTripsForRoute(@PathParam("routeId") String routeId) { var route = route(routeId); - var patterns = transitService().getPatternsForRoute(route); + var patterns = transitService().findPatterns(route); return patterns .stream() .flatMap(TripPattern::scheduledTripsAsStream) @@ -445,7 +445,7 @@ public List getStoptimesForTrip(@PathParam("tripId") String tr var pattern = tripPattern(trip); // Note, we need the updated timetable not the scheduled one (which contains no real-time updates). var table = transitService() - .getTimetableForTripPattern(pattern, LocalDate.now(transitService().getTimeZone())); + .findTimetable(pattern, LocalDate.now(transitService().getTimeZone())); var tripTimesOnDate = TripTimeOnDate.fromTripTimes(table, trip); return TripTimeMapper.mapToApi(tripTimesOnDate); } @@ -472,7 +472,7 @@ public Collection getAlertsForTrip(@PathParam("tripId") String tripId) @GET @Path("/patterns") public List getPatterns() { - Collection patterns = transitService().getAllTripPatterns(); + Collection patterns = transitService().listTripPatterns(); return TripPatternMapper.mapToApiShort(patterns); } @@ -589,7 +589,7 @@ private static NotFoundException notFoundException(String entity, String details } private Agency agency(String feedId, String agencyId) { - var agency = transitService().getAgencyForId(new FeedScopedId(feedId, agencyId)); + var agency = transitService().getAgency(new FeedScopedId(feedId, agencyId)); if (agency == null) { throw notFoundException("Agency", "feedId: " + feedId + ", agencyId: " + agencyId); } @@ -602,18 +602,18 @@ private StopLocation stop(String stopId) { } private Route route(String routeId) { - var route = transitService().getRouteForId(createId("routeId", routeId)); + var route = transitService().getRoute(createId("routeId", routeId)); return validateExist("Route", route, "routeId", routeId); } private Trip trip(String tripId) { - var trip = transitService().getTripForId(createId("tripId", tripId)); + var trip = transitService().getTrip(createId("tripId", tripId)); return validateExist("Trip", trip, "tripId", tripId); } private TripPattern tripPattern(String tripPatternId) { var id = createId("patternId", tripPatternId); - var pattern = transitService().getTripPatternForId(id); + var pattern = transitService().getTripPattern(id); return validateExist("TripPattern", pattern, "patternId", tripPatternId); } @@ -622,7 +622,7 @@ private TripPattern tripPatternForTripId(String tripId) { } private TripPattern tripPattern(Trip trip) { - var pattern = transitService().getPatternForTrip(trip); + var pattern = transitService().findPattern(trip); return validateExist("TripPattern", pattern, "trip", trip.getId()); } diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java index 29701ee2307..58f9f0f9592 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/VectorTilesResource.java @@ -109,7 +109,7 @@ public TileJson getTileJson( private List getFeedInfos() { return serverContext .transitService() - .getFeedIds() + .listFeedIds() .stream() .map(serverContext.transitService()::getFeedInfo) .filter(Predicate.not(Objects::isNull)) diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/LayerFilters.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/LayerFilters.java index 7d63bbe5398..38a27d4b4c4 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/LayerFilters.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/LayerFilters.java @@ -58,7 +58,7 @@ public static Predicate forType(FilterType type, TransitService tra return switch (type) { case NONE -> NO_FILTER; case SUNDAY_TO_SUNDAY_SERVICE_WEEK -> buildCurrentServiceWeekPredicate( - transitService::getPatternsForStop, + transitService::findPatterns, trip -> transitService.getCalendarService().getServiceDatesForServiceId(trip.getServiceId()), () -> LocalDate.now(transitService.getTimeZone()) diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/areastops/AreaStopPropertyMapper.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/areastops/AreaStopPropertyMapper.java index ea6f9225e11..3a5a33103df 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/areastops/AreaStopPropertyMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/areastops/AreaStopPropertyMapper.java @@ -28,7 +28,7 @@ protected AreaStopPropertyMapper( } protected static AreaStopPropertyMapper create(TransitService transitService, Locale locale) { - return new AreaStopPropertyMapper(transitService::getRoutesForStop, locale); + return new AreaStopPropertyMapper(transitService::findRoutes, locale); } @Override diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stations/DigitransitStationPropertyMapper.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stations/DigitransitStationPropertyMapper.java index 18b4a5f388d..6268db83b04 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stations/DigitransitStationPropertyMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stations/DigitransitStationPropertyMapper.java @@ -44,7 +44,7 @@ public Collection map(Station station) { "type", childStops .stream() - .flatMap(stop -> transitService.getPatternsForStop(stop).stream()) + .flatMap(stop -> transitService.findPatterns(stop).stream()) .map(tripPattern -> tripPattern.getMode().name()) .distinct() .collect(Collectors.joining(",")) @@ -60,7 +60,7 @@ public Collection map(Station station) { OBJECT_MAPPER.writeValueAsString( childStops .stream() - .flatMap(stop -> transitService.getRoutesForStop(stop).stream()) + .flatMap(stop -> transitService.findRoutes(stop).stream()) .distinct() .map(route -> { var obj = OBJECT_MAPPER.createObjectNode(); diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stations/StationsLayerBuilder.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stations/StationsLayerBuilder.java index 25959d5ec7a..c157621a740 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stations/StationsLayerBuilder.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stations/StationsLayerBuilder.java @@ -40,7 +40,7 @@ public StationsLayerBuilder( protected List getGeometries(Envelope query) { return transitService - .getStations() + .listStations() .stream() .map(station -> { Coordinate coordinate = station.getCoordinate().asJtsCoordinate(); diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stops/DigitransitRealtimeStopPropertyMapper.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stops/DigitransitRealtimeStopPropertyMapper.java index af2ec7212ec..6fb2783f7cb 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stops/DigitransitRealtimeStopPropertyMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stops/DigitransitRealtimeStopPropertyMapper.java @@ -36,7 +36,7 @@ protected Collection map(RegularStop stop) { var serviceDate = LocalDate.now(transitService.getTimeZone()); boolean stopTimesExist = transitService - .getStopTimesForStop(stop, serviceDate, ArrivalDeparture.BOTH, true) + .findStopTimesInPattern(stop, serviceDate, ArrivalDeparture.BOTH, true) .stream() .anyMatch(stopTime -> stopTime.times.size() > 0); diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stops/DigitransitStopPropertyMapper.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stops/DigitransitStopPropertyMapper.java index edf9c7d8188..0322a2749b4 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stops/DigitransitStopPropertyMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/stops/DigitransitStopPropertyMapper.java @@ -61,7 +61,7 @@ protected static Collection getBaseKeyValues( protected static String getRoutes(TransitService transitService, RegularStop stop) { try { var objects = transitService - .getRoutesForStop(stop) + .findRoutes(stop) .stream() .map(route -> { var routeObject = OBJECT_MAPPER.createObjectNode(); @@ -76,7 +76,7 @@ protected static String getRoutes(TransitService transitService, RegularStop sto } protected static String getType(TransitService transitService, RegularStop stop) { - Collection patternsForStop = transitService.getPatternsForStop(stop); + Collection patternsForStop = transitService.findPatterns(stop); return patternsForStop .stream() diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/AgencyImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/AgencyImpl.java index 8a6d55bb078..d8ed772c9e5 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/AgencyImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/AgencyImpl.java @@ -107,7 +107,7 @@ public DataFetcher url() { private List getRoutes(DataFetchingEnvironment environment) { return getTransitService(environment) - .getAllRoutes() + .listRoutes() .stream() .filter(route -> route.getAgency().equals(getSource(environment))) .collect(Collectors.toList()); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/AlertImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/AlertImpl.java index 4f7a3f61a57..d7d937d52de 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/AlertImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/AlertImpl.java @@ -51,9 +51,7 @@ public DataFetcher agency() { .filter(EntitySelector.Agency.class::isInstance) .findAny() .map(EntitySelector.Agency.class::cast) - .map(entitySelector -> - getTransitService(environment).getAgencyForId(entitySelector.agencyId()) - ) + .map(entitySelector -> getTransitService(environment).getAgency(entitySelector.agencyId())) .orElse(null); } @@ -170,24 +168,24 @@ public DataFetcher> entities() { } if (entitySelector instanceof EntitySelector.Agency) { FeedScopedId id = ((EntitySelector.Agency) entitySelector).agencyId(); - Agency agency = getTransitService(environment).getAgencyForId(id); + Agency agency = getTransitService(environment).getAgency(id); return List.of(getAlertEntityOrUnknown(agency, id.toString(), "agency")); } if (entitySelector instanceof EntitySelector.Route) { FeedScopedId id = ((EntitySelector.Route) entitySelector).routeId(); - Route route = getTransitService(environment).getRouteForId(id); + Route route = getTransitService(environment).getRoute(id); return List.of(getAlertEntityOrUnknown(route, id.toString(), "route")); } if (entitySelector instanceof EntitySelector.Trip) { FeedScopedId id = ((EntitySelector.Trip) entitySelector).tripId(); - Trip trip = getTransitService(environment).getTripForId(id); + Trip trip = getTransitService(environment).getTrip(id); return List.of(getAlertEntityOrUnknown(trip, id.toString(), "trip")); } if (entitySelector instanceof EntitySelector.StopAndRoute stopAndRoute) { FeedScopedId stopId = stopAndRoute.stopId(); FeedScopedId routeId = stopAndRoute.routeId(); StopLocation stop = getTransitService(environment).getRegularStop(stopId); - Route route = getTransitService(environment).getRouteForId(routeId); + Route route = getTransitService(environment).getRoute(routeId); return List.of( stop != null && route != null ? new StopOnRouteModel(stop, route) @@ -205,7 +203,7 @@ public DataFetcher> entities() { FeedScopedId stopId = stopAndTrip.stopId(); FeedScopedId tripId = stopAndTrip.tripId(); StopLocation stop = getTransitService(environment).getRegularStop(stopId); - Trip trip = getTransitService(environment).getTripForId(tripId); + Trip trip = getTransitService(environment).getTrip(tripId); return List.of( stop != null && trip != null ? new StopOnTripModel(stop, trip) @@ -222,7 +220,7 @@ public DataFetcher> entities() { if (entitySelector instanceof EntitySelector.RouteTypeAndAgency) { FeedScopedId agencyId = ((EntitySelector.RouteTypeAndAgency) entitySelector).agencyId(); int routeType = ((EntitySelector.RouteTypeAndAgency) entitySelector).routeType(); - Agency agency = getTransitService(environment).getAgencyForId(agencyId); + Agency agency = getTransitService(environment).getAgency(agencyId); return List.of( agency != null ? new RouteTypeModel(agency, routeType, agency.getId().getFeedId()) @@ -244,10 +242,10 @@ public DataFetcher> entities() { if (entitySelector instanceof EntitySelector.DirectionAndRoute) { Direction direction = ((DirectionAndRoute) entitySelector).direction(); FeedScopedId routeId = ((EntitySelector.DirectionAndRoute) entitySelector).routeId(); - Route route = getTransitService(environment).getRouteForId(routeId); + Route route = getTransitService(environment).getRoute(routeId); return route != null ? getTransitService(environment) - .getPatternsForRoute(route) + .findPatterns(route) .stream() .filter(pattern -> pattern.getDirection() == direction) .collect(Collectors.toList()) @@ -301,9 +299,7 @@ public DataFetcher route() { .filter(entitySelector -> entitySelector instanceof EntitySelector.Route) .findAny() .map(EntitySelector.Route.class::cast) - .map(entitySelector -> - getTransitService(environment).getRouteForId(entitySelector.routeId()) - ) + .map(entitySelector -> getTransitService(environment).getRoute(entitySelector.routeId())) .orElse(null); } @@ -331,7 +327,7 @@ public DataFetcher trip() { .filter(entitySelector -> entitySelector instanceof EntitySelector.Trip) .findAny() .map(EntitySelector.Trip.class::cast) - .map(entitySelector -> getTransitService(environment).getTripForId(entitySelector.tripId())) + .map(entitySelector -> getTransitService(environment).getTrip(entitySelector.tripId())) .orElse(null); } diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/FeedImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/FeedImpl.java index d6488d3f375..3d9458152b5 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/FeedImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/FeedImpl.java @@ -79,7 +79,7 @@ public DataFetcher publisher() { private List getAgencies(DataFetchingEnvironment environment) { String id = getSource(environment); return getTransitService(environment) - .getAgencies() + .listAgencies() .stream() .filter(agency -> agency.getId().getFeedId().equals(id)) .collect(Collectors.toList()); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java index 221df2b8ec6..140fa6da9a5 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java @@ -56,7 +56,6 @@ import org.opentripplanner.routing.graphfinder.PatternAtStop; import org.opentripplanner.routing.graphfinder.PlaceAtDistance; import org.opentripplanner.routing.graphfinder.PlaceType; -import org.opentripplanner.routing.services.TransitAlertService; import org.opentripplanner.routing.vehicle_parking.VehicleParking; import org.opentripplanner.routing.vehicle_parking.VehicleParkingService; import org.opentripplanner.service.vehiclerental.VehicleRentalService; @@ -89,7 +88,7 @@ public class QueryTypeImpl implements GraphQLDataFetchers.GraphQLQueryType { @Override public DataFetcher> agencies() { - return environment -> getTransitService(environment).getAgencies(); + return environment -> getTransitService(environment).listAgencies(); } @Override @@ -99,7 +98,7 @@ public DataFetcher agency() { new GraphQLTypes.GraphQLQueryTypeAgencyArgs(environment.getArguments()).getGraphQLId() ); - return getTransitService(environment).getAgencyForId(id); + return getTransitService(environment).getAgency(id); }; } @@ -264,7 +263,7 @@ public DataFetcher departureRow() { @Override public DataFetcher> feeds() { - return environment -> getTransitService(environment).getFeedIds(); + return environment -> getTransitService(environment).listFeedIds(); } @Override @@ -276,7 +275,7 @@ public DataFetcher fuzzyTrip() { return new GtfsRealtimeFuzzyTripMatcher(transitService) .getTrip( - transitService.getRouteForId(FeedScopedId.parse(args.getGraphQLRoute())), + transitService.getRoute(FeedScopedId.parse(args.getGraphQLRoute())), DIRECTION_MAPPER.map(args.getGraphQLDirection()), args.getGraphQLTime(), ServiceDateUtils.parseString(args.getGraphQLDate()) @@ -393,7 +392,7 @@ public DataFetcher node() { switch (type) { case "Agency": - return transitService.getAgencyForId(FeedScopedId.parse(id)); + return transitService.getAgency(FeedScopedId.parse(id)); case "Alert": return transitService.getTransitAlertService().getAlertById(FeedScopedId.parse(id)); case "BikePark": @@ -431,7 +430,7 @@ public DataFetcher node() { case "DepartureRow": return PatternAtStop.fromId(transitService, id); case "Pattern": - return transitService.getTripPatternForId(FeedScopedId.parse(id)); + return transitService.getTripPattern(FeedScopedId.parse(id)); case "placeAtDistance": { String[] parts = id.split(";"); @@ -450,7 +449,7 @@ public DataFetcher node() { return new PlaceAtDistance(place, Double.parseDouble(parts[0])); } case "Route": - return transitService.getRouteForId(FeedScopedId.parse(id)); + return transitService.getRoute(FeedScopedId.parse(id)); case "Stop": return transitService.getRegularStop(FeedScopedId.parse(id)); case "Stoptime": @@ -467,7 +466,7 @@ public DataFetcher node() { return null; //TODO case "Trip": var scopedId = FeedScopedId.parse(id); - return transitService.getTripForId(scopedId); + return transitService.getTrip(scopedId); case "VehicleParking": var vehicleParkingId = FeedScopedId.parse(id); return vehicleParkingService == null @@ -487,7 +486,7 @@ public DataFetcher node() { public DataFetcher pattern() { return environment -> getTransitService(environment) - .getTripPatternForId( + .getTripPattern( FeedScopedId.parse( new GraphQLTypes.GraphQLQueryTypePatternArgs(environment.getArguments()).getGraphQLId() ) @@ -496,7 +495,7 @@ public DataFetcher pattern() { @Override public DataFetcher> patterns() { - return environment -> getTransitService(environment).getAllTripPatterns(); + return environment -> getTransitService(environment).listTripPatterns(); } @Override @@ -584,7 +583,7 @@ public DataFetcher> rentalVehicles() { public DataFetcher route() { return environment -> getTransitService(environment) - .getRouteForId( + .getRoute( FeedScopedId.parse( new GraphQLTypes.GraphQLQueryTypeRouteArgs(environment.getArguments()).getGraphQLId() ) @@ -603,11 +602,11 @@ public DataFetcher> routes() { .getGraphQLIds() .stream() .map(FeedScopedId::parse) - .map(transitService::getRouteForId) + .map(transitService::getRoute) .toList(); } - Stream routeStream = transitService.getAllRoutes().stream(); + Stream routeStream = transitService.listRoutes().stream(); if (args.getGraphQLFeeds() != null) { List feeds = args.getGraphQLFeeds(); @@ -652,7 +651,7 @@ public DataFetcher serviceTimeRange() { public DataFetcher station() { return environment -> getTransitService(environment) - .getStationById( + .getStation( FeedScopedId.parse( new GraphQLTypes.GraphQLQueryTypeStationArgs(environment.getArguments()).getGraphQLId() ) @@ -671,11 +670,11 @@ public DataFetcher> stations() { .getGraphQLIds() .stream() .map(FeedScopedId::parse) - .map(transitService::getStationById) + .map(transitService::getStation) .collect(Collectors.toList()); } - Stream stationStream = transitService.getStations().stream(); + Stream stationStream = transitService.listStations().stream(); if (args.getGraphQLName() != null) { String name = args.getGraphQLName().toLowerCase(environment.getLocale()); @@ -803,7 +802,7 @@ public DataFetcher> ticketTypes() { public DataFetcher trip() { return environment -> getTransitService(environment) - .getTripForId( + .getTrip( FeedScopedId.parse( new GraphQLTypes.GraphQLQueryTypeTripArgs(environment.getArguments()).getGraphQLId() ) @@ -815,7 +814,7 @@ public DataFetcher> trips() { return environment -> { var args = new GraphQLTypes.GraphQLQueryTypeTripsArgs(environment.getArguments()); - Stream tripStream = getTransitService(environment).getAllTrips().stream(); + Stream tripStream = getTransitService(environment).listTrips().stream(); if (args.getGraphQLFeeds() != null) { List feeds = args.getGraphQLFeeds(); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RouteImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RouteImpl.java index ae6acb0a297..9b98b71bd79 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RouteImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RouteImpl.java @@ -178,7 +178,7 @@ public DataFetcher mode() { public DataFetcher> patterns() { return environment -> { final TransitService transitService = getTransitService(environment); - var patterns = transitService.getPatternsForRoute(getSource(environment)); + var patterns = transitService.findPatterns(getSource(environment)); var args = new GraphQLTypes.GraphQLRoutePatternsArgs(environment.getArguments()); @@ -231,7 +231,7 @@ public DataFetcher url() { private Iterable getStops(DataFetchingEnvironment environment) { return getTransitService(environment) - .getPatternsForRoute(getSource(environment)) + .findPatterns(getSource(environment)) .stream() .map(TripPattern::getStops) .flatMap(Collection::stream) @@ -240,7 +240,7 @@ private Iterable getStops(DataFetchingEnvironment environment) { private Iterable getTrips(DataFetchingEnvironment environment) { return getTransitService(environment) - .getPatternsForRoute(getSource(environment)) + .findPatterns(getSource(environment)) .stream() .flatMap(TripPattern::scheduledTripsAsStream) .collect(Collectors.toSet()); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RouteTypeImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RouteTypeImpl.java index bd8b9a7e019..108b4bd2bc0 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RouteTypeImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RouteTypeImpl.java @@ -27,7 +27,7 @@ public DataFetcher> routes() { return environment -> { Agency agency = getSource(environment).getAgency(); return getTransitService(environment) - .getAllRoutes() + .listRoutes() .stream() .filter(route -> route.getId().getFeedId().equals(getSource(environment).getFeedId()) && diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/StopImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/StopImpl.java index 2d17326a0ef..5a2e6f29204 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/StopImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/StopImpl.java @@ -270,7 +270,7 @@ public DataFetcher> stopTimesForPattern() { GraphQLTypes.GraphQLStopStopTimesForPatternArgs args = new GraphQLTypes.GraphQLStopStopTimesForPatternArgs( environment.getArguments() ); - TripPattern pattern = transitService.getTripPatternForId( + TripPattern pattern = transitService.getTripPattern( FeedScopedId.parse(args.getGraphQLId()) ); @@ -287,7 +287,7 @@ public DataFetcher> stopTimesForPattern() { ); } - return transitService.stopTimesForPatternAtStop( + return transitService.findTripTimeOnDate( stop, pattern, GraphQLUtils.getTimeOrNow(args.getGraphQLStartTime()), @@ -318,7 +318,7 @@ public DataFetcher> stoptimesForPatterns() { var args = new GraphQLTypes.GraphQLStopStoptimesForPatternsArgs(environment.getArguments()); Function> stopTFunction = stop -> - transitService.stopTimesForStop( + transitService.findStopTimesInPattern( stop, GraphQLUtils.getTimeOrNow(args.getGraphQLStartTime()), Duration.ofSeconds(args.getGraphQLTimeRange()), @@ -356,7 +356,7 @@ public DataFetcher> stoptimesForServiceDate() { } Function> stopTFunction = stop -> - transitService.getStopTimesForStop( + transitService.findStopTimesInPattern( stop, date, args.getGraphQLOmitNonPickups() ? ArrivalDeparture.DEPARTURES : ArrivalDeparture.BOTH, @@ -385,7 +385,7 @@ public DataFetcher> stoptimesWithoutPatterns() { Function> stopTFunction = stop -> transitService - .stopTimesForStop( + .findStopTimesInPattern( stop, GraphQLUtils.getTimeOrNow(args.getGraphQLStartTime()), Duration.ofSeconds(args.getGraphQLTimeRange()), @@ -431,7 +431,7 @@ public DataFetcher> transfers() { .getGraphQLMaxDistance(); return getTransitService(environment) - .getTransfersByStop(stop) + .findPathTransfers(stop) .stream() .filter(transfer -> maxDistance == null || transfer.getDistanceMeters() < maxDistance) .filter(transfer -> transfer.to instanceof RegularStop) @@ -452,14 +452,14 @@ public DataFetcher vehicleMode() { environment, stop -> transitService - .getModesOfStopLocation(stop) + .findTransitModes(stop) .stream() .findFirst() .map(Enum::toString) .orElse(null), station -> transitService - .getModesOfStopLocationsGroup(station) + .findTransitModes(station) .stream() .findFirst() .map(Enum::toString) @@ -495,7 +495,7 @@ public DataFetcher zoneId() { private Collection getPatterns(DataFetchingEnvironment environment) { return getValue( environment, - stop -> getTransitService(environment).getPatternsForStop(stop, true), + stop -> getTransitService(environment).findPatterns(stop, true), station -> null ); } @@ -503,7 +503,7 @@ private Collection getPatterns(DataFetchingEnvironment environment) private Collection getRoutes(DataFetchingEnvironment environment) { return getValue( environment, - stop -> getTransitService(environment).getRoutesForStop(stop), + stop -> getTransitService(environment).findRoutes(stop), station -> null ); } @@ -531,7 +531,7 @@ private List getTripTimeOnDatesForPatternAtStopIncludingTripsWit ) .flatMap(tripPattern -> transitService - .stopTimesForPatternAtStop( + .findTripTimeOnDate( stop, tripPattern, startTime, @@ -562,7 +562,7 @@ private Stream getRealtimeAddedPatternsAsStream( ) { return originalPattern .scheduledTripsAsStream() - .map(trip -> transitService.getNewTripPatternForModifiedTrip(trip.getId(), date)) + .map(trip -> transitService.findNewTripPatternForModifiedTrip(trip.getId(), date)) .filter(tripPattern -> tripPattern != null && tripPattern.isModifiedFromTripPatternWithEqualStops(originalPattern) ); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/TripImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/TripImpl.java index 956b35309e2..8eca58b69e0 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/TripImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/TripImpl.java @@ -325,14 +325,14 @@ public DataFetcher> stoptimesForDate() { ? ServiceDateUtils.parseString(args.getGraphQLServiceDate()) : LocalDate.now(timeZone); - TripPattern tripPattern = transitService.getPatternForTrip(trip, serviceDate); + TripPattern tripPattern = transitService.findPattern(trip, serviceDate); // no matching pattern found if (tripPattern == null) { return List.of(); } Instant midnight = ServiceDateUtils.asStartOfService(serviceDate, timeZone).toInstant(); - Timetable timetable = transitService.getTimetableForTripPattern(tripPattern, serviceDate); + Timetable timetable = transitService.findTimetable(tripPattern, serviceDate); return TripTimeOnDate.fromTripTimes(timetable, trip, serviceDate, midnight); } catch (ParseException e) { return null; // Invalid date format @@ -397,7 +397,7 @@ private Route getRoute(DataFetchingEnvironment environment) { } private TripPattern getTripPattern(DataFetchingEnvironment environment) { - return getTransitService(environment).getPatternForTrip(environment.getSource()); + return getTransitService(environment).findPattern(environment.getSource()); } private TransitService getTransitService(DataFetchingEnvironment environment) { diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/support/filter/PatternByDateFilterUtil.java b/application/src/main/java/org/opentripplanner/apis/gtfs/support/filter/PatternByDateFilterUtil.java index f3c0d6d0352..c0640aec2b9 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/support/filter/PatternByDateFilterUtil.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/support/filter/PatternByDateFilterUtil.java @@ -16,7 +16,7 @@ public static PatternByServiceDatesFilter ofGraphQL( ) { return new PatternByServiceDatesFilter( new LocalDateRange(range.getGraphQLStart(), range.getGraphQLEnd()), - transitService::getPatternsForRoute, + transitService::findPatterns, trip -> transitService.getCalendarService().getServiceDatesForServiceId(trip.getServiceId()) ); } diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java b/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java index 2ffb9941bc6..b2876c384d9 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java @@ -467,13 +467,10 @@ private GraphQLSchema create() { } TransitService transitService = GqlUtil.getTransitService(env); return transitService - .getStations() + .listStations() .stream() .map(station -> - new MonoOrMultiModalStation( - station, - transitService.getMultiModalStationForStation(station) - ) + new MonoOrMultiModalStation(station, transitService.findMultiModalStation(station)) ) .collect(Collectors.toList()); }) @@ -697,7 +694,7 @@ private GraphQLSchema create() { boolean filterByInUse = TRUE.equals(environment.getArgument("filterByInUse")); boolean inUse = !GqlUtil .getTransitService(environment) - .getPatternsForStop(stop, true) + .findPatterns(stop, true) .isEmpty(); return !filterByInUse || inUse; }) @@ -965,7 +962,7 @@ private GraphQLSchema create() { if (placeAtDistance.place() instanceof StopLocation stop) { return !GqlUtil .getTransitService(environment) - .getPatternsForStop(stop, true) + .findPatterns(stop, true) .isEmpty(); } else { return true; @@ -1012,7 +1009,7 @@ private GraphQLSchema create() { .dataFetcher(environment -> { return GqlUtil .getTransitService(environment) - .getAgencyForId(TransitIdMapper.mapIDToDomain(environment.getArgument("id"))); + .getAgency(TransitIdMapper.mapIDToDomain(environment.getArgument("id"))); }) .build() ) @@ -1024,7 +1021,7 @@ private GraphQLSchema create() { .withDirective(TransmodelDirectives.TIMING_DATA) .type(new GraphQLNonNull(new GraphQLList(authorityType))) .dataFetcher(environment -> { - return new ArrayList<>(GqlUtil.getTransitService(environment).getAgencies()); + return new ArrayList<>(GqlUtil.getTransitService(environment).listAgencies()); }) .build() ) @@ -1045,7 +1042,7 @@ private GraphQLSchema create() { .dataFetcher(environment -> GqlUtil .getTransitService(environment) - .getOperatorForId(TransitIdMapper.mapIDToDomain(environment.getArgument("id"))) + .getOperator(TransitIdMapper.mapIDToDomain(environment.getArgument("id"))) ) .build() ) @@ -1057,7 +1054,7 @@ private GraphQLSchema create() { .withDirective(TransmodelDirectives.TIMING_DATA) .type(new GraphQLNonNull(new GraphQLList(operatorType))) .dataFetcher(environment -> { - return new ArrayList<>(GqlUtil.getTransitService(environment).getAllOperators()); + return new ArrayList<>(GqlUtil.getTransitService(environment).listOperators()); }) .build() ) @@ -1082,7 +1079,7 @@ private GraphQLSchema create() { } return GqlUtil .getTransitService(environment) - .getRouteForId(TransitIdMapper.mapIDToDomain(id)); + .getRoute(TransitIdMapper.mapIDToDomain(id)); }) .build() ) @@ -1154,11 +1151,11 @@ private GraphQLSchema create() { return ((List) environment.getArgument("ids")).stream() .map(TransitIdMapper::mapIDToDomain) .map(id -> { - return GqlUtil.getTransitService(environment).getRouteForId(id); + return GqlUtil.getTransitService(environment).getRoute(id); }) .collect(Collectors.toList()); } - Stream stream = GqlUtil.getTransitService(environment).getAllRoutes().stream(); + Stream stream = GqlUtil.getTransitService(environment).listRoutes().stream(); if ((boolean) environment.getArgument("flexibleOnly")) { Collection flexRoutes = GqlUtil @@ -1226,7 +1223,7 @@ private GraphQLSchema create() { .dataFetcher(environment -> GqlUtil .getTransitService(environment) - .getGroupOfRoutesForId(TransitIdMapper.mapIDToDomain(environment.getArgument("id"))) + .getGroupOfRoutes(TransitIdMapper.mapIDToDomain(environment.getArgument("id"))) ) .build() ) @@ -1236,7 +1233,7 @@ private GraphQLSchema create() { .name("groupsOfLines") .description("Get all groups of lines") .type(new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(groupOfLinesType)))) - .dataFetcher(environment -> GqlUtil.getTransitService(environment).getGroupsOfRoutes()) + .dataFetcher(environment -> GqlUtil.getTransitService(environment).listGroupsOfRoutes()) .build() ) .field( @@ -1256,7 +1253,7 @@ private GraphQLSchema create() { .dataFetcher(environment -> { return GqlUtil .getTransitService(environment) - .getTripForId(TransitIdMapper.mapIDToDomain(environment.getArgument("id"))); + .getTrip(TransitIdMapper.mapIDToDomain(environment.getArgument("id"))); }) .build() ) @@ -1313,7 +1310,7 @@ private GraphQLSchema create() { List authorities = environment.getArgumentOrDefault("authorities", List.of()); TransitService transitService = GqlUtil.getTransitService(environment); return transitService - .getAllTrips() + .listTrips() .stream() .filter(t -> lineIds.isEmpty() || lineIds.contains(t.getRoute().getId())) .filter(t -> diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/framework/AuthorityType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/framework/AuthorityType.java index baae947e345..d18b4da554f 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/framework/AuthorityType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/framework/AuthorityType.java @@ -68,7 +68,7 @@ public static GraphQLObjectType create( .type(new GraphQLNonNull(new GraphQLList(lineType))) .dataFetcher(environment -> getTransitService(environment) - .getAllRoutes() + .listRoutes() .stream() .filter(route -> Objects.equals(route.getAgency(), environment.getSource())) .collect(Collectors.toList()) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/framework/OperatorType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/framework/OperatorType.java index 8f55bea52ab..de58643f5dc 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/framework/OperatorType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/framework/OperatorType.java @@ -52,7 +52,7 @@ public static GraphQLObjectType create( .dataFetcher(environment -> GqlUtil .getTransitService(environment) - .getAllRoutes() + .listRoutes() .stream() .filter(route -> Objects.equals(route.getOperator(), environment.getSource())) .collect(Collectors.toList()) @@ -68,7 +68,7 @@ public static GraphQLObjectType create( .dataFetcher(environment -> GqlUtil .getTransitService(environment) - .getAllTrips() + .listTrips() .stream() .filter(trip -> Objects.equals(trip.getOperator(), environment.getSource())) .collect(Collectors.toList()) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/GroupOfLinesType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/GroupOfLinesType.java index 0339269dbd8..edd69e20853 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/GroupOfLinesType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/GroupOfLinesType.java @@ -70,9 +70,7 @@ public static GraphQLObjectType create() { .name("lines") .description("All lines part of this group of lines") .type(new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(LineType.REF)))) - .dataFetcher(env -> - GqlUtil.getTransitService(env).getRoutesForGroupOfRoutes(env.getSource()) - ) + .dataFetcher(env -> GqlUtil.getTransitService(env).findGroupsOfRoutes(env.getSource())) .build() ) .build(); diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/JourneyPatternType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/JourneyPatternType.java index 4ed3871ff8c..dfde7427e5f 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/JourneyPatternType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/JourneyPatternType.java @@ -166,7 +166,7 @@ public static GraphQLObjectType create( .type(new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(noticeType)))) .dataFetcher(environment -> { TripPattern tripPattern = environment.getSource(); - return GqlUtil.getTransitService(environment).getNoticesByEntity(tripPattern); + return GqlUtil.getTransitService(environment).findNotices(tripPattern); }) .build() ) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/LineType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/LineType.java index 32ea357a0aa..9aa129b2abd 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/LineType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/LineType.java @@ -46,7 +46,7 @@ public static GraphQLObjectType create( .newFieldDefinition() .name("id") .type(new GraphQLNonNull(Scalars.GraphQLID)) - .dataFetcher(environment -> TransitIdMapper.mapEntityIDToApi(environment.getSource())) + .dataFetcher(environment -> TransitIdMapper.mapEntityIDToApi(getSource(environment))) .build() ) .field( @@ -54,7 +54,7 @@ public static GraphQLObjectType create( .newFieldDefinition() .name("authority") .type(authorityType) - .dataFetcher(environment -> (((Route) environment.getSource()).getAgency())) + .dataFetcher(environment -> (getSource(environment).getAgency())) .build() ) .field( @@ -62,7 +62,7 @@ public static GraphQLObjectType create( .newFieldDefinition() .name("operator") .type(operatorType) - .dataFetcher(environment -> (((Route) environment.getSource()).getOperator())) + .dataFetcher(environment -> ((getSource(environment)).getOperator())) .build() ) .field( @@ -70,7 +70,7 @@ public static GraphQLObjectType create( .newFieldDefinition() .name("branding") .type(brandingType) - .dataFetcher(environment -> ((Route) environment.getSource()).getBranding()) + .dataFetcher(environment -> (getSource(environment)).getBranding()) ) .field( GraphQLFieldDefinition @@ -80,7 +80,7 @@ public static GraphQLObjectType create( .description( "Publicly announced code for line, differentiating it from other lines for the same operator." ) - .dataFetcher(environment -> (((Route) environment.getSource()).getShortName())) + .dataFetcher(environment -> ((getSource(environment)).getShortName())) .build() ) .field( @@ -88,7 +88,7 @@ public static GraphQLObjectType create( .newFieldDefinition() .name("name") .type(Scalars.GraphQLString) - .dataFetcher(environment -> ((Route) environment.getSource()).getLongName()) + .dataFetcher(environment -> (getSource(environment)).getLongName()) .build() ) .field( @@ -96,7 +96,7 @@ public static GraphQLObjectType create( .newFieldDefinition() .name("transportMode") .type(EnumTypes.TRANSPORT_MODE) - .dataFetcher(environment -> ((Route) environment.getSource()).getMode()) + .dataFetcher(environment -> (getSource(environment)).getMode()) .build() ) .field( @@ -105,9 +105,7 @@ public static GraphQLObjectType create( .name("transportSubmode") .type(EnumTypes.TRANSPORT_SUBMODE) .dataFetcher(environment -> - TransmodelTransportSubmode.fromValue( - ((Route) environment.getSource()).getNetexSubmode() - ) + TransmodelTransportSubmode.fromValue((getSource(environment)).getNetexSubmode()) ) .build() ) @@ -116,7 +114,7 @@ public static GraphQLObjectType create( .newFieldDefinition() .name("description") .type(Scalars.GraphQLString) - .dataFetcher(environment -> ((Route) environment.getSource()).getDescription()) + .dataFetcher(environment -> (getSource(environment)).getDescription()) .build() ) .field( @@ -143,7 +141,7 @@ public static GraphQLObjectType create( .name("journeyPatterns") .type(new GraphQLList(journeyPatternType)) .dataFetcher(environment -> - GqlUtil.getTransitService(environment).getPatternsForRoute(environment.getSource()) + GqlUtil.getTransitService(environment).findPatterns(getSource(environment)) ) .build() ) @@ -155,7 +153,7 @@ public static GraphQLObjectType create( .dataFetcher(environment -> GqlUtil .getTransitService(environment) - .getPatternsForRoute(environment.getSource()) + .findPatterns(getSource(environment)) .stream() .map(TripPattern::getStops) .flatMap(Collection::stream) @@ -172,7 +170,7 @@ public static GraphQLObjectType create( .dataFetcher(environment -> GqlUtil .getTransitService(environment) - .getPatternsForRoute(environment.getSource()) + .findPatterns(getSource(environment)) .stream() .flatMap(TripPattern::scheduledTripsAsStream) .distinct() @@ -186,8 +184,8 @@ public static GraphQLObjectType create( .name("notices") .type(new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(noticeType)))) .dataFetcher(environment -> { - Route route = environment.getSource(); - return GqlUtil.getTransitService(environment).getNoticesByEntity(route); + Route route = getSource(environment); + return GqlUtil.getTransitService(environment).findNotices(route); }) .build() ) @@ -201,7 +199,7 @@ public static GraphQLObjectType create( GqlUtil .getTransitService(environment) .getTransitAlertService() - .getRouteAlerts(((Route) environment.getSource()).getId()) + .getRouteAlerts((getSource(environment)).getId()) ) .build() ) @@ -211,7 +209,7 @@ public static GraphQLObjectType create( .name("flexibleLineType") .description("Type of flexible line, or null if line is not flexible.") .type(Scalars.GraphQLString) - .dataFetcher(environment -> ((Route) environment.getSource()).getFlexibleLineType()) + .dataFetcher(environment -> (getSource(environment)).getFlexibleLineType()) .build() ) .field( @@ -232,9 +230,13 @@ public static GraphQLObjectType create( .name("groupOfLines") .description("Groups of lines that line is a part of.") .type(new GraphQLNonNull(new GraphQLList(groupOfLinesType))) - .dataFetcher(environment -> ((Route) environment.getSource()).getGroupsOfRoutes()) + .dataFetcher(environment -> (getSource(environment)).getGroupsOfRoutes()) .build() ) .build(); } + + private static Route getSource(DataFetchingEnvironment environment) { + return environment.getSource(); + } } diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/et/EstimatedCallType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/et/EstimatedCallType.java index a0a904a0ae0..64ceb9dde2d 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/et/EstimatedCallType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/et/EstimatedCallType.java @@ -295,7 +295,7 @@ public static GraphQLObjectType create( .dataFetcher(environment -> GqlUtil .getTransitService(environment) - .getTripOnServiceDateForTripAndDay( + .findTripOnServiceDate( new TripIdAndServiceDate( environment.getSource().getTrip().getId(), environment.getSource().getServiceDay() @@ -321,7 +321,7 @@ public static GraphQLObjectType create( TripTimeOnDate tripTimeOnDate = environment.getSource(); return GqlUtil .getTransitService(environment) - .getNoticesByEntity(tripTimeOnDate.getStopTimeKey()); + .findNotices(tripTimeOnDate.getStopTimeKey()); }) .build() ) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/AffectsType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/AffectsType.java index 58bf9d3f958..319df8988e3 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/AffectsType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/AffectsType.java @@ -72,7 +72,7 @@ public static GraphQLOutputType create( .type(lineType) .dataFetcher(environment -> { var routeId = environment.getSource().routeId(); - return GqlUtil.getTransitService(environment).getRouteForId(routeId); + return GqlUtil.getTransitService(environment).getRoute(routeId); }) .build() ) @@ -88,7 +88,7 @@ public static GraphQLOutputType create( .type(serviceJourneyType) .dataFetcher(environment -> { var tripId = environment.getSource().tripId(); - return GqlUtil.getTransitService(environment).getTripForId(tripId); + return GqlUtil.getTransitService(environment).getTrip(tripId); }) .build() ) @@ -109,7 +109,7 @@ public static GraphQLOutputType create( EntitySelector.Trip entitySelector = environment.getSource(); return GqlUtil .getTransitService(environment) - .getTripOnServiceDateForTripAndDay( + .findTripOnServiceDate( new TripIdAndServiceDate(entitySelector.tripId(), entitySelector.serviceDate()) ); }) @@ -149,7 +149,7 @@ public static GraphQLOutputType create( .type(lineType) .dataFetcher(environment -> { var routeId = environment.getSource().routeId(); - return GqlUtil.getTransitService(environment).getRouteForId(routeId); + return GqlUtil.getTransitService(environment).getRoute(routeId); }) .build() ) @@ -196,7 +196,7 @@ public static GraphQLOutputType create( .type(serviceJourneyType) .dataFetcher(environment -> { var tripId = environment.getSource().tripId(); - return GqlUtil.getTransitService(environment).getTripForId(tripId); + return GqlUtil.getTransitService(environment).getTrip(tripId); }) .build() ) @@ -219,7 +219,7 @@ public static GraphQLOutputType create( EntitySelector.StopAndTrip entitySelector = environment.getSource(); return GqlUtil .getTransitService(environment) - .getTripOnServiceDateForTripAndDay( + .findTripOnServiceDate( new TripIdAndServiceDate(entitySelector.tripId(), entitySelector.serviceDate()) ); }) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/PtSituationElementType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/PtSituationElementType.java index 4fd9505b73e..4d8e4ed6390 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/PtSituationElementType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/PtSituationElementType.java @@ -69,7 +69,7 @@ public static GraphQLObjectType create( .dataFetcher(environment -> GqlUtil .getTransitService(environment) - .getAgencyForId( + .getAgency( ((TransitAlert) environment.getSource()).entities() .stream() .filter(EntitySelector.Agency.class::isInstance) @@ -94,7 +94,7 @@ public static GraphQLObjectType create( .filter(EntitySelector.Route.class::isInstance) .map(EntitySelector.Route.class::cast) .map(EntitySelector.Route::routeId) - .map(transitService::getRouteForId) + .map(transitService::getRoute) .collect(Collectors.toList()); }) .build() @@ -112,7 +112,7 @@ public static GraphQLObjectType create( .filter(EntitySelector.Trip.class::isInstance) .map(EntitySelector.Trip.class::cast) .map(EntitySelector.Trip::tripId) - .map(transitService::getTripForId) + .map(transitService::getTrip) .collect(Collectors.toList()); }) .build() @@ -149,13 +149,10 @@ public static GraphQLObjectType create( .filter(EntitySelector.Stop.class::isInstance) .map(EntitySelector.Stop.class::cast) .map(EntitySelector.Stop::stopId) - .map(transitService::getStationById) + .map(transitService::getStation) .filter(Objects::nonNull) .map(station -> - new MonoOrMultiModalStation( - station, - transitService.getMultiModalStationForStation(station) - ) + new MonoOrMultiModalStation(station, transitService.findMultiModalStation(station)) ) .toList(); }) @@ -361,7 +358,7 @@ public static GraphQLObjectType create( } return GqlUtil .getTransitService(environment) - .getAgencies() + .listAgencies() .stream() .filter(agency -> agency.getId().getFeedId().equals(feedId)) .filter(agency -> agency.getId().getId().startsWith(codespace)) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/PlaceAtDistanceType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/PlaceAtDistanceType.java index 809164e9cd2..882c1491bb7 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/PlaceAtDistanceType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/PlaceAtDistanceType.java @@ -119,7 +119,7 @@ private static Stream getStopPlaces( List res = new ArrayList<>(); - MultiModalStation multiModalStation = transitService.getMultiModalStationForStation(stopPlace); + MultiModalStation multiModalStation = transitService.findMultiModalStation(stopPlace); if ( "child".equals(multiModalMode) || "all".equals(multiModalMode) || multiModalStation == null diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/QuayType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/QuayType.java index e12775936bd..bea8f5de6bf 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/QuayType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/QuayType.java @@ -124,7 +124,7 @@ public static GraphQLObjectType create( if (station != null) { return new MonoOrMultiModalStation( station, - GqlUtil.getTransitService(env).getMultiModalStationForStation(station) + GqlUtil.getTransitService(env).findMultiModalStation(station) ); } else { return null; @@ -177,7 +177,7 @@ public static GraphQLObjectType create( .dataFetcher(env -> GqlUtil .getTransitService(env) - .getPatternsForStop(env.getSource(), true) + .findPatterns(env.getSource(), true) .stream() .map(TripPattern::getRoute) .distinct() @@ -192,9 +192,7 @@ public static GraphQLObjectType create( .withDirective(TransmodelDirectives.TIMING_DATA) .description("List of journey patterns servicing this quay") .type(new GraphQLNonNull(new GraphQLList(journeyPatternType))) - .dataFetcher(env -> - GqlUtil.getTransitService(env).getPatternsForStop(env.getSource(), true) - ) + .dataFetcher(env -> GqlUtil.getTransitService(env).findPatterns(env.getSource(), true)) .build() ) .field( diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/StopPlaceType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/StopPlaceType.java index 00ac5b0e11b..21739ecb2c1 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/StopPlaceType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/stop/StopPlaceType.java @@ -250,7 +250,7 @@ public static GraphQLObjectType create( .filter(stop -> { return !GqlUtil .getTransitService(environment) - .getPatternsForStop(stop, true) + .findPatterns(stop, true) .isEmpty(); }) .collect(Collectors.toList()); @@ -449,7 +449,7 @@ public static Stream getTripTimesForStop( ) { TransitService transitService = GqlUtil.getTransitService(environment); - List stopTimesInPatterns = transitService.stopTimesForStop( + List stopTimesInPatterns = transitService.findStopTimesInPattern( stop, startTimeSeconds, timeRange, @@ -514,13 +514,10 @@ public static MonoOrMultiModalStation fetchStopPlaceById( TransitService transitService = GqlUtil.getTransitService(environment); - Station station = transitService.getStationById(id); + Station station = transitService.getStation(id); if (station != null) { - return new MonoOrMultiModalStation( - station, - transitService.getMultiModalStationForStation(station) - ); + return new MonoOrMultiModalStation(station, transitService.findMultiModalStation(station)); } MultiModalStation multiModalStation = transitService.getMultiModalStation(id); @@ -568,7 +565,7 @@ public static Collection fetchStopPlaces( if ("child".equals(multiModalMode)) { return stations .map(s -> { - MultiModalStation parent = transitService.getMultiModalStationForStation(s); + MultiModalStation parent = transitService.findMultiModalStation(s); return new MonoOrMultiModalStation(s, parent); }) .collect(Collectors.toList()); @@ -577,7 +574,7 @@ public static Collection fetchStopPlaces( else if ("all".equals(multiModalMode)) { Set result = new HashSet<>(); stations.forEach(it -> { - MultiModalStation p = transitService.getMultiModalStationForStation(it); + MultiModalStation p = transitService.findMultiModalStation(it); result.add(new MonoOrMultiModalStation(it, p)); if (p != null) { result.add(new MonoOrMultiModalStation(p)); @@ -590,7 +587,7 @@ else if ("all".equals(multiModalMode)) { else if ("parent".equals(multiModalMode)) { Set result = new HashSet<>(); stations.forEach(it -> { - MultiModalStation p = transitService.getMultiModalStationForStation(it); + MultiModalStation p = transitService.findMultiModalStation(it); if (p != null) { result.add(new MonoOrMultiModalStation(p)); } else { @@ -608,7 +605,7 @@ public static boolean isStopPlaceInUse( TransitService transitService ) { for (var quay : station.getChildStops()) { - if (!transitService.getPatternsForStop(quay, true).isEmpty()) { + if (!transitService.findPatterns(quay, true).isEmpty()) { return true; } } diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java index aef659901e4..2d95c1fce17 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java @@ -34,7 +34,7 @@ public static GraphQLFieldDefinition createGetById(GraphQLOutputType datedServic .dataFetcher(environment -> { FeedScopedId id = TransitIdMapper.mapIDToDomain(environment.getArgument("id")); - return GqlUtil.getTransitService(environment).getTripOnServiceDateById(id); + return GqlUtil.getTransitService(environment).findTripOnServiceDate(id); }) .build(); } @@ -120,7 +120,7 @@ public static GraphQLFieldDefinition createQuery(GraphQLOutputType datedServiceJ return GqlUtil .getTransitService(environment) - .getTripOnServiceDates(tripOnServiceDateRequestBuilder.build()); + .findTripsOnServiceDate(tripOnServiceDateRequestBuilder.build()); }) .build(); } diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyType.java index 7fcce88c4ee..25d30f352e8 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyType.java @@ -164,7 +164,7 @@ public static GraphQLObjectType create( private static TripPattern tripPattern(DataFetchingEnvironment env) { TransitService transitService = GqlUtil.getTransitService(env); TripOnServiceDate tripOnServiceDate = tripOnServiceDate(env); - return transitService.getPatternForTrip( + return transitService.findPattern( tripOnServiceDate.getTrip(), tripOnServiceDate.getServiceDate() ); diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/ServiceJourneyType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/ServiceJourneyType.java index e61d0a12edc..952af13c2fa 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/ServiceJourneyType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/ServiceJourneyType.java @@ -175,7 +175,7 @@ public static GraphQLObjectType create( "ServiceJourney is not included in the scheduled data, null is returned." ) .type(journeyPatternType) - .dataFetcher(env -> GqlUtil.getTransitService(env).getPatternForTrip(trip(env))) + .dataFetcher(env -> GqlUtil.getTransitService(env).findPattern(trip(env))) .build() ) .field( @@ -208,7 +208,7 @@ public static GraphQLObjectType create( Integer last = environment.getArgument("last"); TransitService transitService = GqlUtil.getTransitService(environment); - TripPattern tripPattern = transitService.getPatternForTrip(trip(environment)); + TripPattern tripPattern = transitService.findPattern(trip(environment)); if (tripPattern == null) { return List.of(); @@ -242,7 +242,7 @@ public static GraphQLObjectType create( ) .dataFetcher(env -> { Trip trip = trip(env); - TripPattern tripPattern = GqlUtil.getTransitService(env).getPatternForTrip(trip); + TripPattern tripPattern = GqlUtil.getTransitService(env).findPattern(trip); if (tripPattern == null) { return List.of(); } @@ -293,7 +293,7 @@ public static GraphQLObjectType create( .dataFetcher(environment -> { TripPattern tripPattern = GqlUtil .getTransitService(environment) - .getPatternForTrip(trip(environment)); + .findPattern(trip(environment)); if (tripPattern == null) { return null; } @@ -312,7 +312,7 @@ public static GraphQLObjectType create( .newFieldDefinition() .name("notices") .type(new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(noticeType)))) - .dataFetcher(env -> GqlUtil.getTransitService(env).getNoticesByEntity(trip(env))) + .dataFetcher(env -> GqlUtil.getTransitService(env).findNotices(trip(env))) .build() ) .field( diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/TimetabledPassingTimeType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/TimetabledPassingTimeType.java index 0f4a40f0750..d7b59790f8e 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/TimetabledPassingTimeType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/TimetabledPassingTimeType.java @@ -170,7 +170,7 @@ public static GraphQLObjectType create( TripTimeOnDate tripTimeOnDate = environment.getSource(); return GqlUtil .getTransitService(environment) - .getNoticesByEntity(tripTimeOnDate.getStopTimeKey()); + .findNotices(tripTimeOnDate.getStopTimeKey()); }) .build() ) diff --git a/application/src/main/java/org/opentripplanner/apis/vectortiles/GraphInspectorVectorTileResource.java b/application/src/main/java/org/opentripplanner/apis/vectortiles/GraphInspectorVectorTileResource.java index 26863157353..d19c25a1f47 100644 --- a/application/src/main/java/org/opentripplanner/apis/vectortiles/GraphInspectorVectorTileResource.java +++ b/application/src/main/java/org/opentripplanner/apis/vectortiles/GraphInspectorVectorTileResource.java @@ -166,7 +166,7 @@ private String tileJsonUrl(String base, List> layers) private List feedInfos() { return serverContext .transitService() - .getFeedIds() + .listFeedIds() .stream() .map(serverContext.transitService()::getFeedInfo) .filter(Predicate.not(Objects::isNull)) diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java b/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java index 9abf759d076..78cd68f6565 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java @@ -1,10 +1,8 @@ package org.opentripplanner.graph_builder.module.nearbystops; -import java.time.Duration; import java.util.HashSet; import java.util.List; import java.util.Set; -import org.opentripplanner.ext.dataoverlay.routing.DataOverlayContext; import org.opentripplanner.ext.flex.trip.FlexTrip; import org.opentripplanner.framework.application.OTPFeature; import org.opentripplanner.routing.api.request.RouteRequest; @@ -60,7 +58,7 @@ public List findNearbyStops( if (ts1 instanceof RegularStop) { /* Consider this destination stop as a candidate for every trip pattern passing through it. */ - for (TripPattern pattern : transitService.getPatternsForStop(ts1)) { + for (TripPattern pattern : transitService.findPatterns(ts1)) { if ( reverseDirection ? pattern.canAlight(nearbyStop.stop) diff --git a/application/src/main/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReference.java b/application/src/main/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReference.java index 422a62ce763..0eb6926055e 100644 --- a/application/src/main/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReference.java +++ b/application/src/main/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReference.java @@ -69,7 +69,7 @@ public ScheduledTransitLeg getLeg(TransitService transitService) { Trip trip; TripOnServiceDate tripOnServiceDate = null; if (tripOnServiceDateId != null) { - tripOnServiceDate = transitService.getTripOnServiceDateById(tripOnServiceDateId); + tripOnServiceDate = transitService.findTripOnServiceDate(tripOnServiceDateId); if (tripOnServiceDate == null) { LOG.info( "Invalid transit leg reference: trip on service date '{}' not found", @@ -87,14 +87,14 @@ public ScheduledTransitLeg getLeg(TransitService transitService) { } trip = tripOnServiceDate.getTrip(); } else { - trip = transitService.getTripForId(tripId); + trip = transitService.getTrip(tripId); if (trip == null) { LOG.info("Invalid transit leg reference: trip '{}' not found", tripId); return null; } } - TripPattern tripPattern = transitService.getPatternForTrip(trip, serviceDate); + TripPattern tripPattern = transitService.findPattern(trip, serviceDate); if (tripPattern == null) { LOG.info( "Invalid transit leg reference: trip pattern not found for trip '{}' and service date {} ", @@ -130,7 +130,7 @@ public ScheduledTransitLeg getLeg(TransitService transitService) { return null; } - Timetable timetable = transitService.getTimetableForTripPattern(tripPattern, serviceDate); + Timetable timetable = transitService.findTimetable(tripPattern, serviceDate); TripTimes tripTimes = timetable.getTripTimes(trip); if (tripTimes == null) { @@ -177,7 +177,7 @@ public ScheduledTransitLeg getLeg(TransitService transitService) { new AlertToLegMapper( transitService.getTransitAlertService(), - transitService::getMultiModalStationForStation + transitService::findMultiModalStation ) .addTransitAlertsToLeg(leg, false); diff --git a/application/src/main/java/org/opentripplanner/routing/TripTimeOnDateHelper.java b/application/src/main/java/org/opentripplanner/routing/TripTimeOnDateHelper.java index f2806d0a1f2..feb5191a612 100644 --- a/application/src/main/java/org/opentripplanner/routing/TripTimeOnDateHelper.java +++ b/application/src/main/java/org/opentripplanner/routing/TripTimeOnDateHelper.java @@ -23,9 +23,9 @@ public static List getTripTimeOnDates( Trip trip, LocalDate serviceDate ) { - TripPattern pattern = transitService.getPatternForTrip(trip, serviceDate); + TripPattern pattern = transitService.findPattern(trip, serviceDate); - Timetable timetable = transitService.getTimetableForTripPattern(pattern, serviceDate); + Timetable timetable = transitService.findTimetable(pattern, serviceDate); // If realtime moved pattern back to original trip, fetch it instead if (timetable.getTripIndex(trip.getId()) == -1) { @@ -33,8 +33,8 @@ public static List getTripTimeOnDates( "Trip {} not found in realtime pattern. This should not happen, and indicates a bug.", trip ); - pattern = transitService.getPatternForTrip(trip); - timetable = transitService.getTimetableForTripPattern(pattern, serviceDate); + pattern = transitService.findPattern(trip); + timetable = transitService.findTimetable(pattern, serviceDate); } // This check is made here to avoid changing TripTimeOnDate.fromTripTimes diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java b/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java index 3819500e605..c30c7c655f8 100644 --- a/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java +++ b/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java @@ -279,7 +279,7 @@ private TripOnServiceDate getTripOnServiceDate(T tripSchedule) { tripSchedule.getOriginalTripTimes().getTrip().getId(), tripSchedule.getServiceDate() ); - return transitService.getTripOnServiceDateForTripAndDay(tripIdAndServiceDate); + return transitService.findTripOnServiceDate(tripIdAndServiceDate); } private boolean isFree(EgressPathLeg egressPathLeg) { diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RouteRequestToFilterChainMapper.java b/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RouteRequestToFilterChainMapper.java index 695ac5a15f5..277efda3810 100644 --- a/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RouteRequestToFilterChainMapper.java +++ b/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RouteRequestToFilterChainMapper.java @@ -86,7 +86,7 @@ public static ItineraryListFilterChain createFilterChain( ) .withTransitAlerts( context.transitService().getTransitAlertService(), - context.transitService()::getMultiModalStationForStation + context.transitService()::findMultiModalStation ) .withSearchWindow(earliestDepartureTimeUsed, searchWindowUsed) .withPageCursorInputSubscriber(pageCursorInputSubscriber) diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java index 2b9c0136e07..d332013d5ac 100644 --- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java +++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/router/TransitRouter.java @@ -381,7 +381,7 @@ private TemporaryVerticesContainer createTemporaryVerticesContainer( private IntStream listStopIndexes(FeedScopedId stopLocationId) { Collection stops = serverContext .transitService() - .getStopOrChildStops(stopLocationId); + .findStopOrChildStops(stopLocationId); if (stops.isEmpty()) { throw new EntityNotFoundException( diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TransfersMapper.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TransfersMapper.java index 5f4e40708ef..ff47cb3ea74 100644 --- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TransfersMapper.java +++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TransfersMapper.java @@ -29,7 +29,7 @@ static List> mapTransfers( ArrayList list = new ArrayList<>(); - for (PathTransfer pathTransfer : transitService.getTransfersByStop(stop)) { + for (PathTransfer pathTransfer : transitService.findPathTransfers(stop)) { if (pathTransfer.to instanceof RegularStop) { int toStopIndex = pathTransfer.to.getIndex(); Transfer newTransfer; diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TransitLayerMapper.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TransitLayerMapper.java index a056efe87df..d6f9c0709c5 100644 --- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TransitLayerMapper.java +++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TransitLayerMapper.java @@ -67,7 +67,7 @@ private TransitLayer map(TransitTuningParameters tuningParameters) { LOG.info("Mapping transitLayer from TimetableRepository..."); - Collection allTripPatterns = transitService.getAllTripPatterns(); + Collection allTripPatterns = transitService.listTripPatterns(); tripPatternsByStopByDate = mapTripPatterns(allTripPatterns); @@ -109,7 +109,7 @@ private HashMap> mapTripPatterns( transitService.getServiceCodesRunningForDate() ); - Set allServiceDates = transitService.getAllServiceCodes(); + Set allServiceDates = transitService.listServiceDates(); List tripPatternForDates = Collections.synchronizedList(new ArrayList<>()); diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java index 14dc7ade982..28f19ce86b3 100644 --- a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java +++ b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java @@ -113,7 +113,7 @@ public static List getAlternativeLegs( return origins .stream() - .flatMap(stop -> transitService.getPatternsForStop(stop, true).stream()) + .flatMap(stop -> transitService.findPatterns(stop, true).stream()) .filter(tripPattern -> tripPattern.getStops().stream().anyMatch(destinations::contains)) .filter(tripPatternPredicate) .distinct() @@ -165,7 +165,7 @@ private static Stream generateLegs( var serviceDates = List.of(originalDate.minusDays(1), originalDate, originalDate.plusDays(1)); for (LocalDate serviceDate : serviceDates) { - Timetable timetable = transitService.getTimetableForTripPattern(pattern, serviceDate); + Timetable timetable = transitService.findTimetable(pattern, serviceDate); ZonedDateTime midnight = ServiceDateUtils.asStartOfService( serviceDate, transitService.getTimeZone() @@ -244,7 +244,7 @@ private static ScheduledTransitLeg mapToLeg( tripTimes.getArrivalTime(alightingPosition) ); - TripOnServiceDate tripOnServiceDate = transitService.getTripOnServiceDateForTripAndDay( + TripOnServiceDate tripOnServiceDate = transitService.findTripOnServiceDate( new TripIdAndServiceDate(tripTimeOnDate.getTrip().getId(), tripTimeOnDate.getServiceDay()) ); diff --git a/application/src/main/java/org/opentripplanner/routing/graphfinder/PatternAtStop.java b/application/src/main/java/org/opentripplanner/routing/graphfinder/PatternAtStop.java index c06e8bbcf91..ae1380c8f1a 100644 --- a/application/src/main/java/org/opentripplanner/routing/graphfinder/PatternAtStop.java +++ b/application/src/main/java/org/opentripplanner/routing/graphfinder/PatternAtStop.java @@ -48,7 +48,7 @@ public static PatternAtStop fromId(TransitService transitService, String id) { ); return new PatternAtStop( transitService.getRegularStop(stopId), - transitService.getTripPatternForId(patternId) + transitService.getTripPattern(patternId) ); } @@ -70,7 +70,7 @@ public List getStoptimes( int numberOfDepartures, ArrivalDeparture arrivalDeparture ) { - return transitService.stopTimesForPatternAtStop( + return transitService.findTripTimeOnDate( stop, pattern, startTime, diff --git a/application/src/main/java/org/opentripplanner/routing/graphfinder/PlaceFinderTraverseVisitor.java b/application/src/main/java/org/opentripplanner/routing/graphfinder/PlaceFinderTraverseVisitor.java index 16420a0d9eb..3a1bb32a41c 100644 --- a/application/src/main/java/org/opentripplanner/routing/graphfinder/PlaceFinderTraverseVisitor.java +++ b/application/src/main/java/org/opentripplanner/routing/graphfinder/PlaceFinderTraverseVisitor.java @@ -174,7 +174,7 @@ private boolean shouldInclude(List filterByPlaceTypes, PlaceType type private boolean stopHasPatternsWithMode(RegularStop stop, Set modes) { return transitService - .getPatternsForStop(stop) + .findPatterns(stop) .stream() .map(TripPattern::getMode) .anyMatch(modes::contains); @@ -234,7 +234,7 @@ private void handleStop(RegularStop stop, double distance) { private void handlePatternsAtStop(RegularStop stop, double distance) { if (includePatternAtStops) { List patterns = transitService - .getPatternsForStop(stop) + .findPatterns(stop) .stream() .filter(pattern -> filterByModes.isEmpty() || filterByModes.contains(pattern.getMode())) .filter(pattern -> diff --git a/application/src/main/java/org/opentripplanner/routing/stoptimes/StopTimesHelper.java b/application/src/main/java/org/opentripplanner/routing/stoptimes/StopTimesHelper.java index 863e2fc6569..b8fe8c9b216 100644 --- a/application/src/main/java/org/opentripplanner/routing/stoptimes/StopTimesHelper.java +++ b/application/src/main/java/org/opentripplanner/routing/stoptimes/StopTimesHelper.java @@ -59,7 +59,7 @@ public static List stopTimesForStop( List result = new ArrayList<>(); // Fetch all patterns, including those from realtime sources - Collection patterns = transitService.getPatternsForStop(stop, true); + Collection patterns = transitService.findPatterns(stop, true); for (TripPattern pattern : patterns) { Queue pq = listTripTimeOnDatesForPatternAtStop( @@ -101,9 +101,9 @@ public static List stopTimesForStop( .asStartOfService(serviceDate, transitService.getTimeZone()) .toInstant(); - for (TripPattern pattern : transitService.getPatternsForStop(stop, true)) { + for (TripPattern pattern : transitService.findPatterns(stop, true)) { StopTimesInPattern stopTimes = new StopTimesInPattern(pattern); - Timetable tt = transitService.getTimetableForTripPattern(pattern, serviceDate); + Timetable tt = transitService.findTimetable(pattern, serviceDate); List stops = pattern.getStops(); for (int i = 0; i < stops.size(); i++) { StopLocation currStop = stops.get(i); @@ -225,7 +225,7 @@ private static Queue listTripTimeOnDatesForPatternAtStop( // Loop through all possible days for (LocalDate serviceDate : serviceDates) { - Timetable timetable = transitService.getTimetableForTripPattern(pattern, serviceDate); + Timetable timetable = transitService.findTimetable(pattern, serviceDate); ZonedDateTime midnight = ServiceDateUtils.asStartOfService(serviceDate, zoneId); int secondsSinceMidnight = ServiceDateUtils.secondsSinceStartOfService( midnight, @@ -291,7 +291,7 @@ private static boolean isReplacedByAnotherPattern( TripPattern pattern, TransitService transitService ) { - final TripPattern replacement = transitService.getNewTripPatternForModifiedTrip( + final TripPattern replacement = transitService.findNewTripPatternForModifiedTrip( trip.getId(), serviceDate ); diff --git a/application/src/main/java/org/opentripplanner/service/realtimevehicles/internal/DefaultRealtimeVehicleService.java b/application/src/main/java/org/opentripplanner/service/realtimevehicles/internal/DefaultRealtimeVehicleService.java index 17a4d22e60c..9bd5c96c899 100644 --- a/application/src/main/java/org/opentripplanner/service/realtimevehicles/internal/DefaultRealtimeVehicleService.java +++ b/application/src/main/java/org/opentripplanner/service/realtimevehicles/internal/DefaultRealtimeVehicleService.java @@ -67,7 +67,7 @@ public List getRealtimeVehicles(TripPattern pattern) { @Override public OccupancyStatus getVehicleOccupancyStatus(Trip trip) { - return getOccupancyStatus(trip.getId(), transitService.getPatternForTrip(trip)); + return getOccupancyStatus(trip.getId(), transitService.findPattern(trip)); } /** diff --git a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java index 5f7cfa95524..cd4ab6155dc 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java @@ -92,18 +92,18 @@ public DefaultTransitService( } @Override - public Collection getFeedIds() { + public Collection listFeedIds() { return this.timetableRepository.getFeedIds(); } @Override - public Collection getAgencies() { + public Collection listAgencies() { OTPRequestTimeoutException.checkForTimeout(); return this.timetableRepository.getAgencies(); } @Override - public Optional findAgencyById(FeedScopedId id) { + public Optional findAgency(FeedScopedId id) { return this.timetableRepository.findAgencyById(id); } @@ -123,29 +123,23 @@ public void addFeedInfo(FeedInfo info) { } @Override - public Collection getNoticesByEntity(AbstractTransitEntity entity) { + public Collection findNotices(AbstractTransitEntity entity) { return this.timetableRepository.getNoticesByElement().get(entity); } @Override - public TripPattern getTripPatternForId(FeedScopedId id) { + public TripPattern getTripPattern(FeedScopedId id) { return this.timetableRepository.getTripPatternForId(id); } @Override - public Collection getAllTripPatterns() { + public Collection listTripPatterns() { OTPRequestTimeoutException.checkForTimeout(); return this.timetableRepository.getAllTripPatterns(); } @Override - public Collection getNotices() { - OTPRequestTimeoutException.checkForTimeout(); - return this.timetableRepository.getNoticesByElement().values(); - } - - @Override - public Station getStationById(FeedScopedId id) { + public Station getStation(FeedScopedId id) { return this.timetableRepository.getSiteRepository().getStationById(id); } @@ -155,13 +149,13 @@ public MultiModalStation getMultiModalStation(FeedScopedId id) { } @Override - public Collection getStations() { + public Collection listStations() { OTPRequestTimeoutException.checkForTimeout(); return this.timetableRepository.getSiteRepository().listStations(); } @Override - public Integer getServiceCodeForId(FeedScopedId id) { + public Integer getServiceCode(FeedScopedId id) { return this.timetableRepository.getServiceCodes().get(id); } @@ -178,7 +172,7 @@ public AreaStop getAreaStop(FeedScopedId id) { } @Override - public Agency getAgencyForId(FeedScopedId id) { + public Agency getAgency(FeedScopedId id) { return this.timetableRepositoryIndex.getAgencyForId(id); } @@ -188,7 +182,7 @@ public RegularStop getRegularStop(FeedScopedId id) { } @Override - public Route getRouteForId(FeedScopedId id) { + public Route getRoute(FeedScopedId id) { TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot != null) { Route realtimeAddedRoute = currentSnapshot.getRealtimeAddedRoute(id); @@ -209,31 +203,25 @@ public void addRoutes(Route route) { } @Override - public Set getRoutesForStop(StopLocation stop) { + public Set findRoutes(StopLocation stop) { OTPRequestTimeoutException.checkForTimeout(); return this.timetableRepositoryIndex.getRoutesForStop(stop); } @Override - public Collection getPatternsForStop(StopLocation stop) { + public Collection findPatterns(StopLocation stop) { OTPRequestTimeoutException.checkForTimeout(); return this.timetableRepositoryIndex.getPatternsForStop(stop); } @Override - public Collection getTripsForStop(StopLocation stop) { - OTPRequestTimeoutException.checkForTimeout(); - return this.timetableRepositoryIndex.getTripsForStop(stop); - } - - @Override - public Collection getAllOperators() { + public Collection listOperators() { OTPRequestTimeoutException.checkForTimeout(); return this.timetableRepository.getOperators(); } @Override - public Operator getOperatorForId(FeedScopedId id) { + public Operator getOperator(FeedScopedId id) { return this.timetableRepositoryIndex.getOperatorForId(id); } @@ -261,7 +249,7 @@ public StopLocation getStopLocation(FeedScopedId id) { } @Override - public Collection getStopOrChildStops(FeedScopedId id) { + public Collection findStopOrChildStops(FeedScopedId id) { return timetableRepository.getSiteRepository().findStopOrChildStops(id); } @@ -277,7 +265,7 @@ public StopLocationsGroup getStopLocationsGroup(FeedScopedId id) { } @Override - public Trip getTripForId(FeedScopedId id) { + public Trip getTrip(FeedScopedId id) { TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot != null) { Trip trip = currentSnapshot.getRealTimeAddedTrip(id); @@ -285,17 +273,17 @@ public Trip getTripForId(FeedScopedId id) { return trip; } } - return getScheduledTripForId(id); + return getScheduledTrip(id); } @Nullable @Override - public Trip getScheduledTripForId(FeedScopedId id) { + public Trip getScheduledTrip(FeedScopedId id) { return this.timetableRepositoryIndex.getTripForId(id); } @Override - public Collection getAllTrips() { + public Collection listTrips() { OTPRequestTimeoutException.checkForTimeout(); TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot != null) { @@ -308,7 +296,7 @@ public Collection getAllTrips() { } @Override - public Collection getAllRoutes() { + public Collection listRoutes() { OTPRequestTimeoutException.checkForTimeout(); TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot != null) { @@ -321,7 +309,7 @@ public Collection getAllRoutes() { } @Override - public TripPattern getPatternForTrip(Trip trip) { + public TripPattern findPattern(Trip trip) { TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot != null) { TripPattern realtimeAddedTripPattern = currentSnapshot.getRealTimeAddedPatternForTrip(trip); @@ -333,16 +321,16 @@ public TripPattern getPatternForTrip(Trip trip) { } @Override - public TripPattern getPatternForTrip(Trip trip, LocalDate serviceDate) { - TripPattern realtimePattern = getNewTripPatternForModifiedTrip(trip.getId(), serviceDate); + public TripPattern findPattern(Trip trip, LocalDate serviceDate) { + TripPattern realtimePattern = findNewTripPatternForModifiedTrip(trip.getId(), serviceDate); if (realtimePattern != null) { return realtimePattern; } - return getPatternForTrip(trip); + return findPattern(trip); } @Override - public Collection getPatternsForRoute(Route route) { + public Collection findPatterns(Route route) { OTPRequestTimeoutException.checkForTimeout(); Collection tripPatterns = new HashSet<>( timetableRepositoryIndex.getPatternsForRoute(route) @@ -358,7 +346,7 @@ public Collection getPatternsForRoute(Route route) { } @Override - public MultiModalStation getMultiModalStationForStation(Station station) { + public MultiModalStation findMultiModalStation(Station station) { return this.timetableRepository.getSiteRepository().getMultiModalStationForStation(station); } @@ -379,7 +367,7 @@ public MultiModalStation getMultiModalStationForStation(Station station) { * @param includeCancelledTrips If true, cancelled trips will also be included in result. */ @Override - public List stopTimesForStop( + public List findStopTimesInPattern( StopLocation stop, Instant startTime, Duration timeRange, @@ -407,7 +395,7 @@ public List stopTimesForStop( * @param serviceDate Return all departures for the specified date */ @Override - public List getStopTimesForStop( + public List findStopTimesInPattern( StopLocation stop, LocalDate serviceDate, ArrivalDeparture arrivalDeparture, @@ -439,7 +427,7 @@ public List getStopTimesForStop( * @param arrivalDeparture Filter by arrivals, departures, or both */ @Override - public List stopTimesForPatternAtStop( + public List findTripTimeOnDate( StopLocation stop, TripPattern pattern, Instant startTime, @@ -468,11 +456,8 @@ public List stopTimesForPatternAtStop( * that were updated by realtime data is both part of the TimetableRepositoryIndex and the TimetableSnapshot */ @Override - public Collection getPatternsForStop( - StopLocation stop, - boolean includeRealtimeUpdates - ) { - Set tripPatterns = new HashSet<>(getPatternsForStop(stop)); + public Collection findPatterns(StopLocation stop, boolean includeRealtimeUpdates) { + Set tripPatterns = new HashSet<>(findPatterns(stop)); if (includeRealtimeUpdates) { TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); @@ -484,19 +469,19 @@ public Collection getPatternsForStop( } @Override - public Collection getGroupsOfRoutes() { + public Collection listGroupsOfRoutes() { OTPRequestTimeoutException.checkForTimeout(); return timetableRepositoryIndex.getAllGroupOfRoutes(); } @Override - public Collection getRoutesForGroupOfRoutes(GroupOfRoutes groupOfRoutes) { + public Collection findGroupsOfRoutes(GroupOfRoutes groupOfRoutes) { OTPRequestTimeoutException.checkForTimeout(); return timetableRepositoryIndex.getRoutesForGroupOfRoutes(groupOfRoutes); } @Override - public GroupOfRoutes getGroupOfRoutesForId(FeedScopedId id) { + public GroupOfRoutes getGroupOfRoutes(FeedScopedId id) { return timetableRepositoryIndex.getGroupOfRoutesForId(id); } @@ -506,7 +491,7 @@ public GroupOfRoutes getGroupOfRoutesForId(FeedScopedId id) { * without making a fake routing request. */ @Override - public Timetable getTimetableForTripPattern(TripPattern tripPattern, LocalDate serviceDate) { + public Timetable findTimetable(TripPattern tripPattern, LocalDate serviceDate) { OTPRequestTimeoutException.checkForTimeout(); TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); return currentSnapshot != null @@ -515,7 +500,7 @@ public Timetable getTimetableForTripPattern(TripPattern tripPattern, LocalDate s } @Override - public TripPattern getNewTripPatternForModifiedTrip(FeedScopedId tripId, LocalDate serviceDate) { + public TripPattern findNewTripPatternForModifiedTrip(FeedScopedId tripId, LocalDate serviceDate) { TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot == null) { return null; @@ -546,7 +531,7 @@ private TimetableSnapshot lazyGetTimeTableSnapShot() { } @Override - public TripOnServiceDate getTripOnServiceDateById(FeedScopedId tripOnServiceDateId) { + public TripOnServiceDate findTripOnServiceDate(FeedScopedId tripOnServiceDateId) { TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot != null) { TripOnServiceDate tripOnServiceDate = currentSnapshot.getRealTimeAddedTripOnServiceDateById( @@ -560,7 +545,7 @@ public TripOnServiceDate getTripOnServiceDateById(FeedScopedId tripOnServiceDate } @Override - public Collection getAllTripOnServiceDates() { + public Collection listTripsOnServiceDate() { TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot != null) { return new CollectionsView<>( @@ -572,9 +557,7 @@ public Collection getAllTripOnServiceDates() { } @Override - public TripOnServiceDate getTripOnServiceDateForTripAndDay( - TripIdAndServiceDate tripIdAndServiceDate - ) { + public TripOnServiceDate findTripOnServiceDate(TripIdAndServiceDate tripIdAndServiceDate) { TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot != null) { TripOnServiceDate tripOnServiceDate = currentSnapshot.getRealTimeAddedTripOnServiceDateForTripAndDay( @@ -594,9 +577,9 @@ public TripOnServiceDate getTripOnServiceDateForTripAndDay( * @return - A list of TripOnServiceDates */ @Override - public List getTripOnServiceDates(TripOnServiceDateRequest request) { + public List findTripsOnServiceDate(TripOnServiceDateRequest request) { Matcher matcher = TripOnServiceDateMatcherFactory.of(request); - return getAllTripOnServiceDates().stream().filter(matcher::match).toList(); + return listTripsOnServiceDate().stream().filter(matcher::match).toList(); } /** @@ -614,12 +597,12 @@ public void addTransitMode(TransitMode mode) { } @Override - public Set getTransitModes() { + public Set listTransitModes() { return this.timetableRepository.getTransitModes(); } @Override - public Collection getTransfersByStop(StopLocation stop) { + public Collection findPathTransfers(StopLocation stop) { return this.timetableRepository.getTransfersByStop(stop); } @@ -698,7 +681,7 @@ public GraphUpdaterStatus getUpdaterStatus() { } @Override - public List getModesOfStopLocationsGroup(StopLocationsGroup station) { + public List findTransitModes(StopLocationsGroup station) { return sortByOccurrenceAndReduce( station.getChildStops().stream().flatMap(this::getPatternModesOfStop) ) @@ -706,7 +689,7 @@ public List getModesOfStopLocationsGroup(StopLocationsGroup station } @Override - public List getModesOfStopLocation(StopLocation stop) { + public List findTransitModes(StopLocation stop) { return sortByOccurrenceAndReduce(getPatternModesOfStop(stop)).toList(); } @@ -716,7 +699,7 @@ public Deduplicator getDeduplicator() { } @Override - public Set getAllServiceCodes() { + public Set listServiceDates() { return Collections.unmodifiableSet( timetableRepositoryIndex.getServiceCodesRunningForDate().keySet() ); @@ -734,7 +717,7 @@ private Stream getPatternModesOfStop(StopLocation stop) { if (stop.getGtfsVehicleType() != null) { return Stream.of(stop.getGtfsVehicleType()); } else { - return getPatternsForStop(stop).stream().map(TripPattern::getMode); + return findPatterns(stop).stream().map(TripPattern::getMode); } } diff --git a/application/src/main/java/org/opentripplanner/transit/service/TransitEditorService.java b/application/src/main/java/org/opentripplanner/transit/service/TransitEditorService.java index 567cb245af5..411ab3d652b 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TransitEditorService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TransitEditorService.java @@ -1,6 +1,7 @@ package org.opentripplanner.transit.service; import java.time.LocalDate; +import javax.annotation.Nullable; import org.opentripplanner.model.FeedInfo; import org.opentripplanner.routing.algorithm.raptoradapter.transit.TransitLayer; import org.opentripplanner.transit.model.basic.TransitMode; @@ -26,6 +27,12 @@ public interface TransitEditorService extends TransitService { FeedScopedId getOrCreateServiceIdForDate(LocalDate serviceDate); + /** + * Return the trip for the given id, not including trips created in real time. + */ + @Nullable + Trip getScheduledTrip(FeedScopedId id); + /** * Set the original, immutable, transit layer, * based on scheduled data (not real-time data). diff --git a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java index 7be2a29065a..d1c4159f63f 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java @@ -64,69 +64,65 @@ * copy-on-write and shares a lot of objects with any other TransitLayer instances. */ public interface TransitService { - Collection getFeedIds(); + Collection listFeedIds(); - Collection getAgencies(); - Optional findAgencyById(FeedScopedId id); + Collection listAgencies(); + Optional findAgency(FeedScopedId id); FeedInfo getFeedInfo(String feedId); - Collection getNoticesByEntity(AbstractTransitEntity entity); + Collection findNotices(AbstractTransitEntity entity); /** * Return a trip pattern by id, not including patterns created by real-time updates. */ - TripPattern getTripPatternForId(FeedScopedId id); + TripPattern getTripPattern(FeedScopedId id); /** * Return all scheduled trip patterns, not including real-time created trip patterns. * TODO: verify this is the intended behavior and possibly change the method name to * getAllScheduledTripPatterns */ - Collection getAllTripPatterns(); + Collection listTripPatterns(); - Collection getNotices(); - - Station getStationById(FeedScopedId id); + Station getStation(FeedScopedId id); MultiModalStation getMultiModalStation(FeedScopedId id); - Collection getStations(); + Collection listStations(); - Integer getServiceCodeForId(FeedScopedId id); + Integer getServiceCode(FeedScopedId id); TIntSet getServiceCodesRunningForDate(LocalDate date); - Agency getAgencyForId(FeedScopedId id); + Agency getAgency(FeedScopedId id); /** * Return a route for a given id, including routes created by real-time updates. * */ - Route getRouteForId(FeedScopedId id); + Route getRoute(FeedScopedId id); /** * Return the routes using the given stop, not including real-time updates. */ - Set getRoutesForStop(StopLocation stop); + Set findRoutes(StopLocation stop); /** * Return all the scheduled trip patterns for a specific stop * (not taking into account real-time updates). */ - Collection getPatternsForStop(StopLocation stop); + Collection findPatterns(StopLocation stop); /** * Returns all the patterns for a specific stop. If includeRealtimeUpdates is set, new patterns * added by realtime updates are added to the collection. */ - Collection getPatternsForStop(StopLocation stop, boolean includeRealtimeUpdates); - - Collection getTripsForStop(StopLocation stop); + Collection findPatterns(StopLocation stop, boolean includeRealtimeUpdates); - Collection getAllOperators(); + Collection listOperators(); - Operator getOperatorForId(FeedScopedId id); + Operator getOperator(FeedScopedId id); RegularStop getRegularStop(FeedScopedId id); @@ -144,56 +140,51 @@ public interface TransitService { * stop, area stop or stop group, then a list with one item is returned. * An empty list is if nothing is found. */ - Collection getStopOrChildStops(FeedScopedId id); + Collection findStopOrChildStops(FeedScopedId id); Collection listStopLocationGroups(); StopLocationsGroup getStopLocationsGroup(FeedScopedId id); + @Nullable AreaStop getAreaStop(FeedScopedId id); /** * Return the trip for the given id, including trips created in real time. */ @Nullable - Trip getTripForId(FeedScopedId id); - - /** - * Return the trip for the given id, not including trips created in real time. - */ - @Nullable - Trip getScheduledTripForId(FeedScopedId id); + Trip getTrip(FeedScopedId id); /** * Return all trips, including those created by real-time updates. */ - Collection getAllTrips(); + Collection listTrips(); /** * Return all routes, including those created by real-time updates. */ - Collection getAllRoutes(); + Collection listRoutes(); /** * Return the scheduled trip pattern for a given trip. * If the trip is an added trip (extra journey), return the initial trip pattern for this trip. */ - TripPattern getPatternForTrip(Trip trip); + TripPattern findPattern(Trip trip); /** * Return the trip pattern for a given trip on a service date. The real-time updated version * is returned if it exists, otherwise the scheduled trip pattern is returned. */ - TripPattern getPatternForTrip(Trip trip, LocalDate serviceDate); + TripPattern findPattern(Trip trip, LocalDate serviceDate); /** * Return all the trip patterns used in the given route, including those added by real-time updates */ - Collection getPatternsForRoute(Route route); + Collection findPatterns(Route route); - MultiModalStation getMultiModalStationForStation(Station station); + MultiModalStation findMultiModalStation(Station station); - List stopTimesForStop( + List findStopTimesInPattern( StopLocation stop, Instant startTime, Duration timeRange, @@ -202,14 +193,14 @@ List stopTimesForStop( boolean includeCancelledTrips ); - List getStopTimesForStop( + List findStopTimesInPattern( StopLocation stop, LocalDate serviceDate, ArrivalDeparture arrivalDeparture, boolean includeCancellations ); - List stopTimesForPatternAtStop( + List findTripTimeOnDate( StopLocation stop, TripPattern pattern, Instant startTime, @@ -219,18 +210,19 @@ List stopTimesForPatternAtStop( boolean includeCancellations ); - Collection getGroupsOfRoutes(); + Collection listGroupsOfRoutes(); - Collection getRoutesForGroupOfRoutes(GroupOfRoutes groupOfRoutes); + Collection findGroupsOfRoutes(GroupOfRoutes groupOfRoutes); - GroupOfRoutes getGroupOfRoutesForId(FeedScopedId id); + @Nullable + GroupOfRoutes getGroupOfRoutes(FeedScopedId id); /** * Return the timetable for a given trip pattern and date, taking into account real-time updates. * If no real-times update are applied, fall back to scheduled data. */ @Nullable - Timetable getTimetableForTripPattern(TripPattern tripPattern, LocalDate serviceDate); + Timetable findTimetable(TripPattern tripPattern, LocalDate serviceDate); /** * Return the real-time added pattern for a given tripId and a given service date. @@ -238,25 +230,25 @@ List stopTimesForPatternAtStop( * this date (that is: it is still using its scheduled trip pattern for this date). */ @Nullable - TripPattern getNewTripPatternForModifiedTrip(FeedScopedId tripId, LocalDate serviceDate); + TripPattern findNewTripPatternForModifiedTrip(FeedScopedId tripId, LocalDate serviceDate); /** * Return true if at least one trip pattern has been modified by a real-time update. */ boolean hasNewTripPatternsForModifiedTrips(); - TripOnServiceDate getTripOnServiceDateForTripAndDay(TripIdAndServiceDate tripIdAndServiceDate); + TripOnServiceDate findTripOnServiceDate(TripIdAndServiceDate tripIdAndServiceDate); /** * Return the TripOnServiceDate for a given id, including real-time updates. */ - TripOnServiceDate getTripOnServiceDateById(FeedScopedId datedServiceJourneyId); + TripOnServiceDate findTripOnServiceDate(FeedScopedId datedServiceJourneyId); - Collection getAllTripOnServiceDates(); + Collection listTripsOnServiceDate(); - Set getTransitModes(); + Set listTransitModes(); - Collection getTransfersByStop(StopLocation stop); + Collection findPathTransfers(StopLocation stop); TransitLayer getTransitLayer(); @@ -293,7 +285,7 @@ List stopTimesForPatternAtStop( * The returning stream is ordered by the number of occurrences of the mode in the child stops. * So, if more patterns of mode BUS than RAIL visit the group, the result will be [BUS,RAIL]. */ - List getModesOfStopLocationsGroup(StopLocationsGroup station); + List findTransitModes(StopLocationsGroup station); /** * For a {@link StopLocation} return its modes. *

@@ -305,11 +297,11 @@ List stopTimesForPatternAtStop( *

* So, if more patterns of mode BUS than RAIL visit the stop, the result will be [BUS,RAIL]. */ - List getModesOfStopLocation(StopLocation stop); + List findTransitModes(StopLocation stop); Deduplicator getDeduplicator(); - Set getAllServiceCodes(); + Set listServiceDates(); Map getServiceCodesRunningForDate(); @@ -319,5 +311,5 @@ List stopTimesForPatternAtStop( * @param request - A TripOnServiceDateRequest object with filtering defined. * @return - A list of TripOnServiceDates */ - List getTripOnServiceDates(TripOnServiceDateRequest request); + List findTripsOnServiceDate(TripOnServiceDateRequest request); } diff --git a/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java b/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java index 96e2d25bbd8..1558910bd1b 100644 --- a/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java +++ b/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java @@ -55,7 +55,7 @@ public TripDescriptor match(String feedId, TripDescriptor trip) { } catch (ParseException e) { return trip; } - Route route = transitService.getRouteForId(routeId); + Route route = transitService.getRoute(routeId); if (route == null) { return trip; } @@ -85,7 +85,7 @@ public synchronized Trip getTrip( LocalDate date ) { TIntSet servicesRunningForDate = transitService.getServiceCodesRunningForDate(date); - for (TripPattern pattern : transitService.getPatternsForRoute(route)) { + for (TripPattern pattern : transitService.findPatterns(route)) { if (pattern.getDirection() != direction) continue; for (TripTimes times : pattern.getScheduledTimetable().getTripTimes()) { if ( diff --git a/application/src/main/java/org/opentripplanner/updater/siri/AddedTripBuilder.java b/application/src/main/java/org/opentripplanner/updater/siri/AddedTripBuilder.java index aff1659653b..d5f68c4d153 100644 --- a/application/src/main/java/org/opentripplanner/updater/siri/AddedTripBuilder.java +++ b/application/src/main/java/org/opentripplanner/updater/siri/AddedTripBuilder.java @@ -226,7 +226,7 @@ Result build() { // but in case of trip cancellation, OTP will fall back to scheduled trip times // therefore they must be valid tripTimes.validateNonIncreasingTimes(); - tripTimes.setServiceCode(transitService.getServiceCodeForId(trip.getServiceId())); + tripTimes.setServiceCode(transitService.getServiceCode(trip.getServiceId())); TripPattern pattern = TripPattern .of(getTripPatternId.apply(trip)) @@ -315,7 +315,7 @@ private Route createRoute(Agency agency) { @Nullable private Agency resolveAgency() { return transitService - .getAllRoutes() + .listRoutes() .stream() .filter(r -> r != null && r.getOperator() != null && r.getOperator().equals(operator)) .findFirst() diff --git a/application/src/main/java/org/opentripplanner/updater/siri/EntityResolver.java b/application/src/main/java/org/opentripplanner/updater/siri/EntityResolver.java index 1bce3e63974..d3b41588f31 100644 --- a/application/src/main/java/org/opentripplanner/updater/siri/EntityResolver.java +++ b/application/src/main/java/org/opentripplanner/updater/siri/EntityResolver.java @@ -54,7 +54,7 @@ public Trip resolveTrip(EstimatedVehicleJourney journey) { if (journey.getDatedVehicleJourneyRef() != null) { String datedServiceJourneyId = journey.getDatedVehicleJourneyRef().getValue(); - TripOnServiceDate tripOnServiceDate = transitService.getTripOnServiceDateById( + TripOnServiceDate tripOnServiceDate = transitService.findTripOnServiceDate( resolveId(datedServiceJourneyId) ); @@ -65,9 +65,7 @@ public Trip resolveTrip(EstimatedVehicleJourney journey) { // It is possible that the trip has previously been added, resolve the added trip if (journey.getEstimatedVehicleJourneyCode() != null) { - var addedTrip = transitService.getTripForId( - resolveId(journey.getEstimatedVehicleJourneyCode()) - ); + var addedTrip = transitService.getTrip(resolveId(journey.getEstimatedVehicleJourneyCode())); if (addedTrip != null) { return addedTrip; } @@ -115,13 +113,13 @@ public TripOnServiceDate resolveTripOnServiceDate( return null; } - return transitService.getTripOnServiceDateForTripAndDay( + return transitService.findTripOnServiceDate( new TripIdAndServiceDate(resolveId(serviceJourneyId), serviceDate) ); } public TripOnServiceDate resolveTripOnServiceDate(FeedScopedId datedServiceJourneyId) { - return transitService.getTripOnServiceDateById(datedServiceJourneyId); + return transitService.findTripOnServiceDate(datedServiceJourneyId); } public FeedScopedId resolveDatedServiceJourneyId( @@ -182,7 +180,7 @@ public Trip resolveTrip(FramedVehicleJourneyRefStructure journey) { } public Trip resolveTrip(String serviceJourneyId) { - return transitService.getTripForId(resolveId(serviceJourneyId)); + return transitService.getTrip(resolveId(serviceJourneyId)); } /** @@ -196,11 +194,11 @@ public RegularStop resolveQuay(String quayRef) { * Resolve a {@link Route} from a line id. */ public Route resolveRoute(String lineRef) { - return transitService.getRouteForId(resolveId(lineRef)); + return transitService.getRoute(resolveId(lineRef)); } public Operator resolveOperator(String operatorRef) { - return transitService.getOperatorForId(resolveId(operatorRef)); + return transitService.getOperator(resolveId(operatorRef)); } @Nullable @@ -246,7 +244,7 @@ private int calculateDayOffset(EstimatedVehicleJourney vehicleJourney) { if (trip == null) { return 0; } - var pattern = transitService.getPatternForTrip(trip); + var pattern = transitService.findPattern(trip); if (pattern == null) { return 0; } diff --git a/application/src/main/java/org/opentripplanner/updater/siri/SiriFuzzyTripMatcher.java b/application/src/main/java/org/opentripplanner/updater/siri/SiriFuzzyTripMatcher.java index 604dceed408..2cffc81b440 100644 --- a/application/src/main/java/org/opentripplanner/updater/siri/SiriFuzzyTripMatcher.java +++ b/application/src/main/java/org/opentripplanner/updater/siri/SiriFuzzyTripMatcher.java @@ -161,8 +161,8 @@ public List getTripIdForInternalPlanningCodeServiceDate( } private void initCache(TransitService index) { - for (Trip trip : index.getAllTrips()) { - TripPattern tripPattern = index.getPatternForTrip(trip); + for (Trip trip : index.listTrips()) { + TripPattern tripPattern = index.findPattern(trip); if (tripPattern == null) { continue; @@ -288,7 +288,7 @@ TripAndPattern getTripAndPatternForJourney( ); TripPattern tripPattern = newTripPatternForModifiedTrip != null ? newTripPatternForModifiedTrip - : transitService.getPatternForTrip(trip); + : transitService.findPattern(trip); var firstStop = tripPattern.firstStop(); var lastStop = tripPattern.lastStop(); diff --git a/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java b/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java index 33ca220ca7d..59fcede8374 100644 --- a/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java +++ b/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java @@ -80,7 +80,7 @@ public SiriTimetableSnapshotSource( this.transitEditorService = new DefaultTransitService(timetableRepository, getTimetableSnapshotBuffer()); this.tripPatternCache = - new SiriTripPatternCache(tripPatternIdGenerator, transitEditorService::getPatternForTrip); + new SiriTripPatternCache(tripPatternIdGenerator, transitEditorService::findPattern); timetableRepository.initTimetableSnapshotProvider(this); } @@ -238,7 +238,7 @@ private Result handleModifiedTrip( if (trip != null) { // Found exact match - pattern = transitEditorService.getPatternForTrip(trip); + pattern = transitEditorService.findPattern(trip); } else if (fuzzyTripMatcher != null) { // No exact match found - search for trips based on arrival-times/stop-patterns TripAndPattern tripAndPattern = fuzzyTripMatcher.match( @@ -332,7 +332,7 @@ private Result addTripToGraphAndBuffer(TripUpdate tr private boolean markScheduledTripAsDeleted(Trip trip, final LocalDate serviceDate) { boolean success = false; - final TripPattern pattern = transitEditorService.getPatternForTrip(trip); + final TripPattern pattern = transitEditorService.findPattern(trip); if (pattern != null) { // Mark scheduled trip times for this trip in this pattern as deleted diff --git a/application/src/main/java/org/opentripplanner/updater/siri/mapper/AffectsMapper.java b/application/src/main/java/org/opentripplanner/updater/siri/mapper/AffectsMapper.java index a600f26c640..1f1c8c0b907 100644 --- a/application/src/main/java/org/opentripplanner/updater/siri/mapper/AffectsMapper.java +++ b/application/src/main/java/org/opentripplanner/updater/siri/mapper/AffectsMapper.java @@ -375,7 +375,7 @@ private static FeedScopedId getStop( FeedScopedId id = new FeedScopedId(feedId, siriStopId); if (transitService.getRegularStop(id) != null) { return id; - } else if (transitService.getStationById(id) != null) { + } else if (transitService.getStation(id) != null) { return id; } diff --git a/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java b/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java index 54c3901f3e8..929f60b99f0 100644 --- a/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java +++ b/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java @@ -387,7 +387,7 @@ private Result handleScheduledTrip( return UpdateError.result(tripId, NO_UPDATES); } - final FeedScopedId serviceId = transitEditorService.getTripForId(tripId).getServiceId(); + final FeedScopedId serviceId = transitEditorService.getTrip(tripId).getServiceId(); final Set serviceDates = transitEditorService .getCalendarService() .getServiceDatesForServiceId(serviceId); @@ -431,7 +431,7 @@ private Result handleScheduledTrip( .cancelStops(skippedStopIndices) .build(); - final Trip trip = transitEditorService.getTripForId(tripId); + final Trip trip = transitEditorService.getTrip(tripId); // Get cached trip pattern or create one if it doesn't exist yet final TripPattern newPattern = tripPatternCache.getOrCreateTripPattern( newStopPattern, @@ -473,7 +473,7 @@ private Result validateAndHandleAddedTrip( // // Check whether trip id already exists in graph - final Trip trip = transitEditorService.getScheduledTripForId(tripId); + final Trip trip = transitEditorService.getScheduledTrip(tripId); if (trip != null) { // TODO: should we support this and add a new instantiation of this trip (making it @@ -653,7 +653,7 @@ private Result handleAddedTrip( boolean routeExists = routeExists(tripId.getFeedId(), tripDescriptor); if (routeExists) { route = - transitEditorService.getRouteForId( + transitEditorService.getRoute( new FeedScopedId(tripId.getFeedId(), tripDescriptor.getRouteId()) ); } else { @@ -706,7 +706,7 @@ private Route createRoute(TripDescriptor tripDescriptor, FeedScopedId tripId) { var addedRouteExtension = AddedRoute.ofTripDescriptor(tripDescriptor); var agency = transitEditorService - .findAgencyById(new FeedScopedId(tripId.getFeedId(), addedRouteExtension.agencyId())) + .findAgency(new FeedScopedId(tripId.getFeedId(), addedRouteExtension.agencyId())) .orElseGet(() -> fallbackAgency(tripId.getFeedId())); builder.withAgency(agency); @@ -751,7 +751,7 @@ private Agency fallbackAgency(String feedId) { private boolean routeExists(String feedId, TripDescriptor tripDescriptor) { if (tripDescriptor.hasRouteId() && StringUtils.hasValue(tripDescriptor.getRouteId())) { var routeId = new FeedScopedId(feedId, tripDescriptor.getRouteId()); - return Objects.nonNull(transitEditorService.getRouteForId(routeId)); + return Objects.nonNull(transitEditorService.getRoute(routeId)); } else { return false; } @@ -841,7 +841,7 @@ private Result addTripToGraphAndBuffer( // Create StopPattern final StopPattern stopPattern = new StopPattern(stopTimes); - final TripPattern originalTripPattern = transitEditorService.getPatternForTrip(trip); + final TripPattern originalTripPattern = transitEditorService.findPattern(trip); // Get cached trip pattern or create one if it doesn't exist yet final TripPattern pattern = tripPatternCache.getOrCreateTripPattern( stopPattern, @@ -1000,7 +1000,7 @@ private Result validateAndHandleModifiedTrip( // // Check whether trip id already exists in graph - Trip trip = transitEditorService.getTripForId(tripId); + Trip trip = transitEditorService.getTrip(tripId); if (trip == null) { // TODO: should we support this and consider it an ADDED trip? @@ -1117,8 +1117,8 @@ private Result handleCanceledTrip( * @return trip pattern or null if no trip pattern was found */ private TripPattern getPatternForTripId(FeedScopedId tripId) { - Trip trip = transitEditorService.getTripForId(tripId); - return transitEditorService.getPatternForTrip(trip); + Trip trip = transitEditorService.getTrip(tripId); + return transitEditorService.findPattern(trip); } private static void debug(FeedScopedId id, String message, Object... params) { diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_position/VehiclePositionUpdaterRunnable.java b/application/src/main/java/org/opentripplanner/updater/vehicle_position/VehiclePositionUpdaterRunnable.java index 3165221a5fc..9ab2915f566 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_position/VehiclePositionUpdaterRunnable.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_position/VehiclePositionUpdaterRunnable.java @@ -35,9 +35,9 @@ public VehiclePositionUpdaterRunnable( public void run(RealTimeUpdateContext context) { RealtimeVehiclePatternMatcher matcher = new RealtimeVehiclePatternMatcher( feedId, - context.transitService()::getTripForId, - context.transitService()::getPatternForTrip, - context.transitService()::getPatternForTrip, + context.transitService()::getTrip, + context.transitService()::findPattern, + context.transitService()::findPattern, realtimeVehicleRepository, context.transitService().getTimeZone(), fuzzyTripMatching ? context.gtfsRealtimeFuzzyTripMatcher() : null, diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java index 5d79c24d05f..f637d2f9f54 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java @@ -210,7 +210,7 @@ static void setup() { ); @Override - public List getModesOfStopLocation(StopLocation stop) { + public List findTransitModes(StopLocation stop) { return List.of(BUS, FERRY); } @@ -220,7 +220,7 @@ public TransitAlertService getTransitAlertService() { } @Override - public Set getRoutesForStop(StopLocation stop) { + public Set findRoutes(StopLocation stop) { return Set.of(ROUTE); } }; diff --git a/application/src/test/java/org/opentripplanner/model/impl/OtpTransitServiceImplTest.java b/application/src/test/java/org/opentripplanner/model/impl/OtpTransitServiceImplTest.java index 728208438a8..4b7636ca07f 100644 --- a/application/src/test/java/org/opentripplanner/model/impl/OtpTransitServiceImplTest.java +++ b/application/src/test/java/org/opentripplanner/model/impl/OtpTransitServiceImplTest.java @@ -123,7 +123,7 @@ public void testGetAllStopTimes() { } @Test - public void testGetAllTrips() { + public void testListTrips() { Collection trips = subject.getAllTrips(); assertEquals(34, trips.size()); diff --git a/application/src/test/java/org/opentripplanner/routing/graph/DefaultRoutingServiceTest.java b/application/src/test/java/org/opentripplanner/routing/graph/DefaultRoutingServiceTest.java index a019a7059e5..ab897e3410b 100644 --- a/application/src/test/java/org/opentripplanner/routing/graph/DefaultRoutingServiceTest.java +++ b/application/src/test/java/org/opentripplanner/routing/graph/DefaultRoutingServiceTest.java @@ -56,11 +56,11 @@ public void testIdLookup() { } /* Agencies */ - String feedId = transitService.getFeedIds().iterator().next(); + String feedId = transitService.listFeedIds().iterator().next(); Agency agency; - agency = transitService.getAgencyForId(new FeedScopedId(feedId, "azerty")); + agency = transitService.getAgency(new FeedScopedId(feedId, "azerty")); assertNull(agency); - agency = transitService.getAgencyForId(new FeedScopedId(feedId, "agency")); + agency = transitService.getAgency(new FeedScopedId(feedId, "agency")); assertEquals(feedId + ":" + "agency", agency.getId().toString()); assertEquals("Fake Agency", agency.getName()); @@ -79,18 +79,18 @@ public void testIdLookup() { */ @Test public void testPatternsCoherent() { - for (Trip trip : transitService.getAllTrips()) { - TripPattern pattern = transitService.getPatternForTrip(trip); + for (Trip trip : transitService.listTrips()) { + TripPattern pattern = transitService.findPattern(trip); assertTrue(pattern.scheduledTripsAsStream().anyMatch(t -> t.equals(trip))); } /* This one depends on a feed where each TripPattern appears on only one route. */ - for (Route route : transitService.getAllRoutes()) { - for (TripPattern pattern : transitService.getPatternsForRoute(route)) { + for (Route route : transitService.listRoutes()) { + for (TripPattern pattern : transitService.findPatterns(route)) { assertEquals(pattern.getRoute(), route); } } for (var stop : transitService.listStopLocations()) { - for (TripPattern pattern : transitService.getPatternsForStop(stop)) { + for (TripPattern pattern : transitService.findPatterns(stop)) { int stopPos = pattern.findStopPosition(stop); assertTrue(stopPos >= 0, "Stop position exist"); } @@ -99,7 +99,7 @@ public void testPatternsCoherent() { @Test public void testSpatialIndex() { - String feedId = transitService.getFeedIds().iterator().next(); + String feedId = transitService.listFeedIds().iterator().next(); FeedScopedId idJ = new FeedScopedId(feedId, "J"); var stopJ = transitService.getRegularStop(idJ); FeedScopedId idL = new FeedScopedId(feedId, "L"); diff --git a/application/src/test/java/org/opentripplanner/routing/stoptimes/StopTimesHelperTest.java b/application/src/test/java/org/opentripplanner/routing/stoptimes/StopTimesHelperTest.java index b5b4d471e53..52ddaf86d91 100644 --- a/application/src/test/java/org/opentripplanner/routing/stoptimes/StopTimesHelperTest.java +++ b/application/src/test/java/org/opentripplanner/routing/stoptimes/StopTimesHelperTest.java @@ -33,8 +33,8 @@ public static void setUp() throws Exception { transitService = new DefaultTransitService(timetableRepository); feedId = timetableRepository.getFeedIds().iterator().next(); stopId = new FeedScopedId(feedId, "J"); - var originalPattern = transitService.getPatternForTrip( - transitService.getTripForId(new FeedScopedId(feedId, "5.1")) + var originalPattern = transitService.findPattern( + transitService.getTrip(new FeedScopedId(feedId, "5.1")) ); var tt = originalPattern.getScheduledTimetable(); var newTripTimes = tt.getTripTimes(0).copyScheduledTimes(); diff --git a/application/src/test/java/org/opentripplanner/transit/service/DefaultTransitServiceTest.java b/application/src/test/java/org/opentripplanner/transit/service/DefaultTransitServiceTest.java index 1c0d2a03a0f..efc4fa2c9e2 100644 --- a/application/src/test/java/org/opentripplanner/transit/service/DefaultTransitServiceTest.java +++ b/application/src/test/java/org/opentripplanner/transit/service/DefaultTransitServiceTest.java @@ -82,7 +82,7 @@ static void setup() { service = new DefaultTransitService(timetableRepository) { @Override - public Collection getPatternsForStop(StopLocation stop) { + public Collection findPatterns(StopLocation stop) { if (stop.equals(STOP_B)) { return List.of(FERRY_PATTERN, FERRY_PATTERN, RAIL_PATTERN, RAIL_PATTERN, RAIL_PATTERN); } else { @@ -94,31 +94,31 @@ public Collection getPatternsForStop(StopLocation stop) { @Test void modeFromGtfsVehicleType() { - var modes = service.getModesOfStopLocation(STOP_A); + var modes = service.findTransitModes(STOP_A); assertEquals(List.of(TRAM), modes); } @Test void modeFromPatterns() { - var modes = service.getModesOfStopLocation(STOP_B); + var modes = service.findTransitModes(STOP_B); assertEquals(List.of(RAIL, FERRY), modes); } @Test void stationModes() { - var modes = service.getModesOfStopLocationsGroup(STATION); + var modes = service.findTransitModes(STATION); assertEquals(List.of(RAIL, FERRY, TRAM), modes); } @Test void getPatternForStopsWithoutRealTime() { - Collection patternsForStop = service.getPatternsForStop(STOP_B, false); + Collection patternsForStop = service.findPatterns(STOP_B, false); assertEquals(Set.of(FERRY_PATTERN, RAIL_PATTERN), patternsForStop); } @Test void getPatternForStopsWithRealTime() { - Collection patternsForStop = service.getPatternsForStop(STOP_B, true); + Collection patternsForStop = service.findPatterns(STOP_B, true); assertEquals(Set.of(FERRY_PATTERN, RAIL_PATTERN, REAL_TIME_PATTERN), patternsForStop); } } diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java index f0e87b046c5..42fd39089b6 100644 --- a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java +++ b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java @@ -336,8 +336,8 @@ private void saveTestCasesToResultFile() { private void updateTimersWithGlobalCounters() { final var transitService = serverContext.transitService(); timer.globalCount("transitdata_stops", transitService.listStopLocations().size()); - timer.globalCount("transitdata_patterns", transitService.getAllTripPatterns().size()); - timer.globalCount("transitdata_trips", transitService.getAllTrips().size()); + timer.globalCount("transitdata_patterns", transitService.listTripPatterns().size()); + timer.globalCount("transitdata_trips", transitService.listTrips().size()); // we want to get the numbers after the garbage collection forceGCToAvoidGCLater(); diff --git a/application/src/test/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSourceTest.java b/application/src/test/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSourceTest.java index 901842adb45..5bf700cc04a 100644 --- a/application/src/test/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSourceTest.java +++ b/application/src/test/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSourceTest.java @@ -56,7 +56,7 @@ void testAddJourneyWithExistingRoute() { var env = RealtimeTestEnvironment.siri().addTrip(TRIP_1_INPUT).build(); Route route = ROUTE_1; - int numPatternForRoute = env.getTransitService().getPatternsForRoute(route).size(); + int numPatternForRoute = env.getTransitService().findPatterns(route).size(); String newJourneyId = "newJourney"; var updates = createValidAddedJourney(env).buildEstimatedTimetableDeliveries(); @@ -71,18 +71,16 @@ void testAddJourneyWithExistingRoute() { ); FeedScopedId tripId = id(newJourneyId); TransitService transitService = env.getTransitService(); - Trip trip = transitService.getTripForId(tripId); + Trip trip = transitService.getTrip(tripId); assertNotNull(trip); - assertNotNull(transitService.getPatternForTrip(trip)); - assertNotNull(transitService.getTripOnServiceDateById(tripId)); + assertNotNull(transitService.findPattern(trip)); + assertNotNull(transitService.findTripOnServiceDate(tripId)); assertNotNull( - transitService.getTripOnServiceDateForTripAndDay( - new TripIdAndServiceDate(tripId, SERVICE_DATE) - ) + transitService.findTripOnServiceDate(new TripIdAndServiceDate(tripId, SERVICE_DATE)) ); assertEquals( numPatternForRoute + 1, - transitService.getPatternsForRoute(route).size(), + transitService.findPatterns(route).size(), "The added trip should use a new pattern for this route" ); } @@ -97,7 +95,7 @@ void testAddJourneyWithNewRoute() { .withLineRef(newRouteRef) .buildEstimatedTimetableDeliveries(); - int numRoutes = env.getTransitService().getAllRoutes().size(); + int numRoutes = env.getTransitService().listRoutes().size(); var result = env.applyEstimatedTimetable(updates); assertEquals(1, result.successful()); @@ -107,11 +105,11 @@ void testAddJourneyWithNewRoute() { env.getScheduledTimetable("newJourney") ); TransitService transitService = env.getTransitService(); - assertEquals(numRoutes + 1, transitService.getAllRoutes().size()); + assertEquals(numRoutes + 1, transitService.listRoutes().size()); FeedScopedId newRouteId = id(newRouteRef); - Route newRoute = transitService.getRouteForId(newRouteId); + Route newRoute = transitService.getRoute(newRouteId); assertNotNull(newRoute); - assertEquals(1, transitService.getPatternsForRoute(newRoute).size()); + assertEquals(1, transitService.findPatterns(newRoute).size()); } @Test @@ -120,13 +118,13 @@ void testAddJourneyMultipleTimes() { var env = RealtimeTestEnvironment.siri().addTrip(TRIP_1_INPUT).build(); var updates = createValidAddedJourney(env).buildEstimatedTimetableDeliveries(); - int numTrips = env.getTransitService().getAllTrips().size(); + int numTrips = env.getTransitService().listTrips().size(); var result1 = env.applyEstimatedTimetable(updates); assertEquals(1, result1.successful()); - assertEquals(numTrips + 1, env.getTransitService().getAllTrips().size()); + assertEquals(numTrips + 1, env.getTransitService().listTrips().size()); var result2 = env.applyEstimatedTimetable(updates); assertEquals(1, result2.successful()); - assertEquals(numTrips + 1, env.getTransitService().getAllTrips().size()); + assertEquals(numTrips + 1, env.getTransitService().listTrips().size()); } @Test diff --git a/application/src/test/java/org/opentripplanner/updater/trip/RealtimeTestEnvironment.java b/application/src/test/java/org/opentripplanner/updater/trip/RealtimeTestEnvironment.java index 8231d8868f1..f892327eb81 100644 --- a/application/src/test/java/org/opentripplanner/updater/trip/RealtimeTestEnvironment.java +++ b/application/src/test/java/org/opentripplanner/updater/trip/RealtimeTestEnvironment.java @@ -96,9 +96,9 @@ public TransitService getTransitService() { */ public TripTimes getTripTimesForTrip(FeedScopedId tripId, LocalDate serviceDate) { var transitService = getTransitService(); - var trip = transitService.getTripOnServiceDateById(tripId).getTrip(); - var pattern = transitService.getPatternForTrip(trip, serviceDate); - var timetable = transitService.getTimetableForTripPattern(pattern, serviceDate); + var trip = transitService.findTripOnServiceDate(tripId).getTrip(); + var pattern = transitService.findPattern(trip, serviceDate); + var timetable = transitService.findTimetable(pattern, serviceDate); return timetable.getTripTimes(trip); } @@ -120,8 +120,8 @@ public TripPattern getPatternForTrip(String id) { public TripPattern getPatternForTrip(FeedScopedId tripId, LocalDate serviceDate) { var transitService = getTransitService(); - var trip = transitService.getTripOnServiceDateById(tripId); - return transitService.getPatternForTrip(trip.getTrip(), serviceDate); + var trip = transitService.findTripOnServiceDate(tripId); + return transitService.findPattern(trip.getTrip(), serviceDate); } /** diff --git a/application/src/test/java/org/opentripplanner/updater/trip/TimetableSnapshotSourceTest.java b/application/src/test/java/org/opentripplanner/updater/trip/TimetableSnapshotSourceTest.java index 8e3c793666a..d0e6f19a156 100644 --- a/application/src/test/java/org/opentripplanner/updater/trip/TimetableSnapshotSourceTest.java +++ b/application/src/test/java/org/opentripplanner/updater/trip/TimetableSnapshotSourceTest.java @@ -61,7 +61,7 @@ public void setUp() { timetableRepository = model.timetableRepository(); transitService = new DefaultTransitService(timetableRepository); - feedId = transitService.getFeedIds().stream().findFirst().get(); + feedId = transitService.listFeedIds().stream().findFirst().get(); } @Test @@ -206,8 +206,8 @@ public void testHandleModifiedTrip() { // Original trip pattern { final FeedScopedId tripId = new FeedScopedId(feedId, modifiedTripId); - final Trip trip = transitService.getTripForId(tripId); - final TripPattern originalTripPattern = transitService.getPatternForTrip(trip); + final Trip trip = transitService.getTrip(tripId); + final TripPattern originalTripPattern = transitService.findPattern(trip); final Timetable originalTimetableForToday = snapshot.resolve( originalTripPattern, diff --git a/application/src/test/java/org/opentripplanner/updater/trip/moduletests/addition/AddedTest.java b/application/src/test/java/org/opentripplanner/updater/trip/moduletests/addition/AddedTest.java index 3a3d7d5e130..e926361f4ea 100644 --- a/application/src/test/java/org/opentripplanner/updater/trip/moduletests/addition/AddedTest.java +++ b/application/src/test/java/org/opentripplanner/updater/trip/moduletests/addition/AddedTest.java @@ -63,9 +63,9 @@ void addedTripWithNewRoute() { assertEquals(TransitMode.RAIL, route.getMode()); TransitService transitService = env.getTransitService(); - var fromTimetableRepository = transitService.getRouteForId(route.getId()); + var fromTimetableRepository = transitService.getRoute(route.getId()); assertEquals(fromTimetableRepository, route); - var patternsForRoute = transitService.getPatternsForRoute(route); + var patternsForRoute = transitService.findPatterns(route); assertEquals(1, patternsForRoute.size()); assertEquals(pattern, patternsForRoute.stream().findFirst().orElseThrow()); @@ -121,16 +121,16 @@ void repeatedlyAddedTripWithNewRoute() { var secondRoute = secondPattern.getRoute(); assertSame(firstRoute, secondRoute); - assertNotNull(env.getTransitService().getRouteForId(firstRoute.getId())); + assertNotNull(env.getTransitService().getRoute(firstRoute.getId())); } private TripPattern assertAddedTrip(String tripId, RealtimeTestEnvironment env) { var snapshot = env.getTimetableSnapshot(); TransitService transitService = env.getTransitService(); - Trip trip = transitService.getTripForId(TimetableRepositoryForTest.id(ADDED_TRIP_ID)); + Trip trip = transitService.getTrip(TimetableRepositoryForTest.id(ADDED_TRIP_ID)); assertNotNull(trip); - assertNotNull(transitService.getPatternForTrip(trip)); + assertNotNull(transitService.findPattern(trip)); var stopA = env.timetableRepository.getSiteRepository().getRegularStop(STOP_A1.getId()); // Get the trip pattern of the added trip which goes through stopA diff --git a/application/src/test/java/org/opentripplanner/updater/trip/moduletests/delay/DelayedTest.java b/application/src/test/java/org/opentripplanner/updater/trip/moduletests/delay/DelayedTest.java index 8231e21bce7..665c79d193c 100644 --- a/application/src/test/java/org/opentripplanner/updater/trip/moduletests/delay/DelayedTest.java +++ b/application/src/test/java/org/opentripplanner/updater/trip/moduletests/delay/DelayedTest.java @@ -90,8 +90,8 @@ void complexDelay() { var snapshot = env.getTimetableSnapshot(); - var trip2 = env.getTransitService().getTripForId(id(TRIP_2_ID)); - var originalTripPattern = env.getTransitService().getPatternForTrip(trip2); + var trip2 = env.getTransitService().getTrip(id(TRIP_2_ID)); + var originalTripPattern = env.getTransitService().findPattern(trip2); var originalTimetableForToday = snapshot.resolve(originalTripPattern, SERVICE_DATE); var originalTimetableScheduled = snapshot.resolve(originalTripPattern, null); diff --git a/application/src/test/java/org/opentripplanner/updater/trip/moduletests/delay/SkippedTest.java b/application/src/test/java/org/opentripplanner/updater/trip/moduletests/delay/SkippedTest.java index c4b4c9e9bbd..e10b86797b8 100644 --- a/application/src/test/java/org/opentripplanner/updater/trip/moduletests/delay/SkippedTest.java +++ b/application/src/test/java/org/opentripplanner/updater/trip/moduletests/delay/SkippedTest.java @@ -133,8 +133,8 @@ private static void assertOriginalTripPatternIsDeleted( RealtimeTestEnvironment env, String tripId ) { - var trip = env.getTransitService().getTripForId(id(tripId)); - var originalTripPattern = env.getTransitService().getPatternForTrip(trip); + var trip = env.getTransitService().getTrip(id(tripId)); + var originalTripPattern = env.getTransitService().findPattern(trip); var snapshot = env.getTimetableSnapshot(); var originalTimetableForToday = snapshot.resolve(originalTripPattern, SERVICE_DATE); var originalTimetableScheduled = snapshot.resolve(originalTripPattern, null); @@ -176,8 +176,8 @@ private static void assertOriginalTripPatternIsDeleted( } private static void assertNewTripTimesIsUpdated(RealtimeTestEnvironment env, String tripId) { - var trip = env.getTransitService().getTripForId(id(tripId)); - var originalTripPattern = env.getTransitService().getPatternForTrip(trip); + var trip = env.getTransitService().getTrip(id(tripId)); + var originalTripPattern = env.getTransitService().findPattern(trip); var snapshot = env.getTimetableSnapshot(); var originalTimetableForToday = snapshot.resolve(originalTripPattern, SERVICE_DATE); From 46be411361388514c21453e0d6162528d4df8834 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 13 Nov 2024 13:44:22 +0100 Subject: [PATCH 071/169] Change order of debug layers --- .../apis/vectortiles/DebugStyleSpec.java | 4 +- .../apis/vectortiles/style.json | 398 +++++++++--------- 2 files changed, 201 insertions(+), 201 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/vectortiles/DebugStyleSpec.java b/application/src/main/java/org/opentripplanner/apis/vectortiles/DebugStyleSpec.java index b061a00df50..f27d252f250 100644 --- a/application/src/main/java/org/opentripplanner/apis/vectortiles/DebugStyleSpec.java +++ b/application/src/main/java/org/opentripplanner/apis/vectortiles/DebugStyleSpec.java @@ -106,9 +106,9 @@ static StyleSpec build( ListUtils.combine( List.of(StyleBuilder.ofId("background").typeRaster().source(BACKGROUND_SOURCE).minZoom(0)), wheelchair(edges), - edges(edges), - traversalPermissions(edges), noThruTraffic(edges), + traversalPermissions(edges), + edges(edges), vertices(vertices), stops(regularStops, areaStops, groupStops) ) diff --git a/application/src/test/resources/org/opentripplanner/apis/vectortiles/style.json b/application/src/test/resources/org/opentripplanner/apis/vectortiles/style.json index 27d708e1b1d..2cf936a1e63 100644 --- a/application/src/test/resources/org/opentripplanner/apis/vectortiles/style.json +++ b/application/src/test/resources/org/opentripplanner/apis/vectortiles/style.json @@ -126,170 +126,7 @@ } }, { - "id" : "edge", - "type" : "line", - "source" : "vectorSource", - "source-layer" : "edges", - "minzoom" : 6, - "maxzoom" : 23, - "paint" : { - "line-color" : "#f21d52", - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.1, - 23, - 6.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] - }, - "filter" : [ - "in", - "class", - "StreetEdge", - "AreaEdge", - "EscalatorEdge", - "PathwayEdge", - "ElevatorHopEdge", - "TemporaryPartialStreetEdge", - "TemporaryFreeEdge" - ], - "layout" : { - "line-cap" : "round", - "visibility" : "none" - }, - "metadata" : { - "group" : "Edges" - } - }, - { - "id" : "edge-name", - "type" : "symbol", - "source" : "vectorSource", - "source-layer" : "edges", - "minzoom" : 17, - "maxzoom" : 23, - "paint" : { - "text-color" : "#000", - "text-halo-color" : "#fff", - "text-halo-blur" : 4, - "text-halo-width" : 3 - }, - "filter" : [ - "in", - "class", - "StreetEdge", - "AreaEdge", - "EscalatorEdge", - "PathwayEdge", - "ElevatorHopEdge", - "TemporaryPartialStreetEdge", - "TemporaryFreeEdge" - ], - "layout" : { - "symbol-placement" : "line-center", - "symbol-spacing" : 1000, - "text-field" : "{name}", - "text-font" : [ - "KlokanTech Noto Sans Regular" - ], - "text-size" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 10, - 6.0, - 24, - 12.0 - ], - "text-max-width" : 100, - "text-keep-upright" : true, - "text-rotation-alignment" : "map", - "text-overlap" : "never", - "visibility" : "none" - }, - "metadata" : { - "group" : "Edges" - } - }, - { - "id" : "link", - "type" : "line", - "source" : "vectorSource", - "source-layer" : "edges", - "minzoom" : 13, - "maxzoom" : 23, - "paint" : { - "line-color" : "#22DD9E", - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.2, - 23, - 8.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] - }, - "filter" : [ - "in", - "class", - "StreetTransitStopLink", - "StreetTransitEntranceLink", - "BoardingLocationToStopLink", - "StreetVehicleRentalLink", - "StreetVehicleParkingLink", - "StreetStationCentroidLink" - ], - "layout" : { - "line-cap" : "round", - "visibility" : "none" - }, - "metadata" : { - "group" : "Edges" - } - }, - { - "id" : "permission PEDESTRIAN", + "id" : "no-thru-traffic PEDESTRIAN", "source" : "vectorSource", "source-layer" : "edges", "type" : "line", @@ -300,7 +137,7 @@ "match", [ "get", - "permission" + "noThruTraffic" ], "NONE", "#140d0e", @@ -356,7 +193,7 @@ "string", [ "get", - "permission" + "noThruTraffic" ] ] ], @@ -367,7 +204,7 @@ "string", [ "get", - "permission" + "noThruTraffic" ] ] ] @@ -377,11 +214,11 @@ "visibility" : "none" }, "metadata" : { - "group" : "Permissions" + "group" : "No-thru traffic" } }, { - "id" : "permission BICYCLE", + "id" : "no-thru-traffic BICYCLE", "source" : "vectorSource", "source-layer" : "edges", "type" : "line", @@ -392,7 +229,7 @@ "match", [ "get", - "permission" + "noThruTraffic" ], "NONE", "#140d0e", @@ -448,7 +285,7 @@ "string", [ "get", - "permission" + "noThruTraffic" ] ] ], @@ -459,7 +296,7 @@ "string", [ "get", - "permission" + "noThruTraffic" ] ] ] @@ -469,11 +306,11 @@ "visibility" : "none" }, "metadata" : { - "group" : "Permissions" + "group" : "No-thru traffic" } }, { - "id" : "permission CAR", + "id" : "no-thru-traffic CAR", "source" : "vectorSource", "source-layer" : "edges", "type" : "line", @@ -484,7 +321,7 @@ "match", [ "get", - "permission" + "noThruTraffic" ], "NONE", "#140d0e", @@ -540,7 +377,7 @@ "string", [ "get", - "permission" + "noThruTraffic" ] ] ], @@ -551,7 +388,7 @@ "string", [ "get", - "permission" + "noThruTraffic" ] ] ] @@ -561,11 +398,11 @@ "visibility" : "none" }, "metadata" : { - "group" : "Permissions" + "group" : "No-thru traffic" } }, { - "id" : "permission-text", + "id" : "no-thru-traffic-text", "source" : "vectorSource", "source-layer" : "edges", "type" : "symbol", @@ -591,7 +428,7 @@ "layout" : { "symbol-placement" : "line-center", "symbol-spacing" : 1000, - "text-field" : "{permission}", + "text-field" : "{noThruTraffic}", "text-font" : [ "KlokanTech Noto Sans Regular" ], @@ -619,11 +456,11 @@ "visibility" : "none" }, "metadata" : { - "group" : "Permissions" + "group" : "No-thru traffic" } }, { - "id" : "no-thru-traffic PEDESTRIAN", + "id" : "permission PEDESTRIAN", "source" : "vectorSource", "source-layer" : "edges", "type" : "line", @@ -634,7 +471,7 @@ "match", [ "get", - "noThruTraffic" + "permission" ], "NONE", "#140d0e", @@ -690,7 +527,7 @@ "string", [ "get", - "noThruTraffic" + "permission" ] ] ], @@ -701,7 +538,7 @@ "string", [ "get", - "noThruTraffic" + "permission" ] ] ] @@ -711,11 +548,11 @@ "visibility" : "none" }, "metadata" : { - "group" : "No-thru traffic" + "group" : "Permissions" } }, { - "id" : "no-thru-traffic BICYCLE", + "id" : "permission BICYCLE", "source" : "vectorSource", "source-layer" : "edges", "type" : "line", @@ -726,7 +563,7 @@ "match", [ "get", - "noThruTraffic" + "permission" ], "NONE", "#140d0e", @@ -782,7 +619,7 @@ "string", [ "get", - "noThruTraffic" + "permission" ] ] ], @@ -793,7 +630,7 @@ "string", [ "get", - "noThruTraffic" + "permission" ] ] ] @@ -803,11 +640,11 @@ "visibility" : "none" }, "metadata" : { - "group" : "No-thru traffic" + "group" : "Permissions" } }, { - "id" : "no-thru-traffic CAR", + "id" : "permission CAR", "source" : "vectorSource", "source-layer" : "edges", "type" : "line", @@ -818,7 +655,7 @@ "match", [ "get", - "noThruTraffic" + "permission" ], "NONE", "#140d0e", @@ -874,7 +711,7 @@ "string", [ "get", - "noThruTraffic" + "permission" ] ] ], @@ -885,7 +722,7 @@ "string", [ "get", - "noThruTraffic" + "permission" ] ] ] @@ -895,11 +732,11 @@ "visibility" : "none" }, "metadata" : { - "group" : "No-thru traffic" + "group" : "Permissions" } }, { - "id" : "no-thru-traffic-text", + "id" : "permission-text", "source" : "vectorSource", "source-layer" : "edges", "type" : "symbol", @@ -925,7 +762,7 @@ "layout" : { "symbol-placement" : "line-center", "symbol-spacing" : 1000, - "text-field" : "{noThruTraffic}", + "text-field" : "{permission}", "text-font" : [ "KlokanTech Noto Sans Regular" ], @@ -953,7 +790,170 @@ "visibility" : "none" }, "metadata" : { - "group" : "No-thru traffic" + "group" : "Permissions" + } + }, + { + "id" : "edge", + "type" : "line", + "source" : "vectorSource", + "source-layer" : "edges", + "minzoom" : 6, + "maxzoom" : 23, + "paint" : { + "line-color" : "#f21d52", + "line-width" : [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 0.1, + 23, + 6.0 + ], + "line-offset" : [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 0.4, + 23, + 7.0 + ] + }, + "filter" : [ + "in", + "class", + "StreetEdge", + "AreaEdge", + "EscalatorEdge", + "PathwayEdge", + "ElevatorHopEdge", + "TemporaryPartialStreetEdge", + "TemporaryFreeEdge" + ], + "layout" : { + "line-cap" : "round", + "visibility" : "none" + }, + "metadata" : { + "group" : "Edges" + } + }, + { + "id" : "edge-name", + "type" : "symbol", + "source" : "vectorSource", + "source-layer" : "edges", + "minzoom" : 17, + "maxzoom" : 23, + "paint" : { + "text-color" : "#000", + "text-halo-color" : "#fff", + "text-halo-blur" : 4, + "text-halo-width" : 3 + }, + "filter" : [ + "in", + "class", + "StreetEdge", + "AreaEdge", + "EscalatorEdge", + "PathwayEdge", + "ElevatorHopEdge", + "TemporaryPartialStreetEdge", + "TemporaryFreeEdge" + ], + "layout" : { + "symbol-placement" : "line-center", + "symbol-spacing" : 1000, + "text-field" : "{name}", + "text-font" : [ + "KlokanTech Noto Sans Regular" + ], + "text-size" : [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 10, + 6.0, + 24, + 12.0 + ], + "text-max-width" : 100, + "text-keep-upright" : true, + "text-rotation-alignment" : "map", + "text-overlap" : "never", + "visibility" : "none" + }, + "metadata" : { + "group" : "Edges" + } + }, + { + "id" : "link", + "type" : "line", + "source" : "vectorSource", + "source-layer" : "edges", + "minzoom" : 13, + "maxzoom" : 23, + "paint" : { + "line-color" : "#22DD9E", + "line-width" : [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 0.2, + 23, + 8.0 + ], + "line-offset" : [ + "interpolate", + [ + "linear" + ], + [ + "zoom" + ], + 13, + 0.4, + 23, + 7.0 + ] + }, + "filter" : [ + "in", + "class", + "StreetTransitStopLink", + "StreetTransitEntranceLink", + "BoardingLocationToStopLink", + "StreetVehicleRentalLink", + "StreetVehicleParkingLink", + "StreetStationCentroidLink" + ], + "layout" : { + "line-cap" : "round", + "visibility" : "none" + }, + "metadata" : { + "group" : "Edges" } }, { From a3b8b97eb6933b026f7b1d28b24df22dd75d4496 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 13 Nov 2024 14:48:38 +0100 Subject: [PATCH 072/169] Replace very slow GTFS test with fast one --- .../updater/trip/TimetableSnapshotSource.java | 3 +- .../_data/TimetableRepositoryForTest.java | 8 ++ .../GtfsRealtimeFuzzyTripMatcherTest.java | 112 +++++++++++++----- 3 files changed, 90 insertions(+), 33 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java b/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java index 54c3901f3e8..8cfd5879811 100644 --- a/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java +++ b/application/src/main/java/org/opentripplanner/updater/trip/TimetableSnapshotSource.java @@ -35,6 +35,7 @@ import java.util.Objects; import java.util.Set; import java.util.function.Supplier; +import javax.annotation.Nullable; import org.opentripplanner.framework.i18n.I18NString; import org.opentripplanner.framework.i18n.NonLocalizedString; import org.opentripplanner.gtfs.mapping.TransitModeMapper; @@ -153,7 +154,7 @@ public TimetableSnapshotSource( * @param updates GTFS-RT TripUpdate's that should be applied atomically */ public UpdateResult applyTripUpdates( - GtfsRealtimeFuzzyTripMatcher fuzzyTripMatcher, + @Nullable GtfsRealtimeFuzzyTripMatcher fuzzyTripMatcher, BackwardsDelayPropagationType backwardsDelayPropagationType, UpdateIncrementality updateIncrementality, List updates, diff --git a/application/src/test/java/org/opentripplanner/transit/model/_data/TimetableRepositoryForTest.java b/application/src/test/java/org/opentripplanner/transit/model/_data/TimetableRepositoryForTest.java index 7d7652b52e6..95b398f447e 100644 --- a/application/src/test/java/org/opentripplanner/transit/model/_data/TimetableRepositoryForTest.java +++ b/application/src/test/java/org/opentripplanner/transit/model/_data/TimetableRepositoryForTest.java @@ -40,6 +40,7 @@ import org.opentripplanner.transit.model.timetable.TripBuilder; import org.opentripplanner.transit.service.SiteRepository; import org.opentripplanner.transit.service.SiteRepositoryBuilder; +import org.opentripplanner.utils.time.TimeUtils; /** * Test utility class to help construct valid transit model objects. @@ -234,6 +235,13 @@ public List stopTimesEvery5Minutes(int count, Trip trip, int startTime .toList(); } + /** + * @see TimetableRepositoryForTest#stopTimesEvery5Minutes(int, Trip, int) + */ + public List stopTimesEvery5Minutes(int count, Trip trip, String startTime) { + return stopTimesEvery5Minutes(count, trip, TimeUtils.time(startTime)); + } + public StopPattern stopPattern(int numberOfStops) { var builder = StopPattern.create(numberOfStops); for (int i = 0; i < numberOfStops; i++) { diff --git a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java index 4da03a6b517..f5088b72142 100644 --- a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java +++ b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java @@ -2,47 +2,96 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.opentripplanner.transit.model._data.TimetableRepositoryForTest.id; import com.google.transit.realtime.GtfsRealtime.TripDescriptor; +import java.time.LocalDate; +import java.util.List; +import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.opentripplanner.GtfsTest; +import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; +import org.opentripplanner.model.calendar.CalendarServiceData; +import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; +import org.opentripplanner.transit.model.framework.Deduplicator; +import org.opentripplanner.transit.model.framework.FeedScopedId; +import org.opentripplanner.transit.model.network.Route; +import org.opentripplanner.transit.model.network.TripPattern; +import org.opentripplanner.transit.model.site.RegularStop; +import org.opentripplanner.transit.model.timetable.RealTimeTripTimes; +import org.opentripplanner.transit.model.timetable.Trip; +import org.opentripplanner.transit.model.timetable.TripTimesFactory; import org.opentripplanner.transit.service.DefaultTransitService; +import org.opentripplanner.transit.service.SiteRepository; +import org.opentripplanner.transit.service.SiteRepositoryBuilder; +import org.opentripplanner.transit.service.TimetableRepository; -public class GtfsRealtimeFuzzyTripMatcherTest extends GtfsTest { +public class GtfsRealtimeFuzzyTripMatcherTest { - @Test - public void testMatch() { - String feedId = timetableRepository.getFeedIds().iterator().next(); + private static final String ROUTE_ID = "r1"; + private static final String FEED_ID = TimetableRepositoryForTest.FEED_ID; + private static final LocalDate SERVICE_DATE = LocalDate.of(2024, 11, 13); + private static final String GTFS_SERVICE_DATE = SERVICE_DATE.toString().replaceAll("-", ""); + private static final int SERVICE_CODE = 555; + private static final SiteRepositoryBuilder siteRepositoryBuilder = SiteRepository.of(); + private static final TimetableRepositoryForTest TEST_MODEL = new TimetableRepositoryForTest( + siteRepositoryBuilder + ); + private static final RegularStop STOP_1 = TEST_MODEL.stop("s1").build(); + private static final RegularStop STOP_2 = TEST_MODEL.stop("s2").build(); + private static final TimetableRepository TT_REPO = new TimetableRepository( + siteRepositoryBuilder.build(), + new Deduplicator() + ); + private static final Route ROUTE = TimetableRepositoryForTest.route(id(ROUTE_ID)).build(); + private static final Trip TRIP = TimetableRepositoryForTest.trip("t1").build(); + + private static final FeedScopedId SERVICE_ID = TimetableRepositoryForTest.id("sid1"); + private static final String START_TIME = "07:30:00"; + private static final RealTimeTripTimes TRIP_TIMES = TripTimesFactory.tripTimes( + TRIP, + TEST_MODEL.stopTimesEvery5Minutes(5, TRIP, START_TIME), + new Deduplicator() + ); + private static final TripPattern TRIP_PATTERN = TimetableRepositoryForTest + .tripPattern("tp1", ROUTE) + .withStopPattern(TimetableRepositoryForTest.stopPattern(STOP_1, STOP_2)) + .withScheduledTimeTableBuilder(builder -> builder.addTripTimes(TRIP_TIMES)) + .build(); + + @BeforeAll + static void setup() { + TRIP_TIMES.setServiceCode(SERVICE_CODE); + CalendarServiceData calendarServiceData = new CalendarServiceData(); + calendarServiceData.putServiceDatesForServiceId(SERVICE_ID, List.of(SERVICE_DATE)); + TT_REPO.addTripPattern(TRIP_PATTERN.getId(), TRIP_PATTERN); + TT_REPO.getServiceCodes().put(SERVICE_ID, SERVICE_CODE); + TT_REPO.updateCalendarServiceData(true, calendarServiceData, DataImportIssueStore.NOOP); + TT_REPO.index(); + } - GtfsRealtimeFuzzyTripMatcher matcher = new GtfsRealtimeFuzzyTripMatcher( - new DefaultTransitService(timetableRepository) - ); + @Test + public void simpleMatch() { + var matcher = matcher(); TripDescriptor trip1 = TripDescriptor .newBuilder() - .setRouteId("1") + .setRouteId(ROUTE_ID) + .setDirectionId(2) + .setStartTime(START_TIME) + .setStartDate(GTFS_SERVICE_DATE) + .build(); + assertEquals(TRIP.getId().getId(), matcher.match(FEED_ID, trip1).getTripId()); + } + + @Test + void noMatch() { + // Test matching with "real time", when schedule uses time grater than 24:00 + var trip1 = TripDescriptor + .newBuilder() + .setRouteId("4") .setDirectionId(0) - .setStartTime("06:47:00") + .setStartTime("12:00:00") .setStartDate("20090915") .build(); - assertEquals("10W1020", matcher.match(feedId, trip1).getTripId()); - trip1 = - TripDescriptor - .newBuilder() - .setRouteId("4") - .setDirectionId(0) - .setStartTime("00:02:00") - .setStartDate("20090915") - .build(); - assertEquals("40W1890", matcher.match(feedId, trip1).getTripId()); - // Test matching with "real time", when schedule uses time grater than 24:00 - trip1 = - TripDescriptor - .newBuilder() - .setRouteId("4") - .setDirectionId(0) - .setStartTime("12:00:00") - .setStartDate("20090915") - .build(); // No departure at this time assertFalse(trip1.hasTripId()); trip1 = @@ -56,8 +105,7 @@ public void testMatch() { assertFalse(trip1.hasTripId()); } - @Override - public String getFeedName() { - return "portland/portland.gtfs.zip"; + private static GtfsRealtimeFuzzyTripMatcher matcher() { + return new GtfsRealtimeFuzzyTripMatcher(new DefaultTransitService(TT_REPO)); } } From 1450c4322d91084bb73d409dfe622e349e6e9125 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 13 Nov 2024 15:27:10 +0100 Subject: [PATCH 073/169] Implement logic for fuzzy matching even when there is a trip id --- .../service/TimetableRepositoryIndex.java | 4 ++-- .../updater/GtfsRealtimeFuzzyTripMatcher.java | 5 +++- .../GtfsRealtimeFuzzyTripMatcherTest.java | 24 +++++++++++++------ 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java index dc618b0943f..5214d302850 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java @@ -59,7 +59,7 @@ class TimetableRepositoryIndex { private FlexIndex flexIndex = null; TimetableRepositoryIndex(TimetableRepository timetableRepository) { - LOG.info("Transit model index init..."); + LOG.info("Timetable repository index init..."); for (Agency agency : timetableRepository.getAgencies()) { this.agencyForId.put(agency.getId(), agency); @@ -113,7 +113,7 @@ class TimetableRepositoryIndex { } } - LOG.info("Transit Model index init complete."); + LOG.info("Timetable repository index init complete."); } Agency getAgencyForId(FeedScopedId id) { diff --git a/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java b/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java index 96e2d25bbd8..448f01df636 100644 --- a/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java +++ b/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java @@ -35,7 +35,10 @@ public GtfsRealtimeFuzzyTripMatcher(TransitService transitService) { } public TripDescriptor match(String feedId, TripDescriptor trip) { - if (trip.hasTripId()) { + if ( + trip.hasTripId() && + transitService.getTripForId(new FeedScopedId(feedId, trip.getTripId())) != null + ) { // trip_id already exists return trip; } diff --git a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java index f5088b72142..3637030fe2c 100644 --- a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java +++ b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java @@ -72,13 +72,14 @@ static void setup() { @Test public void simpleMatch() { var matcher = matcher(); - TripDescriptor trip1 = TripDescriptor - .newBuilder() - .setRouteId(ROUTE_ID) - .setDirectionId(2) - .setStartTime(START_TIME) - .setStartDate(GTFS_SERVICE_DATE) - .build(); + TripDescriptor trip1 = matchingTripUpdate().build(); + assertEquals(TRIP.getId().getId(), matcher.match(FEED_ID, trip1).getTripId()); + } + + @Test + public void nonExistingTripId() { + var matcher = matcher(); + TripDescriptor trip1 = matchingTripUpdate().setTripId("does-not-exist-in-timetable").build(); assertEquals(TRIP.getId().getId(), matcher.match(FEED_ID, trip1).getTripId()); } @@ -108,4 +109,13 @@ void noMatch() { private static GtfsRealtimeFuzzyTripMatcher matcher() { return new GtfsRealtimeFuzzyTripMatcher(new DefaultTransitService(TT_REPO)); } + + private static TripDescriptor.Builder matchingTripUpdate() { + return TripDescriptor + .newBuilder() + .setRouteId(ROUTE_ID) + .setDirectionId(2) + .setStartTime(START_TIME) + .setStartDate(GTFS_SERVICE_DATE); + } } From 3c62195760c52b8ec6d4da7c983a8f564b2622a4 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 13 Nov 2024 15:50:26 +0100 Subject: [PATCH 074/169] Update log messages --- .../opentripplanner/transit/service/TimetableRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java index a57299d96ab..8ae51afe72e 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java @@ -166,10 +166,10 @@ public TimetableRepository() { */ public void index() { if (index == null) { - LOG.info("Index transit model..."); + LOG.info("Index timetable repository..."); // the transit model indexing updates the site repository index (flex stops added to the stop index) this.index = new TimetableRepositoryIndex(this); - LOG.info("Index transit model complete."); + LOG.info("Index timetable repository complete."); } } From 36a9b5839885fe57af89463b28fabb0d6f074cd3 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 13 Nov 2024 16:10:27 +0100 Subject: [PATCH 075/169] Add test for missing data --- .../GtfsRealtimeFuzzyTripMatcherTest.java | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java index 3637030fe2c..eaabae41e49 100644 --- a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java +++ b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java @@ -7,8 +7,11 @@ import com.google.transit.realtime.GtfsRealtime.TripDescriptor; import java.time.LocalDate; import java.util.List; +import java.util.function.Function; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.model.calendar.CalendarServiceData; import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; @@ -70,19 +73,35 @@ static void setup() { } @Test - public void simpleMatch() { + void simpleMatch() { var matcher = matcher(); TripDescriptor trip1 = matchingTripUpdate().build(); assertEquals(TRIP.getId().getId(), matcher.match(FEED_ID, trip1).getTripId()); } @Test - public void nonExistingTripId() { + void nonExistingTripId() { var matcher = matcher(); TripDescriptor trip1 = matchingTripUpdate().setTripId("does-not-exist-in-timetable").build(); assertEquals(TRIP.getId().getId(), matcher.match(FEED_ID, trip1).getTripId()); } + public static List> incompleteDataCases() { + return List.of( + TripDescriptor.Builder::clearDirectionId, + TripDescriptor.Builder::clearRouteId, + TripDescriptor.Builder::clearStartTime + ); + } + + @MethodSource("incompleteDataCases") + @ParameterizedTest + void incompleteMatchingData(Function modifier) { + var matcher = matcher(); + TripDescriptor trip1 = modifier.apply(matchingTripUpdate()).build(); + assertFalse(matcher.match(FEED_ID, trip1).hasTripId()); + } + @Test void noMatch() { // Test matching with "real time", when schedule uses time grater than 24:00 From 0f523a4198204e51c1267a585847b8f50ac56d3f Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 13 Nov 2024 16:14:07 +0100 Subject: [PATCH 076/169] Add more tests --- .../GtfsRealtimeFuzzyTripMatcherTest.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java index eaabae41e49..b8d6fed1470 100644 --- a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java +++ b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java @@ -46,7 +46,8 @@ public class GtfsRealtimeFuzzyTripMatcherTest { new Deduplicator() ); private static final Route ROUTE = TimetableRepositoryForTest.route(id(ROUTE_ID)).build(); - private static final Trip TRIP = TimetableRepositoryForTest.trip("t1").build(); + private static final String TRIP_ID = "t1"; + private static final Trip TRIP = TimetableRepositoryForTest.trip(TRIP_ID).build(); private static final FeedScopedId SERVICE_ID = TimetableRepositoryForTest.id("sid1"); private static final String START_TIME = "07:30:00"; @@ -73,24 +74,32 @@ static void setup() { } @Test - void simpleMatch() { + void noTripId() { var matcher = matcher(); TripDescriptor trip1 = matchingTripUpdate().build(); assertEquals(TRIP.getId().getId(), matcher.match(FEED_ID, trip1).getTripId()); } @Test - void nonExistingTripId() { + void tripIdSetButNotInSchedule() { var matcher = matcher(); - TripDescriptor trip1 = matchingTripUpdate().setTripId("does-not-exist-in-timetable").build(); - assertEquals(TRIP.getId().getId(), matcher.match(FEED_ID, trip1).getTripId()); + TripDescriptor trip1 = matchingTripUpdate().setTripId("does-not-exist-in-schedule").build(); + assertEquals(TRIP_ID, matcher.match(FEED_ID, trip1).getTripId()); + } + + @Test + void tripIdExistsInSchedule() { + var matcher = matcher(); + TripDescriptor trip1 = matchingTripUpdate().setTripId(TRIP_ID).build(); + assertEquals(TRIP_ID, matcher.match(FEED_ID, trip1).getTripId()); } public static List> incompleteDataCases() { return List.of( TripDescriptor.Builder::clearDirectionId, TripDescriptor.Builder::clearRouteId, - TripDescriptor.Builder::clearStartTime + TripDescriptor.Builder::clearStartTime, + TripDescriptor.Builder::clearStartDate ); } From d437d6632c69ba49865584dc923492f79153175c Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Wed, 13 Nov 2024 15:21:29 +0000 Subject: [PATCH 077/169] rename parameters --- .../apis/gtfs/datafetchers/LegImpl.java | 4 ++-- .../alternativelegs/AlternativeLegs.java | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java index b02ea12e525..5e892c06368 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/LegImpl.java @@ -286,7 +286,7 @@ public DataFetcher> nextLegs() { return alternativeLegs(NavigationDirection.NEXT); } - private DataFetcher> alternativeLegs(NavigationDirection timeLine) { + private DataFetcher> alternativeLegs(NavigationDirection direction) { return environment -> { if (environment.getSource() instanceof ScheduledTransitLeg originalLeg) { var args = new GraphQLTypes.GraphQLLegNextLegsArgs(environment.getArguments()); @@ -321,7 +321,7 @@ private DataFetcher> alternativeLegs(NavigationDirection timeLine) environment.getSource(), numberOfLegs, environment.getContext().transitService(), - timeLine, + direction, AlternativeLegsFilter.NO_FILTER, limitToExactOriginStop, limitToExactDestinationStop diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java index 7b685cf8193..51af4a27f79 100644 --- a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java +++ b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java @@ -45,10 +45,10 @@ public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - NavigationDirection timeLine, + NavigationDirection direction, AlternativeLegsFilter filter ) { - return getAlternativeLegs(leg, numberLegs, transitService, timeLine, filter, false, false); + return getAlternativeLegs(leg, numberLegs, transitService, direction, filter, false, false); } /** @@ -58,7 +58,7 @@ public static List getAlternativeLegs( * @param numberLegs The number of alternative legs requested. If fewer legs are found, * only the found legs are returned. * @param transitService The transit service used for the search - * @param timeLine Indicating whether the alternative legs should depart before or + * @param direction Indicating whether the alternative legs should depart before or * after than the original. * @param filter AlternativeLegsFilter indicating which properties of the original * leg should not change in the alternative legs @@ -73,7 +73,7 @@ public static List getAlternativeLegs( Leg leg, Integer numberLegs, TransitService transitService, - NavigationDirection timeLine, + NavigationDirection direction, AlternativeLegsFilter filter, boolean exactOriginStop, boolean exactDestinationStop @@ -96,7 +96,7 @@ public static List getAlternativeLegs( ScheduledTransitLeg::getStartTime ); - if (timeLine == NavigationDirection.PREVIOUS) { + if (direction == NavigationDirection.PREVIOUS) { legComparator = legComparator.reversed(); } @@ -110,7 +110,7 @@ public static List getAlternativeLegs( .distinct() .flatMap(tripPattern -> withBoardingAlightingPositions(origins, destinations, tripPattern)) .flatMap(t -> - generateLegs(transitService, t, leg.getStartTime(), leg.getServiceDate(), timeLine) + generateLegs(transitService, t, leg.getStartTime(), leg.getServiceDate(), direction) ) .filter(Predicate.not(leg::isPartiallySameTransitLeg)) .sorted(legComparator) @@ -127,7 +127,7 @@ private static Stream generateLegs( TripPatternBetweenStops tripPatternBetweenStops, ZonedDateTime departureTime, LocalDate originalDate, - NavigationDirection timeLine + NavigationDirection direction ) { TripPattern pattern = tripPatternBetweenStops.tripPattern; int boardingPosition = tripPatternBetweenStops.positions.boardingPosition; @@ -140,7 +140,7 @@ private static Stream generateLegs( tts.getServiceDayMidnight() + tts.getRealtimeDeparture() ); - if (timeLine == NavigationDirection.PREVIOUS) { + if (direction == NavigationDirection.PREVIOUS) { comparator = comparator.reversed(); } @@ -170,7 +170,7 @@ private static Stream generateLegs( continue; } - boolean departureTimeInRange = timeLine == NavigationDirection.PREVIOUS + boolean departureTimeInRange = direction == NavigationDirection.PREVIOUS ? tripTimes.getDepartureTime(boardingPosition) <= secondsSinceMidnight : tripTimes.getDepartureTime(boardingPosition) >= secondsSinceMidnight; From ceeda9b79f33fac98a176a0fec2c7ec82a67d39c Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 13 Nov 2024 17:47:31 +0100 Subject: [PATCH 078/169] Add more test cases --- .../GtfsRealtimeFuzzyTripMatcherTest.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java index b8d6fed1470..82e8c2f825d 100644 --- a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java +++ b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java @@ -94,6 +94,27 @@ void tripIdExistsInSchedule() { assertEquals(TRIP_ID, matcher.match(FEED_ID, trip1).getTripId()); } + @Test + void incorrectRoute() { + var matcher = matcher(); + TripDescriptor trip1 = matchingTripUpdate().setRouteId("does-not-exists").build(); + assertFalse(matcher.match(FEED_ID, trip1).hasTripId()); + } + + @Test + void incorrectDateFormat() { + var matcher = matcher(); + TripDescriptor trip1 = matchingTripUpdate().setStartDate("ZZZ").build(); + assertFalse(matcher.match(FEED_ID, trip1).hasTripId()); + } + + @Test + void incorrectDirection() { + var matcher = matcher(); + TripDescriptor trip1 = matchingTripUpdate().setDirectionId(1).build(); + assertFalse(matcher.match(FEED_ID, trip1).hasTripId()); + } + public static List> incompleteDataCases() { return List.of( TripDescriptor.Builder::clearDirectionId, From 70e72737a3e765dcc6c94bbc6b8af65fa2d13512 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Thu, 14 Nov 2024 12:53:28 +0100 Subject: [PATCH 079/169] Fix typo [ci skip] --- doc/user/IslandPruning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/IslandPruning.md b/doc/user/IslandPruning.md index c33d31dd010..5717adb9ca4 100644 --- a/doc/user/IslandPruning.md +++ b/doc/user/IslandPruning.md @@ -43,7 +43,7 @@ The image on the right shows that pruning added walk nothrough restricition to t ## Pruning algorithm Pruning analyses the three traverse modes - walk, bike and car - separately. For example, a resting area by a motorway may include some walking paths, but the only way to get there is -to use car. Therefore, it represents a disconnected 'island' when considering the walk mode. Pruning does not erase disconnected graph geometry as long as it +to use a car. Therefore, it represents a disconnected 'island' when considering the walk mode. Pruning does not erase disconnected graph geometry as long as it can be reached using any of the traverse modes. Instead, pruning removes traversal permission for each disconnected mode from the island. Pruning uses four parameters and some heuristics to decide if a disconnected sub graph is a real island to be retained, or a harmful data error: From 228078309dc4dd1ffb6c843e56c2119ad3ab9cb9 Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Thu, 14 Nov 2024 12:17:05 +0000 Subject: [PATCH 080/169] Add changelog entry for #6142 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index 171c1350728..11f9acd31ea 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -41,6 +41,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Deprecate old alert translations in the GTFS API and add language param to a few alert fields [#6216](https://github.com/opentripplanner/OpenTripPlanner/pull/6216) - add stopPositionInPattern in Stoptime in GTFS GraphQL API [#6204](https://github.com/opentripplanner/OpenTripPlanner/pull/6204) - Fix parsing of wheelchair accessible parking, add wheelchair debug layer [#6229](https://github.com/opentripplanner/OpenTripPlanner/pull/6229) +- Add previousLegs into GTFS GraphQL API [#6142](https://github.com/opentripplanner/OpenTripPlanner/pull/6142) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From b3c63f915d21cff1b5f0672c6de276339a32d8e1 Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Thu, 14 Nov 2024 14:06:34 +0100 Subject: [PATCH 081/169] Generate doc --- doc/user/Configuration.md | 68 +++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/doc/user/Configuration.md b/doc/user/Configuration.md index 21976218db3..f80966b8cb3 100644 --- a/doc/user/Configuration.md +++ b/doc/user/Configuration.md @@ -219,40 +219,40 @@ Here is a list of all features which can be toggled on/off and their default val -| Feature | Description | Enabled by default | Sandbox | -|--------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------:|:-------:| -| `APIBikeRental` | Enable the bike rental endpoint. | ✓️ | | -| `APIServerInfo` | Enable the server info endpoint. | ✓️ | | -| `APIUpdaterStatus` | Enable endpoint for graph updaters status. | ✓️ | | -| `IncludeEmptyRailStopsInTransfers` | Turning this on make sure that Rail stops without scheduled patterns still get included when generating transfers using `ConsiderPatternsForDirectTransfers`. It is common for stops to be assign at realtime for Rail, if so turning this on will help to avoid dropping transfers which are needed, when the stop become in use later. Turning this on, if ConsiderPatternsForDirectTransfers is off has no effect. | | | -| `ConsiderPatternsForDirectTransfers` | Enable limiting transfers so that there is only a single transfer to each pattern. | ✓️ | | -| `DebugUi` | Enable the debug GraphQL client and web UI and located at the root of the web server as well as the debug map tiles it uses. Be aware that the map tiles are not a stable API and can change without notice. Use the [vector tiles feature if](sandbox/MapboxVectorTilesApi.md) you want a stable map tiles API. | ✓️ | | -| `ExtraTransferLegOnSameStop` | Should there be a transfer leg when transferring on the very same stop. Note that for in-seat/interlined transfers no transfer leg will be generated. | | | -| `FloatingBike` | Enable floating bike routing. | ✓️ | | -| `GtfsGraphQlApi` | Enable the [GTFS GraphQL API](apis/GTFS-GraphQL-API.md). | ✓️ | | -| `GtfsGraphQlApiRentalStationFuzzyMatching` | Does vehicleRentalStation query also allow ids that are not feed scoped. | | | -| `MinimumTransferTimeIsDefinitive` | If the minimum transfer time is a lower bound (default) or the definitive time for the transfer. Set this to `true` if you want to set a transfer time lower than what OTP derives from OSM data. | | | -| `OptimizeTransfers` | OTP will inspect all itineraries found and optimize where (which stops) the transfer will happen. Waiting time, priority and guaranteed transfers are taken into account. | ✓️ | | -| `ParallelRouting` | Enable performing parts of the trip planning in parallel. | | | -| `TransferConstraints` | Enforce transfers to happen according to the _transfers.txt_ (GTFS) and Interchanges (NeTEx). Turning this _off_ will increase the routing performance a little. | ✓️ | | -| `TransmodelGraphQlApi` | Enable the [Transmodel (NeTEx) GraphQL API](apis/TransmodelApi.md). | ✓️ | ✓️ | -| `ActuatorAPI` | Endpoint for actuators (service health status). | | ✓️ | -| `AsyncGraphQLFetchers` | Whether the @async annotation in the GraphQL schema should lead to the fetch being executed asynchronously. This allows batch or alias queries to run in parallel at the cost of consuming extra threads. | | | -| `Co2Emissions` | Enable the emissions sandbox module. | | ✓️ | -| `DataOverlay` | Enable usage of data overlay when calculating costs for the street network. | | ✓️ | -| `FaresV2` | Enable import of GTFS-Fares v2 data. | | ✓️ | -| `FlexRouting` | Enable FLEX routing. | | ✓️ | -| `GoogleCloudStorage` | Enable Google Cloud Storage integration. | | ✓️ | -| `LegacyRestApi` | Enable legacy REST API. This API will be removed in the future. | | ✓️ | -| `MultiCriteriaGroupMaxFilter` | Keep the best itinerary with respect to each criteria used in the transit-routing search. For example the itinerary with the lowest cost, fewest transfers, and each unique transit-group (transit-group-priority) is kept, even if the max-limit is exceeded. This is turned off by default for now, until this feature is well tested. | | | -| `RealtimeResolver` | When routing with ignoreRealtimeUpdates=true, add an extra step which populates results with real-time data | | ✓️ | -| `ReportApi` | Enable the report API. | | ✓️ | -| `RestAPIPassInDefaultConfigAsJson` | Enable a default RouteRequest to be passed in as JSON on the REST API - FOR DEBUGGING ONLY! | | | -| `SandboxAPIGeocoder` | Enable the Geocoder API. | | ✓️ | -| `SandboxAPIMapboxVectorTilesApi` | Enable Mapbox vector tiles API. | | ✓️ | -| `SandboxAPIParkAndRideApi` | Enable park-and-ride endpoint. | | ✓️ | -| `Sorlandsbanen` | Include train Sørlandsbanen in results when searching in south of Norway. Only relevant in Norway. | | ✓️ | -| `TransferAnalyzer` | Analyze transfers during graph build. | | ✓️ | +| Feature | Description | Enabled by default | Sandbox | +|--------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------:|:-------:| +| `APIBikeRental` | Enable the bike rental endpoint. | ✓️ | | +| `APIServerInfo` | Enable the server info endpoint. | ✓️ | | +| `APIUpdaterStatus` | Enable endpoint for graph updaters status. | ✓️ | | +| `IncludeEmptyRailStopsInTransfers` | Turning this on guarantees that Rail stops without scheduled departures still get included when generating transfers using `ConsiderPatternsForDirectTransfers`. It is common for stops to be assign at real-time for Rail. Turning this on will help to avoid dropping transfers which are needed, when the stop is in use later. Turning this on, if ConsiderPatternsForDirectTransfers is off has no effect. | | | +| `ConsiderPatternsForDirectTransfers` | Enable limiting transfers so that there is only a single transfer to each pattern. | ✓️ | | +| `DebugUi` | Enable the debug GraphQL client and web UI and located at the root of the web server as well as the debug map tiles it uses. Be aware that the map tiles are not a stable API and can change without notice. Use the [vector tiles feature if](sandbox/MapboxVectorTilesApi.md) you want a stable map tiles API. | ✓️ | | +| `ExtraTransferLegOnSameStop` | Should there be a transfer leg when transferring on the very same stop. Note that for in-seat/interlined transfers no transfer leg will be generated. | | | +| `FloatingBike` | Enable floating bike routing. | ✓️ | | +| `GtfsGraphQlApi` | Enable the [GTFS GraphQL API](apis/GTFS-GraphQL-API.md). | ✓️ | | +| `GtfsGraphQlApiRentalStationFuzzyMatching` | Does vehicleRentalStation query also allow ids that are not feed scoped. | | | +| `MinimumTransferTimeIsDefinitive` | If the minimum transfer time is a lower bound (default) or the definitive time for the transfer. Set this to `true` if you want to set a transfer time lower than what OTP derives from OSM data. | | | +| `OptimizeTransfers` | OTP will inspect all itineraries found and optimize where (which stops) the transfer will happen. Waiting time, priority and guaranteed transfers are taken into account. | ✓️ | | +| `ParallelRouting` | Enable performing parts of the trip planning in parallel. | | | +| `TransferConstraints` | Enforce transfers to happen according to the _transfers.txt_ (GTFS) and Interchanges (NeTEx). Turning this _off_ will increase the routing performance a little. | ✓️ | | +| `TransmodelGraphQlApi` | Enable the [Transmodel (NeTEx) GraphQL API](apis/TransmodelApi.md). | ✓️ | ✓️ | +| `ActuatorAPI` | Endpoint for actuators (service health status). | | ✓️ | +| `AsyncGraphQLFetchers` | Whether the @async annotation in the GraphQL schema should lead to the fetch being executed asynchronously. This allows batch or alias queries to run in parallel at the cost of consuming extra threads. | | | +| `Co2Emissions` | Enable the emissions sandbox module. | | ✓️ | +| `DataOverlay` | Enable usage of data overlay when calculating costs for the street network. | | ✓️ | +| `FaresV2` | Enable import of GTFS-Fares v2 data. | | ✓️ | +| `FlexRouting` | Enable FLEX routing. | | ✓️ | +| `GoogleCloudStorage` | Enable Google Cloud Storage integration. | | ✓️ | +| `LegacyRestApi` | Enable legacy REST API. This API will be removed in the future. | | ✓️ | +| `MultiCriteriaGroupMaxFilter` | Keep the best itinerary with respect to each criteria used in the transit-routing search. For example the itinerary with the lowest cost, fewest transfers, and each unique transit-group (transit-group-priority) is kept, even if the max-limit is exceeded. This is turned off by default for now, until this feature is well tested. | | | +| `RealtimeResolver` | When routing with ignoreRealtimeUpdates=true, add an extra step which populates results with real-time data | | ✓️ | +| `ReportApi` | Enable the report API. | | ✓️ | +| `RestAPIPassInDefaultConfigAsJson` | Enable a default RouteRequest to be passed in as JSON on the REST API - FOR DEBUGGING ONLY! | | | +| `SandboxAPIGeocoder` | Enable the Geocoder API. | | ✓️ | +| `SandboxAPIMapboxVectorTilesApi` | Enable Mapbox vector tiles API. | | ✓️ | +| `SandboxAPIParkAndRideApi` | Enable park-and-ride endpoint. | | ✓️ | +| `Sorlandsbanen` | Include train Sørlandsbanen in results when searching in south of Norway. Only relevant in Norway. | | ✓️ | +| `TransferAnalyzer` | Analyze transfers during graph build. | | ✓️ | From ce7b183f5c77d86d1e921d893ab2fbcd8ee94912 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Thu, 14 Nov 2024 15:03:46 +0100 Subject: [PATCH 082/169] Fix typo [ci skip] --- doc/user/IslandPruning.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/IslandPruning.md b/doc/user/IslandPruning.md index 5717adb9ca4..6570d36041a 100644 --- a/doc/user/IslandPruning.md +++ b/doc/user/IslandPruning.md @@ -38,7 +38,7 @@ to have the same access properties. ![](images/nothruisland.png) *Some regular (gray colored) streets are blocked behind access restricted (red colored) connections. Walk routing to them fails because it would be considered as pass through traffic. -The image on the right shows that pruning added walk nothrough restricition to those streets, and routing works again.* +The image on the right shows that pruning added walk nothrough restriction to those streets, and routing works again.* ## Pruning algorithm From 2a7c4c59302df938dea25891784f779c184d5b33 Mon Sep 17 00:00:00 2001 From: Zsombor Welker Date: Thu, 14 Nov 2024 10:51:55 +0100 Subject: [PATCH 083/169] Set transit-group-priority for requests without via points --- .../transit/mappers/RaptorRequestMapper.java | 10 ++++-- .../mappers/RaptorRequestMapperTest.java | 32 +++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapper.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapper.java index ff0855f0128..8de3a16553d 100644 --- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapper.java +++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapper.java @@ -199,11 +199,17 @@ private RaptorRequest doMap() { } private boolean hasPassThroughOnly() { - return request.getViaLocations().stream().allMatch(ViaLocation::isPassThroughLocation); + return ( + request.isViaSearch() && + request.getViaLocations().stream().allMatch(ViaLocation::isPassThroughLocation) + ); } private boolean hasViaLocationsOnly() { - return request.getViaLocations().stream().noneMatch(ViaLocation::isPassThroughLocation); + return ( + request.isViaSearch() && + request.getViaLocations().stream().noneMatch(ViaLocation::isPassThroughLocation) + ); } private boolean hasViaLocationsAndPassThroughLocations() { diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java index 03027b219d1..e9b235c1c3e 100644 --- a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java @@ -1,6 +1,7 @@ package org.opentripplanner.routing.algorithm.raptoradapter.transit.mappers; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import java.time.Duration; @@ -90,6 +91,37 @@ void testPassThroughPoints() { ); } + @Test + void testTransitGroupPriority() { + var req = new RouteRequest(); + + // Set relax transit-group-priority + req.withPreferences(p -> + p.withTransit(t -> t.withRelaxTransitGroupPriority(CostLinearFunction.of("30m + 1.2t"))) + ); + + var result = map(req); + + assertFalse(result.multiCriteria().transitPriorityCalculator().isEmpty()); + } + + @Test + void testVisitViaAllowsTransitGroupPriority() { + var req = new RouteRequest(); + + // Set visit-via and relax transit-group-priority + req.setViaLocations( + List.of(new VisitViaLocation("Via A", null, List.of(STOP_A.getId()), List.of())) + ); + req.withPreferences(p -> + p.withTransit(t -> t.withRelaxTransitGroupPriority(CostLinearFunction.of("30m + 1.2t"))) + ); + + var result = map(req); + + assertFalse(result.multiCriteria().transitPriorityCalculator().isEmpty()); + } + @Test void testPassThroughPointsTurnTransitGroupPriorityOff() { var req = new RouteRequest(); From 463973417a882a78218a580e72f554f2c5c0af03 Mon Sep 17 00:00:00 2001 From: Zsombor Welker Date: Wed, 6 Nov 2024 17:02:58 +0100 Subject: [PATCH 084/169] Add CAR_PICKUP snapshot test --- .../mapping/CarPickupSnapshotTest.java | 71 + .../__snapshots__/CarPickupSnapshotTest.snap | 3069 +++++++++++++++++ 2 files changed, 3140 insertions(+) create mode 100644 application/src/test/java/org/opentripplanner/routing/algorithm/mapping/CarPickupSnapshotTest.java create mode 100644 application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/CarPickupSnapshotTest.snap diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/CarPickupSnapshotTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/CarPickupSnapshotTest.java new file mode 100644 index 00000000000..c233d0c6bbc --- /dev/null +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/CarPickupSnapshotTest.java @@ -0,0 +1,71 @@ +package org.opentripplanner.routing.algorithm.mapping; + +import au.com.origin.snapshots.junit5.SnapshotExtension; +import java.util.List; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.opentripplanner.model.GenericLocation; +import org.opentripplanner.model.modes.ExcludeAllTransitFilter; +import org.opentripplanner.routing.api.request.RouteRequest; +import org.opentripplanner.routing.api.request.StreetMode; +import org.opentripplanner.routing.api.request.request.filter.AllowAllTransitFilter; + +@ExtendWith(SnapshotExtension.class) +public class CarPickupSnapshotTest extends SnapshotTestBase { + + static GenericLocation p0 = new GenericLocation( + "SE Stark St. & SE 17th Ave. (P0)", + null, + 45.519320, + -122.648567 + ); + + static GenericLocation p1 = new GenericLocation( + "SE Morrison St. & SE 17th Ave. (P1)", + null, + 45.51726, + -122.64847 + ); + + static GenericLocation p2 = new GenericLocation( + "NW Northrup St. & NW 22nd Ave. (P2)", + null, + 45.53122, + -122.69659 + ); + + @BeforeAll + public static void beforeClass() { + loadGraphBeforeClass(false); + } + + @Test + public void test_trip_planning_with_car_pickup_only() { + RouteRequest request = createTestRequest(2009, 11, 17, 10, 0, 0); + + request.journey().direct().setMode(StreetMode.CAR_PICKUP); + request.journey().transit().setFilters(List.of(ExcludeAllTransitFilter.of())); + + request.setFrom(p0); + request.setTo(p2); + + expectRequestResponseToMatchSnapshot(request); + } + + @Test + public void test_trip_planning_with_car_pickup_transfer() { + RouteRequest request = createTestRequest(2009, 11, 17, 10, 0, 0); + + request.journey().access().setMode(StreetMode.WALK); + request.journey().egress().setMode(StreetMode.WALK); + request.journey().direct().setMode(StreetMode.WALK); + request.journey().transfer().setMode(StreetMode.CAR_PICKUP); + request.journey().transit().setFilters(List.of(AllowAllTransitFilter.of())); + + request.setFrom(p0); + request.setTo(p2); + + expectRequestResponseToMatchSnapshot(request); + } +} diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/CarPickupSnapshotTest.snap b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/CarPickupSnapshotTest.snap new file mode 100644 index 00000000000..c5f77a95b3f --- /dev/null +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/CarPickupSnapshotTest.snap @@ -0,0 +1,3069 @@ +org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_planning_with_car_pickup_only=[ + [ + { + "arrivedAtDestinationWithRentedBicycle" : false, + "duration" : 634, + "elevationGained" : 0.0, + "elevationLost" : 0.0, + "endTime" : "2009-11-17T18:10:34.000+00:00", + "fare" : { + "details" : { }, + "fare" : { } + }, + "generalizedCost" : 1005, + "legs" : [ + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 5050.5, + "endTime" : "2009-11-17T18:10:34.000+00:00", + "from" : { + "departure" : "2009-11-17T18:00:00.000+00:00", + "lat" : 45.51932, + "lon" : -122.648567, + "name" : "SE Stark St. & SE 17th Ave. (P0)", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 1005, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 200, + "points" : "unytGpxqkVA??dACpB@P?f@?p@?j@?dAAhE?jE?vD?PK?aC?{BAS?mC??hE?nEAfE?hE?hEAnC?^?Z?pB?J?~@?J}B?O?OAo@?A?w@?U?S?iB?O??Z?xC?XAJ?P?R@H@FBFBFBDDDBBDBF@F?d@@H@D@FBFD@BBDBF@H@L?L?b@@RBTGpJCjEA|CArAAxAAxAAdBEzHClF?@Ax@GTAjBAZQ?qBBuA@Y@[@aCDM@K?aCBCV@pCDZ@|D@N@vD?L?F?JBbD?D?N?BK?uBBM?K?uBBI@K?aBBSAM@M@K?GBEDEHIJUX_@f@KNQRSVGFCBQPIHGDGBIBK@W@a@?mA@E?C@C@A?CBQTKJEHIJeC~CYZo@v@g@d@IJAFAD?L@vC@hB@p@?X?T@P?N@P@nA?j@AX?L@`B@dA?R?RBbD?T?NBbD?R?P@|D@jB?x@@J?N?B?P?LBjD@N@fD?T?LBdD?R?PF`K?RDlJ?R?PFlJ?J" + }, + "mode" : "CAR", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:00:00.000+00:00", + "steps" : [ + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 0.69, + "elevation" : "", + "lat" : 45.51932, + "lon" : -122.6485648, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Southeast 17th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 395.42, + "elevation" : "", + "lat" : 45.5193262, + "lon" : -122.6485648, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southeast Stark Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 238.05, + "elevation" : "", + "lat" : 45.5193421, + "lon" : -122.6536397, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast 12th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 553.35, + "elevation" : "", + "lat" : 45.5214829, + "lon" : -122.6536226, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southeast Ash Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 158.48, + "elevation" : "", + "lat" : 45.5215062, + "lon" : -122.6607251, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast Grand Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 78.88, + "elevation" : "", + "lat" : 45.5229315, + "lon" : -122.6607174, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Northeast Grand Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 168.84, + "elevation" : "", + "lat" : 45.5236409, + "lon" : -122.6607123, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Northeast Couch Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "SOUTHWEST", + "area" : false, + "bogusName" : false, + "distance" : 64.13, + "elevation" : "", + "lat" : 45.5231423, + "lon" : -122.6623136, + "relativeDirection" : "SLIGHTLY_RIGHT", + "stayOn" : true, + "streetName" : "Northeast Couch Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 144.26, + "elevation" : "", + "lat" : 45.522964, + "lon" : -122.6630306, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "East Burnside Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 407.38, + "elevation" : "", + "lat" : 45.523001, + "lon" : -122.6648816, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Burnside Bridge", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 178.19, + "elevation" : "", + "lat" : 45.5231054, + "lon" : -122.6701087, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "West Burnside Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 310.7, + "elevation" : "", + "lat" : 45.5231958, + "lon" : -122.6723802, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest 2nd Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 317.18, + "elevation" : "", + "lat" : 45.5259887, + "lon" : -122.6724927, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Northwest Flanders Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 238.16, + "elevation" : "", + "lat" : 45.5259105, + "lon" : -122.6765581, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest 6th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 465.44, + "elevation" : "", + "lat" : 45.5280515, + "lon" : -122.6766232, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Northwest Station Way", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 1331.38, + "elevation" : "", + "lat" : 45.5315452, + "lon" : -122.679511, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Northwest Northrup Street", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:10:34.000+00:00", + "lat" : 45.53122, + "lon" : -122.69659, + "name" : "NW Northrup St. & NW 22nd Ave. (P2)", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + } + ], + "startTime" : "2009-11-17T18:00:00.000+00:00", + "tooSloped" : false, + "transfers" : 0, + "transitTime" : 0, + "waitingTime" : 0, + "walkDistance" : 5050.5, + "walkLimitExceeded" : false, + "walkTime" : 634 + } + ] +] + + +org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_planning_with_car_pickup_transfer=[ + [ + { + "arrivedAtDestinationWithRentedBicycle" : false, + "duration" : 3804, + "elevationGained" : 0.0, + "elevationLost" : 0.0, + "endTime" : "2009-11-17T19:03:24.000+00:00", + "fare" : { + "details" : { }, + "fare" : { } + }, + "generalizedCost" : 7384, + "legs" : [ + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 4875.79, + "endTime" : "2009-11-17T19:03:24.000+00:00", + "from" : { + "departure" : "2009-11-17T18:00:00.000+00:00", + "lat" : 45.51932, + "lon" : -122.648567, + "name" : "SE Stark St. & SE 17th Ave. (P0)", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 7384, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 252, + "points" : "unytGpxqkVA??dACpB@P?f@?p@?j@?dAAhE?jE?vD?P?RK?GFCDCFADABADADAF?D?FADCF?B?B?@?D@DADABCBC?A?C?AA??GICAAAA?A?A?AACAC?A@ABABC@CDCBCBC@CBABABCJ?J?@?@MR?hE?fEAdB?dB?lE?`A?T?pBA|D?J?x@?r@y@??bBuA?y@AU?{@?O?}@?E?y@?_@Aa@?u@?W??J@N?hA@x@Ap@ATETGpJCjEA|CArAAxAAxAAdBEzHClF?@Ax@GTAjBAZ?R@hC@h@Q@cBBM?M?_CDsA@Y?Q@O?K?Q?mBB[?C?W@[?]@E?IDI@]DO@SBM?S@G@A?GDEJQ|@AL?L@nA?j@@L?V?d@@~@@NI?E?W@Q?Q?m@@Q@AF?DAJBzB?V?NANM@K?GBEDEHIJUX_@f@KNQRSVGFCBQPIHGDGBIBK@W@a@?mA@E?C@C@A?CBQTKJEHIJeC~CYZo@v@g@d@IJAFAD?L@vC@hB@p@?X?T@P?N@P@nA?j@AX?L@`B@dA?R?RBbD?T?NBbD?R?P@|D@jB?x@@J?N?B?P?LBjD@N@fD?T?LBdD?R?PF`K?RDlJ?R?PFlJ?J" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:00:00.000+00:00", + "steps" : [ + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 0.69, + "elevation" : "", + "lat" : 45.51932, + "lon" : -122.6485648, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Southeast 17th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 402.49, + "elevation" : "", + "lat" : 45.5193262, + "lon" : -122.6485648, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southeast Stark Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : true, + "distance" : 131.76, + "elevation" : "", + "lat" : 45.5193421, + "lon" : -122.6537305, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "path", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 516.5, + "elevation" : "", + "lat" : 45.5200623, + "lon" : -122.6546522, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southeast Oak Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : true, + "distance" : 70.84, + "elevation" : "", + "lat" : 45.5200842, + "lon" : -122.6612814, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "parking aisle", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 284.75, + "elevation" : "", + "lat" : 45.5203736, + "lon" : -122.661783, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast Martin Luther King, Junior Boulevard", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 243.45, + "elevation" : "", + "lat" : 45.5229343, + "lon" : -122.6617665, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "East Burnside Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 407.38, + "elevation" : "", + "lat" : 45.523001, + "lon" : -122.6648816, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Burnside Bridge", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 256.85, + "elevation" : "", + "lat" : 45.5231054, + "lon" : -122.6701087, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "West Burnside Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 460.65, + "elevation" : "", + "lat" : 45.5231776, + "lon" : -122.6733895, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest 3rd Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 145.82, + "elevation" : "", + "lat" : 45.5272866, + "lon" : -122.6737165, + "relativeDirection" : "SLIGHTLY_LEFT", + "stayOn" : false, + "streetName" : "Northwest Hoyt Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 77.35, + "elevation" : "", + "lat" : 45.5273496, + "lon" : -122.6755629, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest 5th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 80.53, + "elevation" : "", + "lat" : 45.5280449, + "lon" : -122.6755935, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Northwest Irving Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 465.44, + "elevation" : "", + "lat" : 45.5280515, + "lon" : -122.6766232, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest Station Way", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 1331.38, + "elevation" : "", + "lat" : 45.5315452, + "lon" : -122.679511, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Northwest Northrup Street", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T19:03:24.000+00:00", + "lat" : 45.53122, + "lon" : -122.69659, + "name" : "NW Northrup St. & NW 22nd Ave. (P2)", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + } + ], + "startTime" : "2009-11-17T18:00:00.000+00:00", + "tooSloped" : false, + "transfers" : 0, + "transitTime" : 0, + "waitingTime" : 0, + "walkDistance" : 4875.79, + "walkLimitExceeded" : false, + "walkTime" : 3804 + }, + { + "arrivedAtDestinationWithRentedBicycle" : false, + "duration" : 2077, + "elevationGained" : 0.0, + "elevationLost" : 0.0, + "endTime" : "2009-11-17T18:38:41.000+00:00", + "fare" : { + "details" : { }, + "fare" : { }, + "legProducts" : [ + { + "legIndices" : [ + 1 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] + } + ] + }, + "generalizedCost" : 3914, + "legs" : [ + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 673.56, + "endTime" : "2009-11-17T18:12:58.000+00:00", + "from" : { + "departure" : "2009-11-17T18:04:04.000+00:00", + "lat" : 45.51932, + "lon" : -122.648567, + "name" : "SE Stark St. & SE 17th Ave. (P0)", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 1031, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 42, + "points" : "unytGpxqkVA??dACpB@PoC?_CAM?aC??A?A?A?A??AA?AAA??AAA???A?A?A???A@A??@A@?@??A@?@?BcC?mCAmCAmC?QBIYIWOH" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:04:04.000+00:00", + "steps" : [ + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 0.69, + "elevation" : "", + "lat" : 45.51932, + "lon" : -122.6485648, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Southeast 17th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 79.12, + "elevation" : "", + "lat" : 45.5193262, + "lon" : -122.6485648, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southeast Stark Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 402.13, + "elevation" : "", + "lat" : 45.5193388, + "lon" : -122.6495798, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast 16th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 168.89, + "elevation" : "", + "lat" : 45.5228912, + "lon" : -122.6495528, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Northeast 16th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTHEAST", + "area" : false, + "bogusName" : false, + "distance" : 22.74, + "elevation" : "", + "lat" : 45.524409, + "lon" : -122.6495675, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northeast Sandy Boulevard", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:12:58.000+00:00", + "departure" : "2009-11-17T18:12:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 3602.73, + "endTime" : "2009-11-17T18:25:49.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:12:58.000+00:00", + "departure" : "2009-11-17T18:12:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", + "stopIndex" : 92, + "stopSequence" : 93, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 1371, + "headsign" : "Beaverton TC", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ + { + "arrival" : "2009-11-17T18:13:32.000+00:00", + "departure" : "2009-11-17T18:13:32.000+00:00", + "lat" : 45.523767, + "lon" : -122.651428, + "name" : "NE Sandy & 14th", + "stopCode" : "5058", + "stopId" : "prt:5058", + "stopIndex" : 93, + "stopSequence" : 94, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:14:00.000+00:00", + "departure" : "2009-11-17T18:14:00.000+00:00", + "lat" : 45.523103, + "lon" : -122.653064, + "name" : "NE Sandy & 12th", + "stopCode" : "5055", + "stopId" : "prt:5055", + "stopIndex" : 94, + "stopSequence" : 95, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:14:47.000+00:00", + "departure" : "2009-11-17T18:14:47.000+00:00", + "lat" : 45.523024, + "lon" : -122.656526, + "name" : "E Burnside & NE 9th", + "stopCode" : "819", + "stopId" : "prt:819", + "stopIndex" : 95, + "stopSequence" : 96, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:15:24.000+00:00", + "departure" : "2009-11-17T18:15:24.000+00:00", + "lat" : 45.523012, + "lon" : -122.659365, + "name" : "E Burnside & NE 6th", + "stopCode" : "805", + "stopId" : "prt:805", + "stopIndex" : 96, + "stopSequence" : 97, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:15:52.000+00:00", + "departure" : "2009-11-17T18:15:52.000+00:00", + "lat" : 45.523015, + "lon" : -122.661534, + "name" : "E Burnside & NE M L King", + "stopCode" : "705", + "stopId" : "prt:705", + "stopIndex" : 97, + "stopSequence" : 98, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:18:00.000+00:00", + "departure" : "2009-11-17T18:18:00.000+00:00", + "lat" : 45.523249, + "lon" : -122.671269, + "name" : "W Burnside & Burnside Bridge", + "stopCode" : "689", + "stopId" : "prt:689", + "stopIndex" : 98, + "stopSequence" : 99, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:19:00.000+00:00", + "departure" : "2009-11-17T18:19:00.000+00:00", + "lat" : 45.523169, + "lon" : -122.675893, + "name" : "W Burnside & NW 5th", + "stopCode" : "782", + "stopId" : "prt:782", + "stopIndex" : 99, + "stopSequence" : 100, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:20:17.000+00:00", + "departure" : "2009-11-17T18:20:17.000+00:00", + "lat" : 45.523115, + "lon" : -122.678939, + "name" : "W Burnside & NW Park", + "stopCode" : "716", + "stopId" : "prt:716", + "stopIndex" : 100, + "stopSequence" : 101, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:21:25.000+00:00", + "departure" : "2009-11-17T18:21:25.000+00:00", + "lat" : 45.523048, + "lon" : -122.681606, + "name" : "W Burnside & NW 10th", + "stopCode" : "10791", + "stopId" : "prt:10791", + "stopIndex" : 101, + "stopSequence" : 102, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:22:14.000+00:00", + "departure" : "2009-11-17T18:22:14.000+00:00", + "lat" : 45.523, + "lon" : -122.683535, + "name" : "W Burnside & NW 12th", + "stopCode" : "11032", + "stopId" : "prt:11032", + "stopIndex" : 102, + "stopSequence" : 103, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:24:09.000+00:00", + "departure" : "2009-11-17T18:24:09.000+00:00", + "lat" : 45.522985, + "lon" : -122.688091, + "name" : "W Burnside & NW 17th", + "stopCode" : "10809", + "stopId" : "prt:10809", + "stopIndex" : 103, + "stopSequence" : 104, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:25:00.000+00:00", + "departure" : "2009-11-17T18:25:00.000+00:00", + "lat" : 45.523097, + "lon" : -122.690083, + "name" : "W Burnside & NW 19th", + "stopCode" : "735", + "stopId" : "prt:735", + "stopIndex" : 104, + "stopSequence" : 105, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:25:21.000+00:00", + "departure" : "2009-11-17T18:25:21.000+00:00", + "lat" : 45.523176, + "lon" : -122.692139, + "name" : "W Burnside & NW 20th", + "stopCode" : "741", + "stopId" : "prt:741", + "stopIndex" : 105, + "stopSequence" : 106, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:25:31.000+00:00", + "departure" : "2009-11-17T18:25:31.000+00:00", + "lat" : 45.52322, + "lon" : -122.69313, + "name" : "W Burnside & NW 20th Pl", + "stopCode" : "742", + "stopId" : "prt:742", + "stopIndex" : 106, + "stopSequence" : 107, + "vertexType" : "TRANSIT", + "zoneId" : "1" + } + ], + "legGeometry" : { + "length" : 94, + "points" : "coztGd}qkVNl@r@`CZhA`A`D??Ph@l@tBb@rARh@Pd@???BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB" + }, + "mode" : "BUS", + "pathway" : false, + "realTime" : false, + "route" : "Burnside/Stark", + "routeId" : "prt:20", + "routeLongName" : "Burnside/Stark", + "routeShortName" : "20", + "routeType" : 3, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:12:58.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:25:49.000+00:00", + "departure" : "2009-11-17T18:25:49.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "stopIndex" : 107, + "stopSequence" : 108, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : true, + "tripBlockId" : "2002", + "tripId" : "prt:200W1200" + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 999.1, + "endTime" : "2009-11-17T18:38:41.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:25:49.000+00:00", + "departure" : "2009-11-17T18:25:49.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 1511, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 29, + "points" : "ugztGdzzkVL?ATClAI|DK?G?mCBkCDoCDmCBoCDkCBoCB[?sBD]?Y@eA@K?C?K?W@{A@M@C@I?_CB?G" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:25:49.000+00:00", + "steps" : [ + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 113.27, + "elevation" : "", + "lat" : 45.5232491, + "lon" : -122.6949067, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "West Burnside Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 882.16, + "elevation" : "", + "lat" : 45.5233204, + "lon" : -122.696357, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest 22nd Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "EAST", + "area" : false, + "bogusName" : false, + "distance" : 3.68, + "elevation" : "", + "lat" : 45.5312508, + "lon" : -122.6966386, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest Northrup Street", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:38:41.000+00:00", + "lat" : 45.53122, + "lon" : -122.69659, + "name" : "NW Northrup St. & NW 22nd Ave. (P2)", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + } + ], + "startTime" : "2009-11-17T18:04:04.000+00:00", + "tooSloped" : false, + "transfers" : 0, + "transitTime" : 771, + "waitingTime" : 0, + "walkDistance" : 1672.66, + "walkLimitExceeded" : false, + "walkTime" : 1306 + }, + { + "arrivedAtDestinationWithRentedBicycle" : false, + "duration" : 1646, + "elevationGained" : 0.0, + "elevationLost" : 0.0, + "endTime" : "2009-11-17T18:39:22.000+00:00", + "fare" : { + "details" : { }, + "fare" : { }, + "legProducts" : [ + { + "legIndices" : [ + 1 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] + } + ] + }, + "generalizedCost" : 2662, + "legs" : [ + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 290.72, + "endTime" : "2009-11-17T18:15:40.000+00:00", + "from" : { + "departure" : "2009-11-17T18:11:56.000+00:00", + "lat" : 45.51932, + "lon" : -122.648567, + "name" : "SE Stark St. & SE 17th Ave. (P0)", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 442, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 6, + "points" : "unytGpxqkVjC?lC@nC@?fCG?" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:11:56.000+00:00", + "steps" : [ + { + "absoluteDirection" : "SOUTH", + "area" : false, + "bogusName" : false, + "distance" : 237.26, + "elevation" : "", + "lat" : 45.51932, + "lon" : -122.6485648, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Southeast 17th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 53.47, + "elevation" : "", + "lat" : 45.5171863, + "lon" : -122.6485801, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast Morrison Street", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:15:40.000+00:00", + "departure" : "2009-11-17T18:15:40.000+00:00", + "lat" : 45.517226, + "lon" : -122.649266, + "name" : "SE Morrison & 16th", + "stopCode" : "4019", + "stopId" : "prt:4019", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 5218.86, + "endTime" : "2009-11-17T18:35:54.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:15:40.000+00:00", + "departure" : "2009-11-17T18:15:40.000+00:00", + "lat" : 45.517226, + "lon" : -122.649266, + "name" : "SE Morrison & 16th", + "stopCode" : "4019", + "stopId" : "prt:4019", + "stopIndex" : 50, + "stopSequence" : 51, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 1814, + "headsign" : "Montgomery Park", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ + { + "arrival" : "2009-11-17T18:16:15.000+00:00", + "departure" : "2009-11-17T18:16:15.000+00:00", + "lat" : 45.517253, + "lon" : -122.651354, + "name" : "SE Morrison & 14th", + "stopCode" : "4016", + "stopId" : "prt:4016", + "stopIndex" : 51, + "stopSequence" : 52, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:17:00.000+00:00", + "departure" : "2009-11-17T18:17:00.000+00:00", + "lat" : 45.517299, + "lon" : -122.654067, + "name" : "SE Morrison & 12th", + "stopCode" : "4014", + "stopId" : "prt:4014", + "stopIndex" : 52, + "stopSequence" : 53, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:17:38.000+00:00", + "departure" : "2009-11-17T18:17:38.000+00:00", + "lat" : 45.517292, + "lon" : -122.656563, + "name" : "SE Morrison & 9th", + "stopCode" : "4026", + "stopId" : "prt:4026", + "stopIndex" : 53, + "stopSequence" : 54, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:18:08.000+00:00", + "departure" : "2009-11-17T18:18:08.000+00:00", + "lat" : 45.517322, + "lon" : -122.65847, + "name" : "SE Morrison & 7th", + "stopCode" : "4025", + "stopId" : "prt:4025", + "stopIndex" : 54, + "stopSequence" : 55, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:18:39.000+00:00", + "departure" : "2009-11-17T18:18:39.000+00:00", + "lat" : 45.517298, + "lon" : -122.660523, + "name" : "SE Morrison & Grand", + "stopCode" : "4013", + "stopId" : "prt:4013", + "stopIndex" : 55, + "stopSequence" : 56, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:20:03.000+00:00", + "departure" : "2009-11-17T18:20:03.000+00:00", + "lat" : 45.517351, + "lon" : -122.66601, + "name" : "Morrison Bridge", + "stopCode" : "4029", + "stopId" : "prt:4029", + "stopIndex" : 56, + "stopSequence" : 57, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:22:27.000+00:00", + "departure" : "2009-11-17T18:22:27.000+00:00", + "lat" : 45.51959, + "lon" : -122.674599, + "name" : "SW Washington & 3rd", + "stopCode" : "6158", + "stopId" : "prt:6158", + "stopIndex" : 57, + "stopSequence" : 58, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:23:00.000+00:00", + "departure" : "2009-11-17T18:23:00.000+00:00", + "lat" : 45.520129, + "lon" : -122.676635, + "name" : "SW Washington & 5th", + "stopCode" : "6160", + "stopId" : "prt:6160", + "stopIndex" : 58, + "stopSequence" : 59, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:23:52.000+00:00", + "departure" : "2009-11-17T18:23:52.000+00:00", + "lat" : 45.520695, + "lon" : -122.678657, + "name" : "SW Washington & Broadway", + "stopCode" : "6137", + "stopId" : "prt:6137", + "stopIndex" : 59, + "stopSequence" : 60, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:24:34.000+00:00", + "departure" : "2009-11-17T18:24:34.000+00:00", + "lat" : 45.521124, + "lon" : -122.6803, + "name" : "SW Washington & 9th", + "stopCode" : "6169", + "stopId" : "prt:6169", + "stopIndex" : 60, + "stopSequence" : 61, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:25:47.000+00:00", + "departure" : "2009-11-17T18:25:47.000+00:00", + "lat" : 45.521094, + "lon" : -122.682819, + "name" : "SW 11th & Alder", + "stopCode" : "9600", + "stopId" : "prt:9600", + "stopIndex" : 61, + "stopSequence" : 62, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:26:36.000+00:00", + "departure" : "2009-11-17T18:26:36.000+00:00", + "lat" : 45.52055, + "lon" : -122.683933, + "name" : "SW Morrison & 12th", + "stopCode" : "9598", + "stopId" : "prt:9598", + "stopIndex" : 62, + "stopSequence" : 63, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:27:25.000+00:00", + "departure" : "2009-11-17T18:27:25.000+00:00", + "lat" : 45.521063, + "lon" : -122.685848, + "name" : "SW Morrison & 14th", + "stopCode" : "9708", + "stopId" : "prt:9708", + "stopIndex" : 63, + "stopSequence" : 64, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:28:18.000+00:00", + "departure" : "2009-11-17T18:28:18.000+00:00", + "lat" : 45.521641, + "lon" : -122.687932, + "name" : "SW Morrison & 16th", + "stopCode" : "9613", + "stopId" : "prt:9613", + "stopIndex" : 64, + "stopSequence" : 65, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:29:00.000+00:00", + "departure" : "2009-11-17T18:29:00.000+00:00", + "lat" : 45.52206, + "lon" : -122.689577, + "name" : "SW Morrison & 17th", + "stopCode" : "9599", + "stopId" : "prt:9599", + "stopIndex" : 65, + "stopSequence" : 66, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:29:54.000+00:00", + "departure" : "2009-11-17T18:29:54.000+00:00", + "lat" : 45.523097, + "lon" : -122.690083, + "name" : "W Burnside & NW 19th", + "stopCode" : "735", + "stopId" : "prt:735", + "stopIndex" : 66, + "stopSequence" : 67, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:30:31.000+00:00", + "departure" : "2009-11-17T18:30:31.000+00:00", + "lat" : 45.523176, + "lon" : -122.692139, + "name" : "W Burnside & NW 20th", + "stopCode" : "741", + "stopId" : "prt:741", + "stopIndex" : 67, + "stopSequence" : 68, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:30:48.000+00:00", + "departure" : "2009-11-17T18:30:48.000+00:00", + "lat" : 45.52322, + "lon" : -122.69313, + "name" : "W Burnside & NW 20th Pl", + "stopCode" : "742", + "stopId" : "prt:742", + "stopIndex" : 68, + "stopSequence" : 69, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:31:20.000+00:00", + "departure" : "2009-11-17T18:31:20.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "stopIndex" : 69, + "stopSequence" : 70, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:32:18.000+00:00", + "departure" : "2009-11-17T18:32:18.000+00:00", + "lat" : 45.523512, + "lon" : -122.698081, + "name" : "W Burnside & NW 23rd", + "stopCode" : "755", + "stopId" : "prt:755", + "stopIndex" : 70, + "stopSequence" : 71, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:33:11.000+00:00", + "departure" : "2009-11-17T18:33:11.000+00:00", + "lat" : 45.525416, + "lon" : -122.698381, + "name" : "NW 23rd & Flanders", + "stopCode" : "7157", + "stopId" : "prt:7157", + "stopIndex" : 71, + "stopSequence" : 72, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:34:05.000+00:00", + "departure" : "2009-11-17T18:34:05.000+00:00", + "lat" : 45.527543, + "lon" : -122.698473, + "name" : "NW 23rd & Irving", + "stopCode" : "7161", + "stopId" : "prt:7161", + "stopIndex" : 72, + "stopSequence" : 73, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:35:00.000+00:00", + "departure" : "2009-11-17T18:35:00.000+00:00", + "lat" : 45.529681, + "lon" : -122.698529, + "name" : "NW 23rd & Lovejoy", + "stopCode" : "7163", + "stopId" : "prt:7163", + "stopIndex" : 73, + "stopSequence" : 74, + "vertexType" : "TRANSIT", + "zoneId" : "1" + } + ], + "legGeometry" : { + "length" : 135, + "points" : "kaytG||qkVA~@?jE?tC???r@AhE?jE?rA???tBAjE?nD???X?hE?xC??Ah@?pE?~C???J?`@?vAAvBEbE?jEAlE?`BAbB@d@??@tAAj@Cx@Cb@Cp@_@dEcAtFoA`IS~@i@`BmAzDi@zAc@pAi@~C??Id@u@jEm@bD??If@u@jEk@bD??If@u@|DW`B??CPs@|Du@lElBz@??VJbCfAk@dD??Id@w@rEWvAId@AF??Q~@s@`Ei@~C??Ib@u@dEWzA??]jB]MQSe@WOKOKIIQe@GWE]GnD??AXKnEGnD???XGjD??AZEfCC`AEzB??AXCfAGxDE|AEtBIlC??APkAh@o@?sCB{BD??S?mCDmCDyBB??U?mCDmCDyBB??S?oCDmCDmCBo@@" + }, + "mode" : "BUS", + "pathway" : false, + "realTime" : false, + "route" : "Belmont/NW 23rd", + "routeId" : "prt:15", + "routeLongName" : "Belmont/NW 23rd", + "routeShortName" : "15", + "routeType" : 3, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:15:40.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:35:54.000+00:00", + "departure" : "2009-11-17T18:35:54.000+00:00", + "lat" : 45.532159, + "lon" : -122.698634, + "name" : "NW 23rd & Overton", + "stopCode" : "8981", + "stopId" : "prt:8981", + "stopIndex" : 74, + "stopSequence" : 75, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : true, + "tripBlockId" : "1549", + "tripId" : "prt:150W1400" + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 266.21, + "endTime" : "2009-11-17T18:39:22.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:35:54.000+00:00", + "departure" : "2009-11-17T18:35:54.000+00:00", + "lat" : 45.532159, + "lon" : -122.698634, + "name" : "NW 23rd & Overton", + "stopCode" : "8981", + "stopId" : "prt:8981", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 405, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 13, + "points" : "}~{tGnq{kV?LVAF?J?L?rBCLA?Q?EAyAEcH?G" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:35:54.000+00:00", + "steps" : [ + { + "absoluteDirection" : "SOUTH", + "area" : false, + "bogusName" : false, + "distance" : 104.46, + "elevation" : "", + "lat" : 45.5321578, + "lon" : -122.6987026, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Northwest 23rd Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "EAST", + "area" : false, + "bogusName" : false, + "distance" : 161.77, + "elevation" : "", + "lat" : 45.5312188, + "lon" : -122.6986675, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Northwest Northrup Street", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:39:22.000+00:00", + "lat" : 45.53122, + "lon" : -122.69659, + "name" : "NW Northrup St. & NW 22nd Ave. (P2)", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + } + ], + "startTime" : "2009-11-17T18:11:56.000+00:00", + "tooSloped" : false, + "transfers" : 0, + "transitTime" : 1214, + "waitingTime" : 0, + "walkDistance" : 556.93, + "walkLimitExceeded" : false, + "walkTime" : 432 + }, + { + "arrivedAtDestinationWithRentedBicycle" : false, + "duration" : 2091, + "elevationGained" : 0.0, + "elevationLost" : 0.0, + "endTime" : "2009-11-17T18:53:55.000+00:00", + "fare" : { + "details" : { }, + "fare" : { }, + "legProducts" : [ + { + "legIndices" : [ + 1 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] + } + ] + }, + "generalizedCost" : 3928, + "legs" : [ + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 673.56, + "endTime" : "2009-11-17T18:27:58.000+00:00", + "from" : { + "departure" : "2009-11-17T18:19:04.000+00:00", + "lat" : 45.51932, + "lon" : -122.648567, + "name" : "SE Stark St. & SE 17th Ave. (P0)", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 1031, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 42, + "points" : "unytGpxqkVA??dACpB@PoC?_CAM?aC??A?A?A?A??AA?AAA??AAA???A?A?A???A@A??@A@?@??A@?@?BcC?mCAmCAmC?QBIYIWOH" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:19:04.000+00:00", + "steps" : [ + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 0.69, + "elevation" : "", + "lat" : 45.51932, + "lon" : -122.6485648, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Southeast 17th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 79.12, + "elevation" : "", + "lat" : 45.5193262, + "lon" : -122.6485648, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southeast Stark Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 402.13, + "elevation" : "", + "lat" : 45.5193388, + "lon" : -122.6495798, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast 16th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 168.89, + "elevation" : "", + "lat" : 45.5228912, + "lon" : -122.6495528, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Northeast 16th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTHEAST", + "area" : false, + "bogusName" : false, + "distance" : 22.74, + "elevation" : "", + "lat" : 45.524409, + "lon" : -122.6495675, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northeast Sandy Boulevard", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:27:58.000+00:00", + "departure" : "2009-11-17T18:27:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 3602.73, + "endTime" : "2009-11-17T18:41:03.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:27:58.000+00:00", + "departure" : "2009-11-17T18:27:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", + "stopIndex" : 92, + "stopSequence" : 93, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 1385, + "headsign" : "23rd Ave to Tichner", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ + { + "arrival" : "2009-11-17T18:28:32.000+00:00", + "departure" : "2009-11-17T18:28:32.000+00:00", + "lat" : 45.523767, + "lon" : -122.651428, + "name" : "NE Sandy & 14th", + "stopCode" : "5058", + "stopId" : "prt:5058", + "stopIndex" : 93, + "stopSequence" : 94, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:29:00.000+00:00", + "departure" : "2009-11-17T18:29:00.000+00:00", + "lat" : 45.523103, + "lon" : -122.653064, + "name" : "NE Sandy & 12th", + "stopCode" : "5055", + "stopId" : "prt:5055", + "stopIndex" : 94, + "stopSequence" : 95, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:29:47.000+00:00", + "departure" : "2009-11-17T18:29:47.000+00:00", + "lat" : 45.523024, + "lon" : -122.656526, + "name" : "E Burnside & NE 9th", + "stopCode" : "819", + "stopId" : "prt:819", + "stopIndex" : 95, + "stopSequence" : 96, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:30:24.000+00:00", + "departure" : "2009-11-17T18:30:24.000+00:00", + "lat" : 45.523012, + "lon" : -122.659365, + "name" : "E Burnside & NE 6th", + "stopCode" : "805", + "stopId" : "prt:805", + "stopIndex" : 96, + "stopSequence" : 97, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:30:52.000+00:00", + "departure" : "2009-11-17T18:30:52.000+00:00", + "lat" : 45.523015, + "lon" : -122.661534, + "name" : "E Burnside & NE M L King", + "stopCode" : "705", + "stopId" : "prt:705", + "stopIndex" : 97, + "stopSequence" : 98, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:33:00.000+00:00", + "departure" : "2009-11-17T18:33:00.000+00:00", + "lat" : 45.523249, + "lon" : -122.671269, + "name" : "W Burnside & Burnside Bridge", + "stopCode" : "689", + "stopId" : "prt:689", + "stopIndex" : 98, + "stopSequence" : 99, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:34:00.000+00:00", + "departure" : "2009-11-17T18:34:00.000+00:00", + "lat" : 45.523169, + "lon" : -122.675893, + "name" : "W Burnside & NW 5th", + "stopCode" : "782", + "stopId" : "prt:782", + "stopIndex" : 99, + "stopSequence" : 100, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:35:17.000+00:00", + "departure" : "2009-11-17T18:35:17.000+00:00", + "lat" : 45.523115, + "lon" : -122.678939, + "name" : "W Burnside & NW Park", + "stopCode" : "716", + "stopId" : "prt:716", + "stopIndex" : 100, + "stopSequence" : 101, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:36:25.000+00:00", + "departure" : "2009-11-17T18:36:25.000+00:00", + "lat" : 45.523048, + "lon" : -122.681606, + "name" : "W Burnside & NW 10th", + "stopCode" : "10791", + "stopId" : "prt:10791", + "stopIndex" : 101, + "stopSequence" : 102, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:37:14.000+00:00", + "departure" : "2009-11-17T18:37:14.000+00:00", + "lat" : 45.523, + "lon" : -122.683535, + "name" : "W Burnside & NW 12th", + "stopCode" : "11032", + "stopId" : "prt:11032", + "stopIndex" : 102, + "stopSequence" : 103, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:39:09.000+00:00", + "departure" : "2009-11-17T18:39:09.000+00:00", + "lat" : 45.522985, + "lon" : -122.688091, + "name" : "W Burnside & NW 17th", + "stopCode" : "10809", + "stopId" : "prt:10809", + "stopIndex" : 103, + "stopSequence" : 104, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:40:00.000+00:00", + "departure" : "2009-11-17T18:40:00.000+00:00", + "lat" : 45.523097, + "lon" : -122.690083, + "name" : "W Burnside & NW 19th", + "stopCode" : "735", + "stopId" : "prt:735", + "stopIndex" : 104, + "stopSequence" : 105, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:40:27.000+00:00", + "departure" : "2009-11-17T18:40:27.000+00:00", + "lat" : 45.523176, + "lon" : -122.692139, + "name" : "W Burnside & NW 20th", + "stopCode" : "741", + "stopId" : "prt:741", + "stopIndex" : 105, + "stopSequence" : 106, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:40:40.000+00:00", + "departure" : "2009-11-17T18:40:40.000+00:00", + "lat" : 45.52322, + "lon" : -122.69313, + "name" : "W Burnside & NW 20th Pl", + "stopCode" : "742", + "stopId" : "prt:742", + "stopIndex" : 106, + "stopSequence" : 107, + "vertexType" : "TRANSIT", + "zoneId" : "1" + } + ], + "legGeometry" : { + "length" : 94, + "points" : "coztGd}qkVNl@r@`CZhA`A`D??Ph@l@tBb@rARh@Pd@???BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB" + }, + "mode" : "BUS", + "pathway" : false, + "realTime" : false, + "route" : "Burnside/Stark", + "routeId" : "prt:20", + "routeLongName" : "Burnside/Stark", + "routeShortName" : "20", + "routeType" : 3, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:27:58.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:41:03.000+00:00", + "departure" : "2009-11-17T18:41:03.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "stopIndex" : 107, + "stopSequence" : 108, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : true, + "tripBlockId" : "2071", + "tripId" : "prt:200W1210" + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 999.1, + "endTime" : "2009-11-17T18:53:55.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:41:03.000+00:00", + "departure" : "2009-11-17T18:41:03.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 1511, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 29, + "points" : "ugztGdzzkVL?ATClAI|DK?G?mCBkCDoCDmCBoCDkCBoCB[?sBD]?Y@eA@K?C?K?W@{A@M@C@I?_CB?G" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:41:03.000+00:00", + "steps" : [ + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 113.27, + "elevation" : "", + "lat" : 45.5232491, + "lon" : -122.6949067, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "West Burnside Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 882.16, + "elevation" : "", + "lat" : 45.5233204, + "lon" : -122.696357, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest 22nd Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "EAST", + "area" : false, + "bogusName" : false, + "distance" : 3.68, + "elevation" : "", + "lat" : 45.5312508, + "lon" : -122.6966386, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest Northrup Street", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:53:55.000+00:00", + "lat" : 45.53122, + "lon" : -122.69659, + "name" : "NW Northrup St. & NW 22nd Ave. (P2)", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + } + ], + "startTime" : "2009-11-17T18:19:04.000+00:00", + "tooSloped" : false, + "transfers" : 0, + "transitTime" : 785, + "waitingTime" : 0, + "walkDistance" : 1672.66, + "walkLimitExceeded" : false, + "walkTime" : 1306 + }, + { + "arrivedAtDestinationWithRentedBicycle" : false, + "duration" : 1716, + "elevationGained" : 0.0, + "elevationLost" : 0.0, + "endTime" : "2009-11-17T18:55:32.000+00:00", + "fare" : { + "details" : { }, + "fare" : { }, + "legProducts" : [ + { + "legIndices" : [ + 1 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] + } + ] + }, + "generalizedCost" : 2732, + "legs" : [ + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 290.72, + "endTime" : "2009-11-17T18:30:40.000+00:00", + "from" : { + "departure" : "2009-11-17T18:26:56.000+00:00", + "lat" : 45.51932, + "lon" : -122.648567, + "name" : "SE Stark St. & SE 17th Ave. (P0)", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 442, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 6, + "points" : "unytGpxqkVjC?lC@nC@?fCG?" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:26:56.000+00:00", + "steps" : [ + { + "absoluteDirection" : "SOUTH", + "area" : false, + "bogusName" : false, + "distance" : 237.26, + "elevation" : "", + "lat" : 45.51932, + "lon" : -122.6485648, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Southeast 17th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 53.47, + "elevation" : "", + "lat" : 45.5171863, + "lon" : -122.6485801, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast Morrison Street", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:30:40.000+00:00", + "departure" : "2009-11-17T18:30:40.000+00:00", + "lat" : 45.517226, + "lon" : -122.649266, + "name" : "SE Morrison & 16th", + "stopCode" : "4019", + "stopId" : "prt:4019", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 5218.86, + "endTime" : "2009-11-17T18:52:04.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:30:40.000+00:00", + "departure" : "2009-11-17T18:30:40.000+00:00", + "lat" : 45.517226, + "lon" : -122.649266, + "name" : "SE Morrison & 16th", + "stopCode" : "4019", + "stopId" : "prt:4019", + "stopIndex" : 50, + "stopSequence" : 51, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 1884, + "headsign" : "NW 27th & Thurman", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ + { + "arrival" : "2009-11-17T18:31:15.000+00:00", + "departure" : "2009-11-17T18:31:15.000+00:00", + "lat" : 45.517253, + "lon" : -122.651354, + "name" : "SE Morrison & 14th", + "stopCode" : "4016", + "stopId" : "prt:4016", + "stopIndex" : 51, + "stopSequence" : 52, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:32:00.000+00:00", + "departure" : "2009-11-17T18:32:00.000+00:00", + "lat" : 45.517299, + "lon" : -122.654067, + "name" : "SE Morrison & 12th", + "stopCode" : "4014", + "stopId" : "prt:4014", + "stopIndex" : 52, + "stopSequence" : 53, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:32:38.000+00:00", + "departure" : "2009-11-17T18:32:38.000+00:00", + "lat" : 45.517292, + "lon" : -122.656563, + "name" : "SE Morrison & 9th", + "stopCode" : "4026", + "stopId" : "prt:4026", + "stopIndex" : 53, + "stopSequence" : 54, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:33:08.000+00:00", + "departure" : "2009-11-17T18:33:08.000+00:00", + "lat" : 45.517322, + "lon" : -122.65847, + "name" : "SE Morrison & 7th", + "stopCode" : "4025", + "stopId" : "prt:4025", + "stopIndex" : 54, + "stopSequence" : 55, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:33:39.000+00:00", + "departure" : "2009-11-17T18:33:39.000+00:00", + "lat" : 45.517298, + "lon" : -122.660523, + "name" : "SE Morrison & Grand", + "stopCode" : "4013", + "stopId" : "prt:4013", + "stopIndex" : 55, + "stopSequence" : 56, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:35:03.000+00:00", + "departure" : "2009-11-17T18:35:03.000+00:00", + "lat" : 45.517351, + "lon" : -122.66601, + "name" : "Morrison Bridge", + "stopCode" : "4029", + "stopId" : "prt:4029", + "stopIndex" : 56, + "stopSequence" : 57, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:37:27.000+00:00", + "departure" : "2009-11-17T18:37:27.000+00:00", + "lat" : 45.51959, + "lon" : -122.674599, + "name" : "SW Washington & 3rd", + "stopCode" : "6158", + "stopId" : "prt:6158", + "stopIndex" : 57, + "stopSequence" : 58, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:38:00.000+00:00", + "departure" : "2009-11-17T18:38:00.000+00:00", + "lat" : 45.520129, + "lon" : -122.676635, + "name" : "SW Washington & 5th", + "stopCode" : "6160", + "stopId" : "prt:6160", + "stopIndex" : 58, + "stopSequence" : 59, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:38:52.000+00:00", + "departure" : "2009-11-17T18:38:52.000+00:00", + "lat" : 45.520695, + "lon" : -122.678657, + "name" : "SW Washington & Broadway", + "stopCode" : "6137", + "stopId" : "prt:6137", + "stopIndex" : 59, + "stopSequence" : 60, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:39:34.000+00:00", + "departure" : "2009-11-17T18:39:34.000+00:00", + "lat" : 45.521124, + "lon" : -122.6803, + "name" : "SW Washington & 9th", + "stopCode" : "6169", + "stopId" : "prt:6169", + "stopIndex" : 60, + "stopSequence" : 61, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:40:47.000+00:00", + "departure" : "2009-11-17T18:40:47.000+00:00", + "lat" : 45.521094, + "lon" : -122.682819, + "name" : "SW 11th & Alder", + "stopCode" : "9600", + "stopId" : "prt:9600", + "stopIndex" : 61, + "stopSequence" : 62, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:41:36.000+00:00", + "departure" : "2009-11-17T18:41:36.000+00:00", + "lat" : 45.52055, + "lon" : -122.683933, + "name" : "SW Morrison & 12th", + "stopCode" : "9598", + "stopId" : "prt:9598", + "stopIndex" : 62, + "stopSequence" : 63, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:42:25.000+00:00", + "departure" : "2009-11-17T18:42:25.000+00:00", + "lat" : 45.521063, + "lon" : -122.685848, + "name" : "SW Morrison & 14th", + "stopCode" : "9708", + "stopId" : "prt:9708", + "stopIndex" : 63, + "stopSequence" : 64, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:43:18.000+00:00", + "departure" : "2009-11-17T18:43:18.000+00:00", + "lat" : 45.521641, + "lon" : -122.687932, + "name" : "SW Morrison & 16th", + "stopCode" : "9613", + "stopId" : "prt:9613", + "stopIndex" : 64, + "stopSequence" : 65, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:44:00.000+00:00", + "departure" : "2009-11-17T18:44:00.000+00:00", + "lat" : 45.52206, + "lon" : -122.689577, + "name" : "SW Morrison & 17th", + "stopCode" : "9599", + "stopId" : "prt:9599", + "stopIndex" : 65, + "stopSequence" : 66, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:45:03.000+00:00", + "departure" : "2009-11-17T18:45:03.000+00:00", + "lat" : 45.523097, + "lon" : -122.690083, + "name" : "W Burnside & NW 19th", + "stopCode" : "735", + "stopId" : "prt:735", + "stopIndex" : 66, + "stopSequence" : 67, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:45:46.000+00:00", + "departure" : "2009-11-17T18:45:46.000+00:00", + "lat" : 45.523176, + "lon" : -122.692139, + "name" : "W Burnside & NW 20th", + "stopCode" : "741", + "stopId" : "prt:741", + "stopIndex" : 67, + "stopSequence" : 68, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:46:07.000+00:00", + "departure" : "2009-11-17T18:46:07.000+00:00", + "lat" : 45.52322, + "lon" : -122.69313, + "name" : "W Burnside & NW 20th Pl", + "stopCode" : "742", + "stopId" : "prt:742", + "stopIndex" : 68, + "stopSequence" : 69, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:46:44.000+00:00", + "departure" : "2009-11-17T18:46:44.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "stopIndex" : 69, + "stopSequence" : 70, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:47:51.000+00:00", + "departure" : "2009-11-17T18:47:51.000+00:00", + "lat" : 45.523512, + "lon" : -122.698081, + "name" : "W Burnside & NW 23rd", + "stopCode" : "755", + "stopId" : "prt:755", + "stopIndex" : 70, + "stopSequence" : 71, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:48:53.000+00:00", + "departure" : "2009-11-17T18:48:53.000+00:00", + "lat" : 45.525416, + "lon" : -122.698381, + "name" : "NW 23rd & Flanders", + "stopCode" : "7157", + "stopId" : "prt:7157", + "stopIndex" : 71, + "stopSequence" : 72, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:49:56.000+00:00", + "departure" : "2009-11-17T18:49:56.000+00:00", + "lat" : 45.527543, + "lon" : -122.698473, + "name" : "NW 23rd & Irving", + "stopCode" : "7161", + "stopId" : "prt:7161", + "stopIndex" : 72, + "stopSequence" : 73, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:51:00.000+00:00", + "departure" : "2009-11-17T18:51:00.000+00:00", + "lat" : 45.529681, + "lon" : -122.698529, + "name" : "NW 23rd & Lovejoy", + "stopCode" : "7163", + "stopId" : "prt:7163", + "stopIndex" : 73, + "stopSequence" : 74, + "vertexType" : "TRANSIT", + "zoneId" : "1" + } + ], + "legGeometry" : { + "length" : 135, + "points" : "kaytG||qkVA~@?jE?tC???r@AhE?jE?rA???tBAjE?nD???X?hE?xC??Ah@?pE?~C???J?`@?vAAvBEbE?jEAlE?`BAbB@d@??@tAAj@Cx@Cb@Cp@_@dEcAtFoA`IS~@i@`BmAzDi@zAc@pAi@~C??Id@u@jEm@bD??If@u@jEk@bD??If@u@|DW`B??CPs@|Du@lElBz@??VJbCfAk@dD??Id@w@rEWvAId@AF??Q~@s@`Ei@~C??Ib@u@dEWzA??]jB]MQSe@WOKOKIIQe@GWE]GnD??AXKnEGnD???XGjD??AZEfCC`AEzB??AXCfAGxDE|AEtBIlC??APkAh@o@?sCB{BD??S?mCDmCDyBB??U?mCDmCDyBB??S?oCDmCDmCBo@@" + }, + "mode" : "BUS", + "pathway" : false, + "realTime" : false, + "route" : "Belmont/NW 23rd", + "routeId" : "prt:15", + "routeLongName" : "Belmont/NW 23rd", + "routeShortName" : "15", + "routeType" : 3, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:30:40.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:52:04.000+00:00", + "departure" : "2009-11-17T18:52:04.000+00:00", + "lat" : 45.532159, + "lon" : -122.698634, + "name" : "NW 23rd & Overton", + "stopCode" : "8981", + "stopId" : "prt:8981", + "stopIndex" : 74, + "stopSequence" : 75, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : true, + "tripBlockId" : "1541", + "tripId" : "prt:150W1410" + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 266.21, + "endTime" : "2009-11-17T18:55:32.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:52:04.000+00:00", + "departure" : "2009-11-17T18:52:04.000+00:00", + "lat" : 45.532159, + "lon" : -122.698634, + "name" : "NW 23rd & Overton", + "stopCode" : "8981", + "stopId" : "prt:8981", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 405, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 13, + "points" : "}~{tGnq{kV?LVAF?J?L?rBCLA?Q?EAyAEcH?G" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:52:04.000+00:00", + "steps" : [ + { + "absoluteDirection" : "SOUTH", + "area" : false, + "bogusName" : false, + "distance" : 104.46, + "elevation" : "", + "lat" : 45.5321578, + "lon" : -122.6987026, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Northwest 23rd Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "EAST", + "area" : false, + "bogusName" : false, + "distance" : 161.77, + "elevation" : "", + "lat" : 45.5312188, + "lon" : -122.6986675, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Northwest Northrup Street", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:55:32.000+00:00", + "lat" : 45.53122, + "lon" : -122.69659, + "name" : "NW Northrup St. & NW 22nd Ave. (P2)", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + } + ], + "startTime" : "2009-11-17T18:26:56.000+00:00", + "tooSloped" : false, + "transfers" : 0, + "transitTime" : 1284, + "waitingTime" : 0, + "walkDistance" : 556.93, + "walkLimitExceeded" : false, + "walkTime" : 432 + }, + { + "arrivedAtDestinationWithRentedBicycle" : false, + "duration" : 1778, + "elevationGained" : 0.0, + "elevationLost" : 0.0, + "endTime" : "2009-11-17T19:08:19.000+00:00", + "fare" : { + "details" : { }, + "fare" : { }, + "legProducts" : [ + { + "legIndices" : [ + 1 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] + }, + { + "legIndices" : [ + 2 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] + } + ] + }, + "generalizedCost" : 3296, + "legs" : [ + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 408.65, + "endTime" : "2009-11-17T18:44:00.000+00:00", + "from" : { + "departure" : "2009-11-17T18:38:41.000+00:00", + "lat" : 45.51932, + "lon" : -122.648567, + "name" : "SE Stark St. & SE 17th Ave. (P0)", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 623, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 16, + "points" : "unytGpxqkVA??dACpB@P?f@?p@?j@?dAAhE?jE?vD?PJ?J@?S" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:38:41.000+00:00", + "steps" : [ + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 0.69, + "elevation" : "", + "lat" : 45.51932, + "lon" : -122.6485648, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Southeast 17th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 395.42, + "elevation" : "", + "lat" : 45.5193262, + "lon" : -122.6485648, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southeast Stark Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "SOUTH", + "area" : false, + "bogusName" : false, + "distance" : 12.54, + "elevation" : "", + "lat" : 45.5193421, + "lon" : -122.6536397, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southeast 12th Avenue", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:44:00.000+00:00", + "departure" : "2009-11-17T18:44:00.000+00:00", + "lat" : 45.519229, + "lon" : -122.653546, + "name" : "SE 12th & Stark", + "stopCode" : "6594", + "stopId" : "prt:6594", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 1794.66, + "endTime" : "2009-11-17T18:51:01.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:44:00.000+00:00", + "departure" : "2009-11-17T18:44:00.000+00:00", + "lat" : 45.519229, + "lon" : -122.653546, + "name" : "SE 12th & Stark", + "stopCode" : "6594", + "stopId" : "prt:6594", + "stopIndex" : 32, + "stopSequence" : 33, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 1021, + "headsign" : "Rose Qtr TC", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ + { + "arrival" : "2009-11-17T18:44:44.000+00:00", + "departure" : "2009-11-17T18:44:44.000+00:00", + "lat" : 45.520674, + "lon" : -122.653544, + "name" : "SE 12th & Pine", + "stopCode" : "6589", + "stopId" : "prt:6589", + "stopIndex" : 33, + "stopSequence" : 34, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:46:00.000+00:00", + "departure" : "2009-11-17T18:46:00.000+00:00", + "lat" : 45.52318, + "lon" : -122.653507, + "name" : "NE 12th & Sandy", + "stopCode" : "6592", + "stopId" : "prt:6592", + "stopIndex" : 34, + "stopSequence" : 35, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:47:45.000+00:00", + "departure" : "2009-11-17T18:47:45.000+00:00", + "lat" : 45.527449, + "lon" : -122.653462, + "name" : "NE 12th & Irving", + "stopCode" : "6582", + "stopId" : "prt:6582", + "stopIndex" : 35, + "stopSequence" : 36, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:49:00.000+00:00", + "departure" : "2009-11-17T18:49:00.000+00:00", + "lat" : 45.529793, + "lon" : -122.654429, + "name" : "NE 11th & Holladay", + "stopCode" : "8513", + "stopId" : "prt:8513", + "stopIndex" : 36, + "stopSequence" : 37, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:49:39.000+00:00", + "departure" : "2009-11-17T18:49:39.000+00:00", + "lat" : 45.53135, + "lon" : -122.654497, + "name" : "NE 11th & Multnomah", + "stopCode" : "8938", + "stopId" : "prt:8938", + "stopIndex" : 37, + "stopSequence" : 38, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:50:15.000+00:00", + "departure" : "2009-11-17T18:50:15.000+00:00", + "lat" : 45.531573, + "lon" : -122.656408, + "name" : "NE Multnomah & 9th", + "stopCode" : "4056", + "stopId" : "prt:4056", + "stopIndex" : 38, + "stopSequence" : 39, + "vertexType" : "TRANSIT", + "zoneId" : "0" + } + ], + "legGeometry" : { + "length" : 44, + "points" : "cnytGdxrkVW?mC?{BA??Q?oC?mC?kBAa@?w@???wA?mCAmC?oCA}C?sDC??aBAm@@k@AY?uABU@I@IBQFb@fC}@d@OFO@q@???Q?]?gGA??[??nJ???b@?vK?rA" + }, + "mode" : "BUS", + "pathway" : false, + "realTime" : false, + "route" : "12th Ave", + "routeId" : "prt:70", + "routeLongName" : "12th Ave", + "routeShortName" : "70", + "routeType" : 3, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:44:00.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:51:01.000+00:00", + "departure" : "2009-11-17T18:54:29.000+00:00", + "lat" : 45.531569, + "lon" : -122.659045, + "name" : "NE Multnomah & 7th", + "stopCode" : "4054", + "stopId" : "prt:4054", + "stopIndex" : 39, + "stopSequence" : 40, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "transitLeg" : true, + "tripBlockId" : "7002", + "tripId" : "prt:700W1170" + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 3560.24, + "endTime" : "2009-11-17T19:07:55.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:51:01.000+00:00", + "departure" : "2009-11-17T18:54:29.000+00:00", + "lat" : 45.531569, + "lon" : -122.659045, + "name" : "NE Multnomah & 7th", + "stopCode" : "4054", + "stopId" : "prt:4054", + "stopIndex" : 81, + "stopSequence" : 82, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "generalizedCost" : 1614, + "headsign" : "Montgomery Park", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ + { + "arrival" : "2009-11-17T18:55:05.000+00:00", + "departure" : "2009-11-17T18:55:05.000+00:00", + "lat" : 45.531586, + "lon" : -122.660482, + "name" : "NE Multnomah & Grand", + "stopCode" : "4043", + "stopId" : "prt:4043", + "stopIndex" : 82, + "stopSequence" : 83, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:56:09.000+00:00", + "departure" : "2009-11-17T18:56:09.000+00:00", + "lat" : 45.531159, + "lon" : -122.66293, + "name" : "NE Multnomah & 3rd", + "stopCode" : "11492", + "stopId" : "prt:11492", + "stopIndex" : 83, + "stopSequence" : 84, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:58:00.000+00:00", + "departure" : "2009-11-17T18:58:00.000+00:00", + "lat" : 45.530005, + "lon" : -122.666476, + "name" : "Rose Quarter Transit Center", + "stopCode" : "2592", + "stopId" : "prt:2592", + "stopIndex" : 84, + "stopSequence" : 85, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T19:01:20.000+00:00", + "departure" : "2009-11-17T19:01:20.000+00:00", + "lat" : 45.526655, + "lon" : -122.676462, + "name" : "NW Glisan & 6th", + "stopCode" : "10803", + "stopId" : "prt:10803", + "stopIndex" : 85, + "stopSequence" : 86, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T19:02:15.000+00:00", + "departure" : "2009-11-17T19:02:15.000+00:00", + "lat" : 45.528799, + "lon" : -122.677238, + "name" : "NW Station Way & Union Station", + "stopCode" : "12801", + "stopId" : "prt:12801", + "stopIndex" : 86, + "stopSequence" : 87, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T19:04:00.000+00:00", + "departure" : "2009-11-17T19:04:00.000+00:00", + "lat" : 45.531582, + "lon" : -122.681193, + "name" : "NW Northrup & 10th", + "stopCode" : "12802", + "stopId" : "prt:12802", + "stopIndex" : 87, + "stopSequence" : 88, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T19:04:33.000+00:00", + "departure" : "2009-11-17T19:04:33.000+00:00", + "lat" : 45.531534, + "lon" : -122.683319, + "name" : "NW 12th & Northrup", + "stopCode" : "12796", + "stopId" : "prt:12796", + "stopIndex" : 88, + "stopSequence" : 89, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T19:05:04.000+00:00", + "departure" : "2009-11-17T19:05:04.000+00:00", + "lat" : 45.531503, + "lon" : -122.685357, + "name" : "NW Northrup & 14th", + "stopCode" : "10775", + "stopId" : "prt:10775", + "stopIndex" : 89, + "stopSequence" : 90, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T19:06:07.000+00:00", + "departure" : "2009-11-17T19:06:07.000+00:00", + "lat" : 45.531434, + "lon" : -122.689417, + "name" : "NW Northrup & 18th", + "stopCode" : "10776", + "stopId" : "prt:10776", + "stopIndex" : 90, + "stopSequence" : 91, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T19:07:24.000+00:00", + "departure" : "2009-11-17T19:07:24.000+00:00", + "lat" : 45.531346, + "lon" : -122.694455, + "name" : "NW Northrup & 21st", + "stopCode" : "10777", + "stopId" : "prt:10777", + "stopIndex" : 91, + "stopSequence" : 92, + "vertexType" : "TRANSIT", + "zoneId" : "1" + } + ], + "legGeometry" : { + "length" : 104, + "points" : "yz{tG`zskV?tBCfD???^?nE?V@Z?PH\\Nb@`@~@Rf@??`@bANb@FV@R?P?pE?jA@h@AnAbBl@LFJN\\f@LT??NXJPPVJFf@Vf@Pp@Nd@NRLB@RNXZR\\vAhC@BhAhD`AhClAbDBrDCnG@n@@^@d@HdAP`CBjEDvD???LqCFmCDYBGDEBGJkAzAQR??KNa@b@MJuBBY?OHW@u@~@aD`EcBhBBrD@xC??@l@BlE@lD???XBjEBpD???VBlE?dA@t@?b@?h@BfEBrD???VBhEFtKDvJ??@\\DnJ" + }, + "mode" : "BUS", + "pathway" : false, + "realTime" : false, + "route" : "Broadway/Halsey", + "routeId" : "prt:77", + "routeLongName" : "Broadway/Halsey", + "routeShortName" : "77", + "routeType" : 3, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:54:29.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T19:07:55.000+00:00", + "departure" : "2009-11-17T19:07:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", + "stopIndex" : 92, + "stopSequence" : 93, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : true, + "tripBlockId" : "7702", + "tripId" : "prt:771W1180" + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 18.81, + "endTime" : "2009-11-17T19:08:19.000+00:00", + "from" : { + "arrival" : "2009-11-17T19:07:55.000+00:00", + "departure" : "2009-11-17T19:07:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 37, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 7, + "points" : "sy{tGxc{kV???LABF?B??J" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T19:07:55.000+00:00", + "steps" : [ + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 18.81, + "elevation" : "", + "lat" : 45.5313019, + "lon" : -122.6964448, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Northwest Northrup Street", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T19:08:19.000+00:00", + "lat" : 45.53122, + "lon" : -122.69659, + "name" : "NW Northrup St. & NW 22nd Ave. (P2)", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + } + ], + "startTime" : "2009-11-17T18:38:41.000+00:00", + "tooSloped" : false, + "transfers" : 1, + "transitTime" : 1227, + "waitingTime" : 208, + "walkDistance" : 427.46, + "walkLimitExceeded" : false, + "walkTime" : 343 + } + ] +] \ No newline at end of file From 4d11307aacdc70db8040d3b8ba7aa3d6bb85f2b2 Mon Sep 17 00:00:00 2001 From: Zsombor Welker Date: Wed, 6 Nov 2024 09:40:46 +0100 Subject: [PATCH 085/169] Street search: traverse edges which may return multiple states --- .../flex/template/AbstractFlexTemplate.java | 2 +- .../flex/template/FlexDirectPathFactory.java | 2 +- .../mapping/RaptorPathToItineraryMapper.java | 30 +- .../raptoradapter/transit/Transfer.java | 9 +- .../search/request/StreetSearchRequest.java | 4 + .../street/search/state/EdgeTraverser.java | 58 +- .../_support/geometry/Coordinates.java | 2 + .../__snapshots__/CarPickupSnapshotTest.snap | 3457 +++++++++-------- .../search/state/EdgeTraverserTest.java | 191 + .../street/search/state/TestStateBuilder.java | 2 +- 10 files changed, 2171 insertions(+), 1586 deletions(-) create mode 100644 application/src/test/java/org/opentripplanner/street/search/state/EdgeTraverserTest.java diff --git a/application/src/ext/java/org/opentripplanner/ext/flex/template/AbstractFlexTemplate.java b/application/src/ext/java/org/opentripplanner/ext/flex/template/AbstractFlexTemplate.java index 8dbcf4d785e..aeeab84259c 100644 --- a/application/src/ext/java/org/opentripplanner/ext/flex/template/AbstractFlexTemplate.java +++ b/application/src/ext/java/org/opentripplanner/ext/flex/template/AbstractFlexTemplate.java @@ -199,7 +199,7 @@ private FlexAccessEgress createFlexAccessEgress( return null; } - final var finalStateOpt = EdgeTraverser.traverseEdges(afterFlexState[0], transferEdges); + final var finalStateOpt = EdgeTraverser.traverseEdges(afterFlexState, transferEdges); return finalStateOpt .map(finalState -> { diff --git a/application/src/ext/java/org/opentripplanner/ext/flex/template/FlexDirectPathFactory.java b/application/src/ext/java/org/opentripplanner/ext/flex/template/FlexDirectPathFactory.java index f27a502911f..ae35c262a1e 100644 --- a/application/src/ext/java/org/opentripplanner/ext/flex/template/FlexDirectPathFactory.java +++ b/application/src/ext/java/org/opentripplanner/ext/flex/template/FlexDirectPathFactory.java @@ -113,7 +113,7 @@ private Optional createDirectGraphPath( final State[] afterFlexState = flexEdge.traverse(accessNearbyStop.state); - var finalStateOpt = EdgeTraverser.traverseEdges(afterFlexState[0], egress.edges); + var finalStateOpt = EdgeTraverser.traverseEdges(afterFlexState, egress.edges); if (finalStateOpt.isEmpty()) { return Optional.empty(); diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java b/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java index 3819500e605..0fef72f7b3e 100644 --- a/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java +++ b/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java @@ -6,6 +6,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.Set; import org.opentripplanner.astar.model.GraphPath; import org.opentripplanner.framework.application.OTPFeature; import org.opentripplanner.framework.geometry.GeometryUtils; @@ -38,8 +39,8 @@ import org.opentripplanner.street.search.TraverseMode; import org.opentripplanner.street.search.request.StreetSearchRequest; import org.opentripplanner.street.search.request.StreetSearchRequestMapper; +import org.opentripplanner.street.search.state.EdgeTraverser; import org.opentripplanner.street.search.state.State; -import org.opentripplanner.street.search.state.StateEditor; import org.opentripplanner.transit.model.timetable.TripIdAndServiceDate; import org.opentripplanner.transit.model.timetable.TripOnServiceDate; import org.opentripplanner.transit.service.TransitService; @@ -360,24 +361,15 @@ private List mapNonTransitLeg( .build() ); } else { - StateEditor se = new StateEditor(edges.get(0).getFromVertex(), transferStreetRequest); - se.setTimeSeconds(createZonedDateTime(pathLeg.fromTime()).toEpochSecond()); - - State s = se.makeState(); - ArrayList transferStates = new ArrayList<>(); - transferStates.add(s); - for (Edge e : edges) { - var states = e.traverse(s); - if (State.isEmpty(states)) { - s = null; - } else { - transferStates.add(states[0]); - s = states[0]; - } - } - - State[] states = transferStates.toArray(new State[0]); - var graphPath = new GraphPath<>(states[states.length - 1]); + var legTransferSearchRequest = transferStreetRequest + .copyOf(createZonedDateTime(pathLeg.fromTime()).toInstant()) + .build(); + var initialStates = State.getInitialStates( + Set.of(edges.getFirst().getFromVertex()), + legTransferSearchRequest + ); + var state = EdgeTraverser.traverseEdges(initialStates, edges); + var graphPath = new GraphPath<>(state.get()); Itinerary subItinerary = graphPathToItineraryMapper.generateItinerary(graphPath); diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/Transfer.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/Transfer.java index 7a6e6568bb4..32d54787e6f 100644 --- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/Transfer.java +++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/Transfer.java @@ -4,6 +4,7 @@ import java.util.Arrays; import java.util.List; import java.util.Optional; +import java.util.Set; import org.locationtech.jts.geom.Coordinate; import org.opentripplanner.raptor.api.model.RaptorCostConverter; import org.opentripplanner.raptor.api.model.RaptorTransfer; @@ -11,7 +12,7 @@ import org.opentripplanner.street.model.edge.Edge; import org.opentripplanner.street.search.request.StreetSearchRequest; import org.opentripplanner.street.search.state.EdgeTraverser; -import org.opentripplanner.street.search.state.StateEditor; +import org.opentripplanner.street.search.state.State; import org.opentripplanner.utils.logging.Throttle; import org.opentripplanner.utils.tostring.ToStringBuilder; import org.slf4j.Logger; @@ -84,10 +85,8 @@ public Optional asRaptorTransfer(StreetSearchRequest request) { ); } - StateEditor se = new StateEditor(edges.get(0).getFromVertex(), request); - se.setTimeSeconds(0); - - var state = EdgeTraverser.traverseEdges(se.makeState(), edges); + var initialStates = State.getInitialStates(Set.of(edges.getFirst().getFromVertex()), request); + var state = EdgeTraverser.traverseEdges(initialStates, edges); return state.map(s -> new DefaultRaptorTransfer( diff --git a/application/src/main/java/org/opentripplanner/street/search/request/StreetSearchRequest.java b/application/src/main/java/org/opentripplanner/street/search/request/StreetSearchRequest.java index c93ea598256..df8933cd22d 100644 --- a/application/src/main/java/org/opentripplanner/street/search/request/StreetSearchRequest.java +++ b/application/src/main/java/org/opentripplanner/street/search/request/StreetSearchRequest.java @@ -124,6 +124,10 @@ public DataOverlayContext dataOverlayContext() { return dataOverlayContext; } + public StreetSearchRequestBuilder copyOf(Instant time) { + return copyOf(this).withStartTime(time); + } + public StreetSearchRequestBuilder copyOfReversed(Instant time) { return copyOf(this).withStartTime(time).withArriveBy(!arriveBy); } diff --git a/application/src/main/java/org/opentripplanner/street/search/state/EdgeTraverser.java b/application/src/main/java/org/opentripplanner/street/search/state/EdgeTraverser.java index 8755f014e14..502d014e358 100644 --- a/application/src/main/java/org/opentripplanner/street/search/state/EdgeTraverser.java +++ b/application/src/main/java/org/opentripplanner/street/search/state/EdgeTraverser.java @@ -2,7 +2,10 @@ import java.util.Collection; import java.util.Optional; +import org.opentripplanner.astar.model.ShortestPathTree; import org.opentripplanner.street.model.edge.Edge; +import org.opentripplanner.street.model.vertex.Vertex; +import org.opentripplanner.street.search.strategy.DominanceFunctions; /** * This is a very reduced version of the A* algorithm: from an initial state a number of edges are @@ -14,24 +17,49 @@ */ public class EdgeTraverser { - public static Optional traverseEdges(final State s, final Collection edges) { - var state = s; + public static Optional traverseEdges( + final Collection initialStates, + final Collection edges + ) { + return traverseEdges(initialStates.toArray(new State[0]), edges); + } + + public static Optional traverseEdges( + final State[] initialStates, + final Collection edges + ) { + if (edges.isEmpty()) { + return Optional.of(initialStates[0]); + } + + // The shortest path tree is used to prune dominated parallel states. For example, + // CAR_PICKUP can return both a CAR/WALK state after each traversal of which only + // the optimal states need to be continued. + var dominanceFunction = new DominanceFunctions.MinimumWeight(); + var spt = new ShortestPathTree<>(dominanceFunction); + for (State initialState : initialStates) { + spt.add(initialState); + } + + Vertex lastVertex = null; + var isArriveBy = initialStates[0].getRequest().arriveBy(); for (Edge e : edges) { - var afterTraversal = e.traverse(state); - if (afterTraversal.length > 1) { - throw new IllegalStateException( - "Expected only a single state returned from edge %s but received %s".formatted( - e, - afterTraversal.length - ) - ); - } - if (State.isEmpty(afterTraversal)) { + var vertex = isArriveBy ? e.getToVertex() : e.getFromVertex(); + var fromStates = spt.getStates(vertex); + if (fromStates == null || fromStates.isEmpty()) { return Optional.empty(); - } else { - state = afterTraversal[0]; } + + for (State fromState : fromStates) { + var newToStates = e.traverse(fromState); + for (State newToState : newToStates) { + spt.add(newToState); + } + } + + lastVertex = isArriveBy ? e.getFromVertex() : e.getToVertex(); } - return Optional.ofNullable(state); + + return Optional.ofNullable(lastVertex).map(spt::getState); } } diff --git a/application/src/test/java/org/opentripplanner/_support/geometry/Coordinates.java b/application/src/test/java/org/opentripplanner/_support/geometry/Coordinates.java index 5a4526012c9..33569a34b2e 100644 --- a/application/src/test/java/org/opentripplanner/_support/geometry/Coordinates.java +++ b/application/src/test/java/org/opentripplanner/_support/geometry/Coordinates.java @@ -6,6 +6,8 @@ public class Coordinates { public static final Coordinate BERLIN = of(52.5212, 13.4105); public static final Coordinate BERLIN_BRANDENBURG_GATE = of(52.51627, 13.37770); + public static final Coordinate BERLIN_FERNSEHTURM = of(52.52084, 13.40934); + public static final Coordinate BERLIN_ADMIRALBRUCKE = of(52.49526, 13.415093); public static final Coordinate HAMBURG = of(53.5566, 10.0003); public static final Coordinate KONGSBERG_PLATFORM_1 = of(59.67216, 9.65107); public static final Coordinate BOSTON = of(42.36541, -71.06129); diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/CarPickupSnapshotTest.snap b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/CarPickupSnapshotTest.snap index c5f77a95b3f..a3a515f82b4 100644 --- a/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/CarPickupSnapshotTest.snap +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/mapping/__snapshots__/CarPickupSnapshotTest.snap @@ -529,10 +529,10 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl }, { "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 2077, + "duration" : 1815, "elevationGained" : 0.0, "elevationLost" : 0.0, - "endTime" : "2009-11-17T18:38:41.000+00:00", + "endTime" : "2009-11-17T18:34:19.000+00:00", "fare" : { "details" : { }, "fare" : { }, @@ -556,10 +556,30 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "name" : "regular" } ] + }, + { + "legIndices" : [ + 5 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] } ] }, - "generalizedCost" : 3914, + "generalizedCost" : 3832, "legs" : [ { "agencyTimeZoneOffset" : -28800000, @@ -674,8 +694,8 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 3602.73, - "endTime" : "2009-11-17T18:25:49.000+00:00", + "distance" : 2119.06, + "endTime" : "2009-11-17T18:19:00.000+00:00", "from" : { "arrival" : "2009-11-17T18:12:58.000+00:00", "departure" : "2009-11-17T18:12:58.000+00:00", @@ -689,7 +709,7 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1371, + "generalizedCost" : 962, "headsign" : "Beaverton TC", "interlineWithPreviousLeg" : false, "intermediateStops" : [ @@ -770,115 +790,11 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "stopSequence" : 99, "vertexType" : "TRANSIT", "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:19:00.000+00:00", - "departure" : "2009-11-17T18:19:00.000+00:00", - "lat" : 45.523169, - "lon" : -122.675893, - "name" : "W Burnside & NW 5th", - "stopCode" : "782", - "stopId" : "prt:782", - "stopIndex" : 99, - "stopSequence" : 100, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:20:17.000+00:00", - "departure" : "2009-11-17T18:20:17.000+00:00", - "lat" : 45.523115, - "lon" : -122.678939, - "name" : "W Burnside & NW Park", - "stopCode" : "716", - "stopId" : "prt:716", - "stopIndex" : 100, - "stopSequence" : 101, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:21:25.000+00:00", - "departure" : "2009-11-17T18:21:25.000+00:00", - "lat" : 45.523048, - "lon" : -122.681606, - "name" : "W Burnside & NW 10th", - "stopCode" : "10791", - "stopId" : "prt:10791", - "stopIndex" : 101, - "stopSequence" : 102, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:22:14.000+00:00", - "departure" : "2009-11-17T18:22:14.000+00:00", - "lat" : 45.523, - "lon" : -122.683535, - "name" : "W Burnside & NW 12th", - "stopCode" : "11032", - "stopId" : "prt:11032", - "stopIndex" : 102, - "stopSequence" : 103, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:24:09.000+00:00", - "departure" : "2009-11-17T18:24:09.000+00:00", - "lat" : 45.522985, - "lon" : -122.688091, - "name" : "W Burnside & NW 17th", - "stopCode" : "10809", - "stopId" : "prt:10809", - "stopIndex" : 103, - "stopSequence" : 104, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:25:00.000+00:00", - "departure" : "2009-11-17T18:25:00.000+00:00", - "lat" : 45.523097, - "lon" : -122.690083, - "name" : "W Burnside & NW 19th", - "stopCode" : "735", - "stopId" : "prt:735", - "stopIndex" : 104, - "stopSequence" : 105, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:25:21.000+00:00", - "departure" : "2009-11-17T18:25:21.000+00:00", - "lat" : 45.523176, - "lon" : -122.692139, - "name" : "W Burnside & NW 20th", - "stopCode" : "741", - "stopId" : "prt:741", - "stopIndex" : 105, - "stopSequence" : 106, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:25:31.000+00:00", - "departure" : "2009-11-17T18:25:31.000+00:00", - "lat" : 45.52322, - "lon" : -122.69313, - "name" : "W Burnside & NW 20th Pl", - "stopCode" : "742", - "stopId" : "prt:742", - "stopIndex" : 106, - "stopSequence" : 107, - "vertexType" : "TRANSIT", - "zoneId" : "1" } ], "legGeometry" : { - "length" : 94, - "points" : "coztGd}qkVNl@r@`CZhA`A`D??Ph@l@tBb@rARh@Pd@???BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB" + "length" : 50, + "points" : "coztGd}qkVNl@r@`CZhA`A`D??Ph@l@tBb@rARh@Pd@???BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A" }, "mode" : "BUS", "pathway" : false, @@ -892,17 +808,17 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "startTime" : "2009-11-17T18:12:58.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T18:25:49.000+00:00", - "departure" : "2009-11-17T18:25:49.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", - "stopIndex" : 107, - "stopSequence" : 108, + "arrival" : "2009-11-17T18:19:00.000+00:00", + "departure" : "2009-11-17T18:19:00.000+00:00", + "lat" : 45.523169, + "lon" : -122.675893, + "name" : "W Burnside & NW 5th", + "stopCode" : "782", + "stopId" : "prt:782", + "stopIndex" : 99, + "stopSequence" : 100, "vertexType" : "TRANSIT", - "zoneId" : "1" + "zoneId" : "0" }, "transitLeg" : true, "tripBlockId" : "2002", @@ -912,40 +828,79 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 999.1, - "endTime" : "2009-11-17T18:38:41.000+00:00", + "distance" : 0.0, + "endTime" : "2009-11-17T18:19:00.000+00:00", "from" : { - "arrival" : "2009-11-17T18:25:49.000+00:00", - "departure" : "2009-11-17T18:25:49.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", + "arrival" : "2009-11-17T18:19:00.000+00:00", + "departure" : "2009-11-17T18:19:00.000+00:00", + "lat" : 45.523169, + "lon" : -122.675893, + "name" : "W Burnside & NW 5th", + "stopCode" : "782", + "stopId" : "prt:782", "vertexType" : "TRANSIT", - "zoneId" : "1" + "zoneId" : "0" }, - "generalizedCost" : 1511, + "generalizedCost" : 1, "interlineWithPreviousLeg" : false, + "legElevation" : "", "legGeometry" : { - "length" : 29, - "points" : "ugztGdzzkVL?ATClAI|DK?G?mCBkCDoCDmCBoCDkCBoCB[?sBD]?Y@eA@K?C?K?W@{A@M@C@I?_CB?G" + "length" : 2, + "points" : "wfztGjcwkVD?" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:25:49.000+00:00", + "startTime" : "2009-11-17T18:19:00.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:19:00.000+00:00", + "departure" : "2009-11-17T18:19:00.000+00:00", + "lat" : 45.5231324, + "lon" : -122.6758917, + "name" : "West Burnside Street", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 1767.93, + "endTime" : "2009-11-17T18:24:16.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:19:00.000+00:00", + "departure" : "2009-11-17T18:19:00.000+00:00", + "lat" : 45.5231324, + "lon" : -122.6758917, + "name" : "West Burnside Street", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 510, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 97, + "points" : "qfztGjcwkV@`B?H?BM?iBBI?K?wBBK?K?sBDM@M@sB@K?K?uBBM?K?uBBI@K?aBBSAM@M@K?GBEDEHIJUX_@f@KNQRSVGFCBQPIHGDGBIBK@W@a@?mA@E?C@C@A?CBQTKJEHIJeC~CYZo@v@g@d@IJAFAD?L@vC@hB@p@?X?T@P?N@P@nA?j@AX?L@`B@dA?R?RBbD?T?NBbD?R?P@|D@jB?x@@J?N?B?P?LBjD@N" + }, + "mode" : "CAR", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:19:00.000+00:00", "steps" : [ { "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 113.27, + "distance" : 44.21, "elevation" : "", - "lat" : 45.5232491, - "lon" : -122.6949067, + "lat" : 45.5231324, + "lon" : -122.6758917, "relativeDirection" : "DEPART", "stayOn" : false, "streetName" : "West Burnside Street", @@ -955,144 +910,115 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "absoluteDirection" : "NORTH", "area" : false, "bogusName" : false, - "distance" : 882.16, + "distance" : 548.38, "elevation" : "", - "lat" : 45.5233204, - "lon" : -122.696357, + "lat" : 45.5231221, + "lon" : -122.676459, "relativeDirection" : "RIGHT", "stayOn" : false, - "streetName" : "Northwest 22nd Avenue", + "streetName" : "Northwest 6th Avenue", "walkingBike" : false }, { - "absoluteDirection" : "EAST", + "absoluteDirection" : "NORTH", "area" : false, "bogusName" : false, - "distance" : 3.68, + "distance" : 465.44, "elevation" : "", - "lat" : 45.5312508, - "lon" : -122.6966386, - "relativeDirection" : "RIGHT", + "lat" : 45.5280515, + "lon" : -122.6766232, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Northwest Station Way", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 709.95, + "elevation" : "", + "lat" : 45.5315452, + "lon" : -122.679511, + "relativeDirection" : "LEFT", "stayOn" : false, "streetName" : "Northwest Northrup Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:38:41.000+00:00", - "lat" : 45.53122, - "lon" : -122.69659, - "name" : "NW Northrup St. & NW 22nd Ave. (P2)", + "arrival" : "2009-11-17T18:24:16.000+00:00", + "departure" : "2009-11-17T18:24:16.000+00:00", + "lat" : 45.5313992, + "lon" : -122.6886162, + "name" : "corner of Northwest Northrup Street and path", "vertexType" : "NORMAL" }, "transitLeg" : false, "walkingBike" : false - } - ], - "startTime" : "2009-11-17T18:04:04.000+00:00", - "tooSloped" : false, - "transfers" : 0, - "transitTime" : 771, - "waitingTime" : 0, - "walkDistance" : 1672.66, - "walkLimitExceeded" : false, - "walkTime" : 1306 - }, - { - "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 1646, - "elevationGained" : 0.0, - "elevationLost" : 0.0, - "endTime" : "2009-11-17T18:39:22.000+00:00", - "fare" : { - "details" : { }, - "fare" : { }, - "legProducts" : [ - { - "legIndices" : [ - 1 - ], - "products" : [ - { - "amount" : { - "cents" : 200, - "currency" : { - "currency" : "USD", - "currencyCode" : "USD", - "defaultFractionDigits" : 2, - "symbol" : "$" - } - }, - "id" : "prt:8", - "name" : "regular" - } - ] - } - ] - }, - "generalizedCost" : 2662, - "legs" : [ + }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 290.72, - "endTime" : "2009-11-17T18:15:40.000+00:00", + "distance" : 70.46, + "endTime" : "2009-11-17T18:26:18.000+00:00", "from" : { - "departure" : "2009-11-17T18:11:56.000+00:00", - "lat" : 45.51932, - "lon" : -122.648567, - "name" : "SE Stark St. & SE 17th Ave. (P0)", + "arrival" : "2009-11-17T18:24:16.000+00:00", + "departure" : "2009-11-17T18:24:16.000+00:00", + "lat" : 45.5313992, + "lon" : -122.6886162, + "name" : "corner of Northwest Northrup Street and path", "vertexType" : "NORMAL" }, - "generalizedCost" : 442, + "generalizedCost" : 233, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 6, - "points" : "unytGpxqkVjC?lC@nC@?fCG?" + "length" : 7, + "points" : "ez{tGzrykVC?I?@nBBH?d@??" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:11:56.000+00:00", + "startTime" : "2009-11-17T18:24:16.000+00:00", "steps" : [ { - "absoluteDirection" : "SOUTH", + "absoluteDirection" : "NORTH", "area" : false, - "bogusName" : false, - "distance" : 237.26, + "bogusName" : true, + "distance" : 7.61, "elevation" : "", - "lat" : 45.51932, - "lon" : -122.6485648, - "relativeDirection" : "DEPART", + "lat" : 45.5313992, + "lon" : -122.6886162, + "relativeDirection" : "RIGHT", "stayOn" : false, - "streetName" : "Southeast 17th Avenue", + "streetName" : "path", "walkingBike" : false }, { "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 53.47, + "distance" : 62.85, "elevation" : "", - "lat" : 45.5171863, - "lon" : -122.6485801, - "relativeDirection" : "RIGHT", + "lat" : 45.5314676, + "lon" : -122.6886182, + "relativeDirection" : "LEFT", "stayOn" : false, - "streetName" : "Southeast Morrison Street", + "streetName" : "Northwest Northrup Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:15:40.000+00:00", - "departure" : "2009-11-17T18:15:40.000+00:00", - "lat" : 45.517226, - "lon" : -122.649266, - "name" : "SE Morrison & 16th", - "stopCode" : "4019", - "stopId" : "prt:4019", + "arrival" : "2009-11-17T18:26:18.000+00:00", + "departure" : "2009-11-17T18:31:26.000+00:00", + "lat" : 45.531434, + "lon" : -122.689417, + "name" : "NW Northrup & 18th", + "stopCode" : "10776", + "stopId" : "prt:10776", "vertexType" : "TRANSIT", "zoneId" : "1" }, @@ -1106,416 +1032,1221 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 5218.86, - "endTime" : "2009-11-17T18:35:54.000+00:00", + "distance" : 547.79, + "endTime" : "2009-11-17T18:33:55.000+00:00", "from" : { - "arrival" : "2009-11-17T18:15:40.000+00:00", - "departure" : "2009-11-17T18:15:40.000+00:00", - "lat" : 45.517226, - "lon" : -122.649266, - "name" : "SE Morrison & 16th", - "stopCode" : "4019", - "stopId" : "prt:4019", - "stopIndex" : 50, - "stopSequence" : 51, + "arrival" : "2009-11-17T18:26:18.000+00:00", + "departure" : "2009-11-17T18:31:26.000+00:00", + "lat" : 45.531434, + "lon" : -122.689417, + "name" : "NW Northrup & 18th", + "stopCode" : "10776", + "stopId" : "prt:10776", + "stopIndex" : 20, + "stopSequence" : 21, "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1814, - "headsign" : "Montgomery Park", + "generalizedCost" : 1057, + "headsign" : "NW 23rd Ave", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T18:16:15.000+00:00", - "departure" : "2009-11-17T18:16:15.000+00:00", - "lat" : 45.517253, - "lon" : -122.651354, - "name" : "SE Morrison & 14th", - "stopCode" : "4016", - "stopId" : "prt:4016", - "stopIndex" : 51, - "stopSequence" : 52, + "arrival" : "2009-11-17T18:33:13.000+00:00", + "departure" : "2009-11-17T18:33:13.000+00:00", + "lat" : 45.531346, + "lon" : -122.694455, + "name" : "NW Northrup & 21st", + "stopCode" : "10777", + "stopId" : "prt:10777", + "stopIndex" : 21, + "stopSequence" : 22, "vertexType" : "TRANSIT", "zoneId" : "1" - }, + } + ], + "legGeometry" : { + "length" : 8, + "points" : "cz{tGzwykV?VBhEFtKDvJ??@\\DnJ" + }, + "mode" : "TRAM", + "pathway" : false, + "realTime" : false, + "route" : "Portland Streetcar", + "routeId" : "prt:193", + "routeLongName" : "Portland Streetcar", + "routeType" : 0, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:31:26.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:33:55.000+00:00", + "departure" : "2009-11-17T18:33:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", + "stopIndex" : 22, + "stopSequence" : 23, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : true, + "tripBlockId" : "9384", + "tripId" : "prt:1930W1210" + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 18.81, + "endTime" : "2009-11-17T18:34:19.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:33:55.000+00:00", + "departure" : "2009-11-17T18:33:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 37, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 7, + "points" : "sy{tGxc{kV???LABF?B??J" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:33:55.000+00:00", + "steps" : [ { - "arrival" : "2009-11-17T18:17:00.000+00:00", - "departure" : "2009-11-17T18:17:00.000+00:00", - "lat" : 45.517299, - "lon" : -122.654067, - "name" : "SE Morrison & 12th", - "stopCode" : "4014", - "stopId" : "prt:4014", - "stopIndex" : 52, - "stopSequence" : 53, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 18.81, + "elevation" : "", + "lat" : 45.5313019, + "lon" : -122.6964448, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Northwest Northrup Street", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:34:19.000+00:00", + "lat" : 45.53122, + "lon" : -122.69659, + "name" : "NW Northrup St. & NW 22nd Ave. (P2)", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + } + ], + "startTime" : "2009-11-17T18:04:04.000+00:00", + "tooSloped" : false, + "transfers" : 1, + "transitTime" : 511, + "waitingTime" : 308, + "walkDistance" : 2530.76, + "walkLimitExceeded" : false, + "walkTime" : 996 + }, + { + "arrivedAtDestinationWithRentedBicycle" : false, + "duration" : 1598, + "elevationGained" : 0.0, + "elevationLost" : 0.0, + "endTime" : "2009-11-17T18:35:19.000+00:00", + "fare" : { + "details" : { }, + "fare" : { }, + "legProducts" : [ + { + "legIndices" : [ + 1 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] + }, + { + "legIndices" : [ + 5 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] + } + ] + }, + "generalizedCost" : 3378, + "legs" : [ + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 408.65, + "endTime" : "2009-11-17T18:14:00.000+00:00", + "from" : { + "departure" : "2009-11-17T18:08:41.000+00:00", + "lat" : 45.51932, + "lon" : -122.648567, + "name" : "SE Stark St. & SE 17th Ave. (P0)", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 623, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 16, + "points" : "unytGpxqkVA??dACpB@P?f@?p@?j@?dAAhE?jE?vD?PJ?J@?S" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:08:41.000+00:00", + "steps" : [ { - "arrival" : "2009-11-17T18:17:38.000+00:00", - "departure" : "2009-11-17T18:17:38.000+00:00", - "lat" : 45.517292, - "lon" : -122.656563, - "name" : "SE Morrison & 9th", - "stopCode" : "4026", - "stopId" : "prt:4026", - "stopIndex" : 53, - "stopSequence" : 54, - "vertexType" : "TRANSIT", - "zoneId" : "1" + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 0.69, + "elevation" : "", + "lat" : 45.51932, + "lon" : -122.6485648, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Southeast 17th Avenue", + "walkingBike" : false }, { - "arrival" : "2009-11-17T18:18:08.000+00:00", - "departure" : "2009-11-17T18:18:08.000+00:00", - "lat" : 45.517322, - "lon" : -122.65847, - "name" : "SE Morrison & 7th", - "stopCode" : "4025", - "stopId" : "prt:4025", - "stopIndex" : 54, - "stopSequence" : 55, + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 395.42, + "elevation" : "", + "lat" : 45.5193262, + "lon" : -122.6485648, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southeast Stark Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "SOUTH", + "area" : false, + "bogusName" : false, + "distance" : 12.54, + "elevation" : "", + "lat" : 45.5193421, + "lon" : -122.6536397, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southeast 12th Avenue", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:14:00.000+00:00", + "departure" : "2009-11-17T18:14:00.000+00:00", + "lat" : 45.519229, + "lon" : -122.653546, + "name" : "SE 12th & Stark", + "stopCode" : "6594", + "stopId" : "prt:6594", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 439.45, + "endTime" : "2009-11-17T18:16:00.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:14:00.000+00:00", + "departure" : "2009-11-17T18:14:00.000+00:00", + "lat" : 45.519229, + "lon" : -122.653546, + "name" : "SE 12th & Stark", + "stopCode" : "6594", + "stopId" : "prt:6594", + "stopIndex" : 32, + "stopSequence" : 33, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 720, + "headsign" : "Rose Qtr TC", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ + { + "arrival" : "2009-11-17T18:14:44.000+00:00", + "departure" : "2009-11-17T18:14:44.000+00:00", + "lat" : 45.520674, + "lon" : -122.653544, + "name" : "SE 12th & Pine", + "stopCode" : "6589", + "stopId" : "prt:6589", + "stopIndex" : 33, + "stopSequence" : 34, + "vertexType" : "TRANSIT", + "zoneId" : "1" + } + ], + "legGeometry" : { + "length" : 11, + "points" : "cnytGdxrkVW?mC?{BA??Q?oC?mC?kBAa@?w@?" + }, + "mode" : "BUS", + "pathway" : false, + "realTime" : false, + "route" : "12th Ave", + "routeId" : "prt:70", + "routeLongName" : "12th Ave", + "routeShortName" : "70", + "routeType" : 3, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:14:00.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:16:00.000+00:00", + "departure" : "2009-11-17T18:16:00.000+00:00", + "lat" : 45.52318, + "lon" : -122.653507, + "name" : "NE 12th & Sandy", + "stopCode" : "6592", + "stopId" : "prt:6592", + "stopIndex" : 34, + "stopSequence" : 35, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : true, + "tripBlockId" : "7004", + "tripId" : "prt:700W1150" + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 0.0, + "endTime" : "2009-11-17T18:16:00.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:16:00.000+00:00", + "departure" : "2009-11-17T18:16:00.000+00:00", + "lat" : 45.52318, + "lon" : -122.653507, + "name" : "NE 12th & Sandy", + "stopCode" : "6592", + "stopId" : "prt:6592", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 1, + "interlineWithPreviousLeg" : false, + "legElevation" : "", + "legGeometry" : { + "length" : 2, + "points" : "{fztGlwrkV?V" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:16:00.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:16:00.000+00:00", + "departure" : "2009-11-17T18:16:00.000+00:00", + "lat" : 45.5231819, + "lon" : -122.6536285, + "name" : "Northeast 12th Avenue", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 1607.0, + "endTime" : "2009-11-17T18:21:03.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:16:00.000+00:00", + "departure" : "2009-11-17T18:16:00.000+00:00", + "lat" : 45.5231819, + "lon" : -122.6536285, + "name" : "Northeast 12th Avenue", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 473, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 81, + "points" : "{fztGdxrkVc@?C?_@AM?O?oBAO??jE?hEAhE?jE?hEAjE?lD?R?FO?]?qA?O?UBmE?k@EU??X?tC?X?P?HAjG?j@ARANCRG\\KFM\\IXCPKXELCJAHMd@?HM\\O`@KPKNKHMLKFIFYJk@P]JIBM@M@O@O?W@O?O?O?q@?Q@K@IBKDIFGFEFGLSFGHEHKZELGP" + }, + "mode" : "CAR", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:16:00.000+00:00", + "steps" : [ + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 128.28, + "elevation" : "", + "lat" : 45.5231819, + "lon" : -122.6536285, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Northeast 12th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 553.03, + "elevation" : "", + "lat" : 45.5243354, + "lon" : -122.6536083, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Northeast Davis Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 243.39, + "elevation" : "", + "lat" : 45.5243542, + "lon" : -122.6607071, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northeast Grand Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 542.09, + "elevation" : "", + "lat" : 45.5265408, + "lon" : -122.6606919, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Northeast Lloyd Boulevard", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 140.22, + "elevation" : "", + "lat" : 45.5286604, + "lon" : -122.6657552, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "North Interstate Avenue", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:21:03.000+00:00", + "departure" : "2009-11-17T18:21:03.000+00:00", + "lat" : 45.5297183, + "lon" : -122.6664542, + "name" : "corner of North Interstate Avenue and path", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 43.34, + "endTime" : "2009-11-17T18:22:49.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:21:03.000+00:00", + "departure" : "2009-11-17T18:21:03.000+00:00", + "lat" : 45.5297183, + "lon" : -122.6664542, + "name" : "corner of North Interstate Avenue and path", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 196, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 13, + "points" : "uo{tGjhukVKIC?CDABCDABEFCHGCEEGK@A" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:21:03.000+00:00", + "steps" : [ + { + "absoluteDirection" : "NORTHEAST", + "area" : false, + "bogusName" : true, + "distance" : 28.77, + "elevation" : "", + "lat" : 45.5297183, + "lon" : -122.6664542, + "relativeDirection" : "SLIGHTLY_RIGHT", + "stayOn" : false, + "streetName" : "path", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTHEAST", + "area" : false, + "bogusName" : false, + "distance" : 14.56, + "elevation" : "", + "lat" : 45.5299086, + "lon" : -122.6665929, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Rose Quarter Transit Center", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:22:49.000+00:00", + "departure" : "2009-11-17T18:25:00.000+00:00", + "lat" : 45.530005, + "lon" : -122.666476, + "name" : "Rose Quarter Transit Center", + "stopCode" : "2592", + "stopId" : "prt:2592", + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 2905.12, + "endTime" : "2009-11-17T18:34:55.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:22:49.000+00:00", + "departure" : "2009-11-17T18:25:00.000+00:00", + "lat" : 45.530005, + "lon" : -122.666476, + "name" : "Rose Quarter Transit Center", + "stopCode" : "2592", + "stopId" : "prt:2592", + "stopIndex" : 84, + "stopSequence" : 85, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + "generalizedCost" : 1326, + "headsign" : "Montgomery Park", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ + { + "arrival" : "2009-11-17T18:28:20.000+00:00", + "departure" : "2009-11-17T18:28:20.000+00:00", + "lat" : 45.526655, + "lon" : -122.676462, + "name" : "NW Glisan & 6th", + "stopCode" : "10803", + "stopId" : "prt:10803", + "stopIndex" : 85, + "stopSequence" : 86, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:29:15.000+00:00", + "departure" : "2009-11-17T18:29:15.000+00:00", + "lat" : 45.528799, + "lon" : -122.677238, + "name" : "NW Station Way & Union Station", + "stopCode" : "12801", + "stopId" : "prt:12801", + "stopIndex" : 86, + "stopSequence" : 87, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:31:00.000+00:00", + "departure" : "2009-11-17T18:31:00.000+00:00", + "lat" : 45.531582, + "lon" : -122.681193, + "name" : "NW Northrup & 10th", + "stopCode" : "12802", + "stopId" : "prt:12802", + "stopIndex" : 87, + "stopSequence" : 88, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:31:33.000+00:00", + "departure" : "2009-11-17T18:31:33.000+00:00", + "lat" : 45.531534, + "lon" : -122.683319, + "name" : "NW 12th & Northrup", + "stopCode" : "12796", + "stopId" : "prt:12796", + "stopIndex" : 88, + "stopSequence" : 89, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:32:04.000+00:00", + "departure" : "2009-11-17T18:32:04.000+00:00", + "lat" : 45.531503, + "lon" : -122.685357, + "name" : "NW Northrup & 14th", + "stopCode" : "10775", + "stopId" : "prt:10775", + "stopIndex" : 89, + "stopSequence" : 90, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:33:07.000+00:00", + "departure" : "2009-11-17T18:33:07.000+00:00", + "lat" : 45.531434, + "lon" : -122.689417, + "name" : "NW Northrup & 18th", + "stopCode" : "10776", + "stopId" : "prt:10776", + "stopIndex" : 90, + "stopSequence" : 91, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:34:24.000+00:00", + "departure" : "2009-11-17T18:34:24.000+00:00", + "lat" : 45.531346, + "lon" : -122.694455, + "name" : "NW Northrup & 21st", + "stopCode" : "10777", + "stopId" : "prt:10777", + "stopIndex" : 91, + "stopSequence" : 92, + "vertexType" : "TRANSIT", + "zoneId" : "1" + } + ], + "legGeometry" : { + "length" : 76, + "points" : "eq{tG`hukVNXJPPVJFf@Vf@Pp@Nd@NRLB@RNXZR\\vAhC@BhAhD`AhClAbDBrDCnG@n@@^@d@HdAP`CBjEDvD???LqCFmCDYBGDEBGJkAzAQR??KNa@b@MJuBBY?OHW@u@~@aD`EcBhBBrD@xC??@l@BlE@lD???XBjEBpD???VBlE?dA@t@?b@?h@BfEBrD???VBhEFtKDvJ??@\\DnJ" + }, + "mode" : "BUS", + "pathway" : false, + "realTime" : false, + "route" : "Broadway/Halsey", + "routeId" : "prt:77", + "routeLongName" : "Broadway/Halsey", + "routeShortName" : "77", + "routeType" : 3, + "serviceDate" : "2009-11-17", + "startTime" : "2009-11-17T18:25:00.000+00:00", + "steps" : [ ], + "to" : { + "arrival" : "2009-11-17T18:34:55.000+00:00", + "departure" : "2009-11-17T18:34:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", + "stopIndex" : 92, + "stopSequence" : 93, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : true, + "tripBlockId" : "7736", + "tripId" : "prt:771W1160" + }, + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 18.81, + "endTime" : "2009-11-17T18:35:19.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:34:55.000+00:00", + "departure" : "2009-11-17T18:34:55.000+00:00", + "lat" : 45.531308, + "lon" : -122.696445, + "name" : "NW Northrup & 22nd", + "stopCode" : "10778", + "stopId" : "prt:10778", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 37, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 7, + "points" : "sy{tGxc{kV???LABF?B??J" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:34:55.000+00:00", + "steps" : [ + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 18.81, + "elevation" : "", + "lat" : 45.5313019, + "lon" : -122.6964448, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Northwest Northrup Street", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:35:19.000+00:00", + "lat" : 45.53122, + "lon" : -122.69659, + "name" : "NW Northrup St. & NW 22nd Ave. (P2)", + "vertexType" : "NORMAL" + }, + "transitLeg" : false, + "walkingBike" : false + } + ], + "startTime" : "2009-11-17T18:08:41.000+00:00", + "tooSloped" : false, + "transfers" : 1, + "transitTime" : 715, + "waitingTime" : 131, + "walkDistance" : 2077.8, + "walkLimitExceeded" : false, + "walkTime" : 752 + }, + { + "arrivedAtDestinationWithRentedBicycle" : false, + "duration" : 2077, + "elevationGained" : 0.0, + "elevationLost" : 0.0, + "endTime" : "2009-11-17T18:38:41.000+00:00", + "fare" : { + "details" : { }, + "fare" : { }, + "legProducts" : [ + { + "legIndices" : [ + 1 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] + } + ] + }, + "generalizedCost" : 3914, + "legs" : [ + { + "agencyTimeZoneOffset" : -28800000, + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 673.56, + "endTime" : "2009-11-17T18:12:58.000+00:00", + "from" : { + "departure" : "2009-11-17T18:04:04.000+00:00", + "lat" : 45.51932, + "lon" : -122.648567, + "name" : "SE Stark St. & SE 17th Ave. (P0)", + "vertexType" : "NORMAL" + }, + "generalizedCost" : 1031, + "interlineWithPreviousLeg" : false, + "legGeometry" : { + "length" : 42, + "points" : "unytGpxqkVA??dACpB@PoC?_CAM?aC??A?A?A?A??AA?AAA??AAA???A?A?A???A@A??@A@?@??A@?@?BcC?mCAmCAmC?QBIYIWOH" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:04:04.000+00:00", + "steps" : [ + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 0.69, + "elevation" : "", + "lat" : 45.51932, + "lon" : -122.6485648, + "relativeDirection" : "DEPART", + "stayOn" : false, + "streetName" : "Southeast 17th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 79.12, + "elevation" : "", + "lat" : 45.5193262, + "lon" : -122.6485648, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Southeast Stark Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 402.13, + "elevation" : "", + "lat" : 45.5193388, + "lon" : -122.6495798, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast 16th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 168.89, + "elevation" : "", + "lat" : 45.5228912, + "lon" : -122.6495528, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Northeast 16th Avenue", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTHEAST", + "area" : false, + "bogusName" : false, + "distance" : 22.74, + "elevation" : "", + "lat" : 45.524409, + "lon" : -122.6495675, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northeast Sandy Boulevard", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:12:58.000+00:00", + "departure" : "2009-11-17T18:12:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 3602.73, + "endTime" : "2009-11-17T18:25:49.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:12:58.000+00:00", + "departure" : "2009-11-17T18:12:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", + "stopIndex" : 92, + "stopSequence" : 93, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 1371, + "headsign" : "Beaverton TC", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ + { + "arrival" : "2009-11-17T18:13:32.000+00:00", + "departure" : "2009-11-17T18:13:32.000+00:00", + "lat" : 45.523767, + "lon" : -122.651428, + "name" : "NE Sandy & 14th", + "stopCode" : "5058", + "stopId" : "prt:5058", + "stopIndex" : 93, + "stopSequence" : 94, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:18:39.000+00:00", - "departure" : "2009-11-17T18:18:39.000+00:00", - "lat" : 45.517298, - "lon" : -122.660523, - "name" : "SE Morrison & Grand", - "stopCode" : "4013", - "stopId" : "prt:4013", - "stopIndex" : 55, - "stopSequence" : 56, + "arrival" : "2009-11-17T18:14:00.000+00:00", + "departure" : "2009-11-17T18:14:00.000+00:00", + "lat" : 45.523103, + "lon" : -122.653064, + "name" : "NE Sandy & 12th", + "stopCode" : "5055", + "stopId" : "prt:5055", + "stopIndex" : 94, + "stopSequence" : 95, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:20:03.000+00:00", - "departure" : "2009-11-17T18:20:03.000+00:00", - "lat" : 45.517351, - "lon" : -122.66601, - "name" : "Morrison Bridge", - "stopCode" : "4029", - "stopId" : "prt:4029", - "stopIndex" : 56, - "stopSequence" : 57, + "arrival" : "2009-11-17T18:14:47.000+00:00", + "departure" : "2009-11-17T18:14:47.000+00:00", + "lat" : 45.523024, + "lon" : -122.656526, + "name" : "E Burnside & NE 9th", + "stopCode" : "819", + "stopId" : "prt:819", + "stopIndex" : 95, + "stopSequence" : 96, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:22:27.000+00:00", - "departure" : "2009-11-17T18:22:27.000+00:00", - "lat" : 45.51959, - "lon" : -122.674599, - "name" : "SW Washington & 3rd", - "stopCode" : "6158", - "stopId" : "prt:6158", - "stopIndex" : 57, - "stopSequence" : 58, + "arrival" : "2009-11-17T18:15:24.000+00:00", + "departure" : "2009-11-17T18:15:24.000+00:00", + "lat" : 45.523012, + "lon" : -122.659365, + "name" : "E Burnside & NE 6th", + "stopCode" : "805", + "stopId" : "prt:805", + "stopIndex" : 96, + "stopSequence" : 97, "vertexType" : "TRANSIT", - "zoneId" : "0" + "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:23:00.000+00:00", - "departure" : "2009-11-17T18:23:00.000+00:00", - "lat" : 45.520129, - "lon" : -122.676635, - "name" : "SW Washington & 5th", - "stopCode" : "6160", - "stopId" : "prt:6160", - "stopIndex" : 58, - "stopSequence" : 59, + "arrival" : "2009-11-17T18:15:52.000+00:00", + "departure" : "2009-11-17T18:15:52.000+00:00", + "lat" : 45.523015, + "lon" : -122.661534, + "name" : "E Burnside & NE M L King", + "stopCode" : "705", + "stopId" : "prt:705", + "stopIndex" : 97, + "stopSequence" : 98, "vertexType" : "TRANSIT", - "zoneId" : "0" + "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:23:52.000+00:00", - "departure" : "2009-11-17T18:23:52.000+00:00", - "lat" : 45.520695, - "lon" : -122.678657, - "name" : "SW Washington & Broadway", - "stopCode" : "6137", - "stopId" : "prt:6137", - "stopIndex" : 59, - "stopSequence" : 60, + "arrival" : "2009-11-17T18:18:00.000+00:00", + "departure" : "2009-11-17T18:18:00.000+00:00", + "lat" : 45.523249, + "lon" : -122.671269, + "name" : "W Burnside & Burnside Bridge", + "stopCode" : "689", + "stopId" : "prt:689", + "stopIndex" : 98, + "stopSequence" : 99, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:24:34.000+00:00", - "departure" : "2009-11-17T18:24:34.000+00:00", - "lat" : 45.521124, - "lon" : -122.6803, - "name" : "SW Washington & 9th", - "stopCode" : "6169", - "stopId" : "prt:6169", - "stopIndex" : 60, - "stopSequence" : 61, + "arrival" : "2009-11-17T18:19:00.000+00:00", + "departure" : "2009-11-17T18:19:00.000+00:00", + "lat" : 45.523169, + "lon" : -122.675893, + "name" : "W Burnside & NW 5th", + "stopCode" : "782", + "stopId" : "prt:782", + "stopIndex" : 99, + "stopSequence" : 100, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:25:47.000+00:00", - "departure" : "2009-11-17T18:25:47.000+00:00", - "lat" : 45.521094, - "lon" : -122.682819, - "name" : "SW 11th & Alder", - "stopCode" : "9600", - "stopId" : "prt:9600", - "stopIndex" : 61, - "stopSequence" : 62, + "arrival" : "2009-11-17T18:20:17.000+00:00", + "departure" : "2009-11-17T18:20:17.000+00:00", + "lat" : 45.523115, + "lon" : -122.678939, + "name" : "W Burnside & NW Park", + "stopCode" : "716", + "stopId" : "prt:716", + "stopIndex" : 100, + "stopSequence" : 101, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:26:36.000+00:00", - "departure" : "2009-11-17T18:26:36.000+00:00", - "lat" : 45.52055, - "lon" : -122.683933, - "name" : "SW Morrison & 12th", - "stopCode" : "9598", - "stopId" : "prt:9598", - "stopIndex" : 62, - "stopSequence" : 63, + "arrival" : "2009-11-17T18:21:25.000+00:00", + "departure" : "2009-11-17T18:21:25.000+00:00", + "lat" : 45.523048, + "lon" : -122.681606, + "name" : "W Burnside & NW 10th", + "stopCode" : "10791", + "stopId" : "prt:10791", + "stopIndex" : 101, + "stopSequence" : 102, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:27:25.000+00:00", - "departure" : "2009-11-17T18:27:25.000+00:00", - "lat" : 45.521063, - "lon" : -122.685848, - "name" : "SW Morrison & 14th", - "stopCode" : "9708", - "stopId" : "prt:9708", - "stopIndex" : 63, - "stopSequence" : 64, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:28:18.000+00:00", - "departure" : "2009-11-17T18:28:18.000+00:00", - "lat" : 45.521641, - "lon" : -122.687932, - "name" : "SW Morrison & 16th", - "stopCode" : "9613", - "stopId" : "prt:9613", - "stopIndex" : 64, - "stopSequence" : 65, + "arrival" : "2009-11-17T18:22:14.000+00:00", + "departure" : "2009-11-17T18:22:14.000+00:00", + "lat" : 45.523, + "lon" : -122.683535, + "name" : "W Burnside & NW 12th", + "stopCode" : "11032", + "stopId" : "prt:11032", + "stopIndex" : 102, + "stopSequence" : 103, "vertexType" : "TRANSIT", - "zoneId" : "1" + "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:29:00.000+00:00", - "departure" : "2009-11-17T18:29:00.000+00:00", - "lat" : 45.52206, - "lon" : -122.689577, - "name" : "SW Morrison & 17th", - "stopCode" : "9599", - "stopId" : "prt:9599", - "stopIndex" : 65, - "stopSequence" : 66, + "arrival" : "2009-11-17T18:24:09.000+00:00", + "departure" : "2009-11-17T18:24:09.000+00:00", + "lat" : 45.522985, + "lon" : -122.688091, + "name" : "W Burnside & NW 17th", + "stopCode" : "10809", + "stopId" : "prt:10809", + "stopIndex" : 103, + "stopSequence" : 104, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:29:54.000+00:00", - "departure" : "2009-11-17T18:29:54.000+00:00", + "arrival" : "2009-11-17T18:25:00.000+00:00", + "departure" : "2009-11-17T18:25:00.000+00:00", "lat" : 45.523097, "lon" : -122.690083, "name" : "W Burnside & NW 19th", "stopCode" : "735", "stopId" : "prt:735", - "stopIndex" : 66, - "stopSequence" : 67, + "stopIndex" : 104, + "stopSequence" : 105, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:30:31.000+00:00", - "departure" : "2009-11-17T18:30:31.000+00:00", + "arrival" : "2009-11-17T18:25:21.000+00:00", + "departure" : "2009-11-17T18:25:21.000+00:00", "lat" : 45.523176, "lon" : -122.692139, "name" : "W Burnside & NW 20th", "stopCode" : "741", "stopId" : "prt:741", - "stopIndex" : 67, - "stopSequence" : 68, + "stopIndex" : 105, + "stopSequence" : 106, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:30:48.000+00:00", - "departure" : "2009-11-17T18:30:48.000+00:00", + "arrival" : "2009-11-17T18:25:31.000+00:00", + "departure" : "2009-11-17T18:25:31.000+00:00", "lat" : 45.52322, "lon" : -122.69313, "name" : "W Burnside & NW 20th Pl", "stopCode" : "742", "stopId" : "prt:742", - "stopIndex" : 68, - "stopSequence" : 69, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:31:20.000+00:00", - "departure" : "2009-11-17T18:31:20.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", - "stopIndex" : 69, - "stopSequence" : 70, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:32:18.000+00:00", - "departure" : "2009-11-17T18:32:18.000+00:00", - "lat" : 45.523512, - "lon" : -122.698081, - "name" : "W Burnside & NW 23rd", - "stopCode" : "755", - "stopId" : "prt:755", - "stopIndex" : 70, - "stopSequence" : 71, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:33:11.000+00:00", - "departure" : "2009-11-17T18:33:11.000+00:00", - "lat" : 45.525416, - "lon" : -122.698381, - "name" : "NW 23rd & Flanders", - "stopCode" : "7157", - "stopId" : "prt:7157", - "stopIndex" : 71, - "stopSequence" : 72, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:34:05.000+00:00", - "departure" : "2009-11-17T18:34:05.000+00:00", - "lat" : 45.527543, - "lon" : -122.698473, - "name" : "NW 23rd & Irving", - "stopCode" : "7161", - "stopId" : "prt:7161", - "stopIndex" : 72, - "stopSequence" : 73, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:35:00.000+00:00", - "departure" : "2009-11-17T18:35:00.000+00:00", - "lat" : 45.529681, - "lon" : -122.698529, - "name" : "NW 23rd & Lovejoy", - "stopCode" : "7163", - "stopId" : "prt:7163", - "stopIndex" : 73, - "stopSequence" : 74, + "stopIndex" : 106, + "stopSequence" : 107, "vertexType" : "TRANSIT", "zoneId" : "1" } ], "legGeometry" : { - "length" : 135, - "points" : "kaytG||qkVA~@?jE?tC???r@AhE?jE?rA???tBAjE?nD???X?hE?xC??Ah@?pE?~C???J?`@?vAAvBEbE?jEAlE?`BAbB@d@??@tAAj@Cx@Cb@Cp@_@dEcAtFoA`IS~@i@`BmAzDi@zAc@pAi@~C??Id@u@jEm@bD??If@u@jEk@bD??If@u@|DW`B??CPs@|Du@lElBz@??VJbCfAk@dD??Id@w@rEWvAId@AF??Q~@s@`Ei@~C??Ib@u@dEWzA??]jB]MQSe@WOKOKIIQe@GWE]GnD??AXKnEGnD???XGjD??AZEfCC`AEzB??AXCfAGxDE|AEtBIlC??APkAh@o@?sCB{BD??S?mCDmCDyBB??U?mCDmCDyBB??S?oCDmCDmCBo@@" + "length" : 94, + "points" : "coztGd}qkVNl@r@`CZhA`A`D??Ph@l@tBb@rARh@Pd@???BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB" }, "mode" : "BUS", "pathway" : false, "realTime" : false, - "route" : "Belmont/NW 23rd", - "routeId" : "prt:15", - "routeLongName" : "Belmont/NW 23rd", - "routeShortName" : "15", + "route" : "Burnside/Stark", + "routeId" : "prt:20", + "routeLongName" : "Burnside/Stark", + "routeShortName" : "20", "routeType" : 3, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:15:40.000+00:00", + "startTime" : "2009-11-17T18:12:58.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T18:35:54.000+00:00", - "departure" : "2009-11-17T18:35:54.000+00:00", - "lat" : 45.532159, - "lon" : -122.698634, - "name" : "NW 23rd & Overton", - "stopCode" : "8981", - "stopId" : "prt:8981", - "stopIndex" : 74, - "stopSequence" : 75, + "arrival" : "2009-11-17T18:25:49.000+00:00", + "departure" : "2009-11-17T18:25:49.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "stopIndex" : 107, + "stopSequence" : 108, "vertexType" : "TRANSIT", "zoneId" : "1" }, "transitLeg" : true, - "tripBlockId" : "1549", - "tripId" : "prt:150W1400" + "tripBlockId" : "2002", + "tripId" : "prt:200W1200" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 266.21, - "endTime" : "2009-11-17T18:39:22.000+00:00", + "distance" : 999.1, + "endTime" : "2009-11-17T18:38:41.000+00:00", "from" : { - "arrival" : "2009-11-17T18:35:54.000+00:00", - "departure" : "2009-11-17T18:35:54.000+00:00", - "lat" : 45.532159, - "lon" : -122.698634, - "name" : "NW 23rd & Overton", - "stopCode" : "8981", - "stopId" : "prt:8981", + "arrival" : "2009-11-17T18:25:49.000+00:00", + "departure" : "2009-11-17T18:25:49.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 405, + "generalizedCost" : 1511, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 13, - "points" : "}~{tGnq{kV?LVAF?J?L?rBCLA?Q?EAyAEcH?G" + "length" : 29, + "points" : "ugztGdzzkVL?ATClAI|DK?G?mCBkCDoCDmCBoCDkCBoCB[?sBD]?Y@eA@K?C?K?W@{A@M@C@I?_CB?G" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:35:54.000+00:00", + "startTime" : "2009-11-17T18:25:49.000+00:00", "steps" : [ { - "absoluteDirection" : "SOUTH", + "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 104.46, + "distance" : 113.27, "elevation" : "", - "lat" : 45.5321578, - "lon" : -122.6987026, + "lat" : 45.5232491, + "lon" : -122.6949067, "relativeDirection" : "DEPART", "stayOn" : false, - "streetName" : "Northwest 23rd Avenue", + "streetName" : "West Burnside Street", + "walkingBike" : false + }, + { + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 882.16, + "elevation" : "", + "lat" : 45.5233204, + "lon" : -122.696357, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northwest 22nd Avenue", "walkingBike" : false }, { "absoluteDirection" : "EAST", "area" : false, "bogusName" : false, - "distance" : 161.77, + "distance" : 3.68, "elevation" : "", - "lat" : 45.5312188, - "lon" : -122.6986675, - "relativeDirection" : "LEFT", + "lat" : 45.5312508, + "lon" : -122.6966386, + "relativeDirection" : "RIGHT", "stayOn" : false, "streetName" : "Northwest Northrup Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:39:22.000+00:00", + "arrival" : "2009-11-17T18:38:41.000+00:00", "lat" : 45.53122, "lon" : -122.69659, "name" : "NW Northrup St. & NW 22nd Ave. (P2)", @@ -1525,21 +2256,21 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "walkingBike" : false } ], - "startTime" : "2009-11-17T18:11:56.000+00:00", + "startTime" : "2009-11-17T18:04:04.000+00:00", "tooSloped" : false, "transfers" : 0, - "transitTime" : 1214, + "transitTime" : 771, "waitingTime" : 0, - "walkDistance" : 556.93, + "walkDistance" : 1672.66, "walkLimitExceeded" : false, - "walkTime" : 432 + "walkTime" : 1306 }, { "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 2091, + "duration" : 1646, "elevationGained" : 0.0, "elevationLost" : 0.0, - "endTime" : "2009-11-17T18:53:55.000+00:00", + "endTime" : "2009-11-17T18:39:22.000+00:00", "fare" : { "details" : { }, "fare" : { }, @@ -1566,108 +2297,69 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl } ] }, - "generalizedCost" : 3928, + "generalizedCost" : 2662, "legs" : [ { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 673.56, - "endTime" : "2009-11-17T18:27:58.000+00:00", + "distance" : 290.72, + "endTime" : "2009-11-17T18:15:40.000+00:00", "from" : { - "departure" : "2009-11-17T18:19:04.000+00:00", + "departure" : "2009-11-17T18:11:56.000+00:00", "lat" : 45.51932, "lon" : -122.648567, "name" : "SE Stark St. & SE 17th Ave. (P0)", "vertexType" : "NORMAL" }, - "generalizedCost" : 1031, + "generalizedCost" : 442, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 42, - "points" : "unytGpxqkVA??dACpB@PoC?_CAM?aC??A?A?A?A??AA?AAA??AAA???A?A?A???A@A??@A@?@??A@?@?BcC?mCAmCAmC?QBIYIWOH" + "length" : 6, + "points" : "unytGpxqkVjC?lC@nC@?fCG?" }, "mode" : "WALK", - "pathway" : false, - "realTime" : false, - "rentedBike" : false, - "route" : "", - "startTime" : "2009-11-17T18:19:04.000+00:00", - "steps" : [ - { - "absoluteDirection" : "NORTH", - "area" : false, - "bogusName" : false, - "distance" : 0.69, - "elevation" : "", - "lat" : 45.51932, - "lon" : -122.6485648, - "relativeDirection" : "DEPART", - "stayOn" : false, - "streetName" : "Southeast 17th Avenue", - "walkingBike" : false - }, - { - "absoluteDirection" : "WEST", - "area" : false, - "bogusName" : false, - "distance" : 79.12, - "elevation" : "", - "lat" : 45.5193262, - "lon" : -122.6485648, - "relativeDirection" : "LEFT", - "stayOn" : false, - "streetName" : "Southeast Stark Street", - "walkingBike" : false - }, - { - "absoluteDirection" : "NORTH", - "area" : false, - "bogusName" : false, - "distance" : 402.13, - "elevation" : "", - "lat" : 45.5193388, - "lon" : -122.6495798, - "relativeDirection" : "RIGHT", - "stayOn" : false, - "streetName" : "Southeast 16th Avenue", - "walkingBike" : false - }, + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:11:56.000+00:00", + "steps" : [ { - "absoluteDirection" : "NORTH", + "absoluteDirection" : "SOUTH", "area" : false, "bogusName" : false, - "distance" : 168.89, + "distance" : 237.26, "elevation" : "", - "lat" : 45.5228912, - "lon" : -122.6495528, - "relativeDirection" : "CONTINUE", + "lat" : 45.51932, + "lon" : -122.6485648, + "relativeDirection" : "DEPART", "stayOn" : false, - "streetName" : "Northeast 16th Avenue", + "streetName" : "Southeast 17th Avenue", "walkingBike" : false }, { - "absoluteDirection" : "NORTHEAST", + "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 22.74, + "distance" : 53.47, "elevation" : "", - "lat" : 45.524409, - "lon" : -122.6495675, + "lat" : 45.5171863, + "lon" : -122.6485801, "relativeDirection" : "RIGHT", "stayOn" : false, - "streetName" : "Northeast Sandy Boulevard", + "streetName" : "Southeast Morrison Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:27:58.000+00:00", - "departure" : "2009-11-17T18:27:58.000+00:00", - "lat" : 45.524581, - "lon" : -122.649367, - "name" : "NE Sandy & 16th", - "stopCode" : "5060", - "stopId" : "prt:5060", + "arrival" : "2009-11-17T18:15:40.000+00:00", + "departure" : "2009-11-17T18:15:40.000+00:00", + "lat" : 45.517226, + "lon" : -122.649266, + "name" : "SE Morrison & 16th", + "stopCode" : "4019", + "stopId" : "prt:4019", "vertexType" : "TRANSIT", "zoneId" : "1" }, @@ -1681,312 +2373,416 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 3602.73, - "endTime" : "2009-11-17T18:41:03.000+00:00", + "distance" : 5218.86, + "endTime" : "2009-11-17T18:35:54.000+00:00", "from" : { - "arrival" : "2009-11-17T18:27:58.000+00:00", - "departure" : "2009-11-17T18:27:58.000+00:00", - "lat" : 45.524581, - "lon" : -122.649367, - "name" : "NE Sandy & 16th", - "stopCode" : "5060", - "stopId" : "prt:5060", - "stopIndex" : 92, - "stopSequence" : 93, + "arrival" : "2009-11-17T18:15:40.000+00:00", + "departure" : "2009-11-17T18:15:40.000+00:00", + "lat" : 45.517226, + "lon" : -122.649266, + "name" : "SE Morrison & 16th", + "stopCode" : "4019", + "stopId" : "prt:4019", + "stopIndex" : 50, + "stopSequence" : 51, "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1385, - "headsign" : "23rd Ave to Tichner", + "generalizedCost" : 1814, + "headsign" : "Montgomery Park", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T18:28:32.000+00:00", - "departure" : "2009-11-17T18:28:32.000+00:00", - "lat" : 45.523767, - "lon" : -122.651428, - "name" : "NE Sandy & 14th", - "stopCode" : "5058", - "stopId" : "prt:5058", - "stopIndex" : 93, - "stopSequence" : 94, + "arrival" : "2009-11-17T18:16:15.000+00:00", + "departure" : "2009-11-17T18:16:15.000+00:00", + "lat" : 45.517253, + "lon" : -122.651354, + "name" : "SE Morrison & 14th", + "stopCode" : "4016", + "stopId" : "prt:4016", + "stopIndex" : 51, + "stopSequence" : 52, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:29:00.000+00:00", - "departure" : "2009-11-17T18:29:00.000+00:00", - "lat" : 45.523103, - "lon" : -122.653064, - "name" : "NE Sandy & 12th", - "stopCode" : "5055", - "stopId" : "prt:5055", - "stopIndex" : 94, - "stopSequence" : 95, + "arrival" : "2009-11-17T18:17:00.000+00:00", + "departure" : "2009-11-17T18:17:00.000+00:00", + "lat" : 45.517299, + "lon" : -122.654067, + "name" : "SE Morrison & 12th", + "stopCode" : "4014", + "stopId" : "prt:4014", + "stopIndex" : 52, + "stopSequence" : 53, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:29:47.000+00:00", - "departure" : "2009-11-17T18:29:47.000+00:00", - "lat" : 45.523024, - "lon" : -122.656526, - "name" : "E Burnside & NE 9th", - "stopCode" : "819", - "stopId" : "prt:819", - "stopIndex" : 95, - "stopSequence" : 96, + "arrival" : "2009-11-17T18:17:38.000+00:00", + "departure" : "2009-11-17T18:17:38.000+00:00", + "lat" : 45.517292, + "lon" : -122.656563, + "name" : "SE Morrison & 9th", + "stopCode" : "4026", + "stopId" : "prt:4026", + "stopIndex" : 53, + "stopSequence" : 54, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:30:24.000+00:00", - "departure" : "2009-11-17T18:30:24.000+00:00", - "lat" : 45.523012, - "lon" : -122.659365, - "name" : "E Burnside & NE 6th", - "stopCode" : "805", - "stopId" : "prt:805", - "stopIndex" : 96, - "stopSequence" : 97, + "arrival" : "2009-11-17T18:18:08.000+00:00", + "departure" : "2009-11-17T18:18:08.000+00:00", + "lat" : 45.517322, + "lon" : -122.65847, + "name" : "SE Morrison & 7th", + "stopCode" : "4025", + "stopId" : "prt:4025", + "stopIndex" : 54, + "stopSequence" : 55, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:30:52.000+00:00", - "departure" : "2009-11-17T18:30:52.000+00:00", - "lat" : 45.523015, - "lon" : -122.661534, - "name" : "E Burnside & NE M L King", - "stopCode" : "705", - "stopId" : "prt:705", - "stopIndex" : 97, - "stopSequence" : 98, + "arrival" : "2009-11-17T18:18:39.000+00:00", + "departure" : "2009-11-17T18:18:39.000+00:00", + "lat" : 45.517298, + "lon" : -122.660523, + "name" : "SE Morrison & Grand", + "stopCode" : "4013", + "stopId" : "prt:4013", + "stopIndex" : 55, + "stopSequence" : 56, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:33:00.000+00:00", - "departure" : "2009-11-17T18:33:00.000+00:00", - "lat" : 45.523249, - "lon" : -122.671269, - "name" : "W Burnside & Burnside Bridge", - "stopCode" : "689", - "stopId" : "prt:689", - "stopIndex" : 98, - "stopSequence" : 99, + "arrival" : "2009-11-17T18:20:03.000+00:00", + "departure" : "2009-11-17T18:20:03.000+00:00", + "lat" : 45.517351, + "lon" : -122.66601, + "name" : "Morrison Bridge", + "stopCode" : "4029", + "stopId" : "prt:4029", + "stopIndex" : 56, + "stopSequence" : 57, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:22:27.000+00:00", + "departure" : "2009-11-17T18:22:27.000+00:00", + "lat" : 45.51959, + "lon" : -122.674599, + "name" : "SW Washington & 3rd", + "stopCode" : "6158", + "stopId" : "prt:6158", + "stopIndex" : 57, + "stopSequence" : 58, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:34:00.000+00:00", - "departure" : "2009-11-17T18:34:00.000+00:00", - "lat" : 45.523169, - "lon" : -122.675893, - "name" : "W Burnside & NW 5th", - "stopCode" : "782", - "stopId" : "prt:782", - "stopIndex" : 99, - "stopSequence" : 100, + "arrival" : "2009-11-17T18:23:00.000+00:00", + "departure" : "2009-11-17T18:23:00.000+00:00", + "lat" : 45.520129, + "lon" : -122.676635, + "name" : "SW Washington & 5th", + "stopCode" : "6160", + "stopId" : "prt:6160", + "stopIndex" : 58, + "stopSequence" : 59, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:35:17.000+00:00", - "departure" : "2009-11-17T18:35:17.000+00:00", - "lat" : 45.523115, - "lon" : -122.678939, - "name" : "W Burnside & NW Park", - "stopCode" : "716", - "stopId" : "prt:716", - "stopIndex" : 100, - "stopSequence" : 101, + "arrival" : "2009-11-17T18:23:52.000+00:00", + "departure" : "2009-11-17T18:23:52.000+00:00", + "lat" : 45.520695, + "lon" : -122.678657, + "name" : "SW Washington & Broadway", + "stopCode" : "6137", + "stopId" : "prt:6137", + "stopIndex" : 59, + "stopSequence" : 60, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:24:34.000+00:00", + "departure" : "2009-11-17T18:24:34.000+00:00", + "lat" : 45.521124, + "lon" : -122.6803, + "name" : "SW Washington & 9th", + "stopCode" : "6169", + "stopId" : "prt:6169", + "stopIndex" : 60, + "stopSequence" : 61, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:25:47.000+00:00", + "departure" : "2009-11-17T18:25:47.000+00:00", + "lat" : 45.521094, + "lon" : -122.682819, + "name" : "SW 11th & Alder", + "stopCode" : "9600", + "stopId" : "prt:9600", + "stopIndex" : 61, + "stopSequence" : 62, + "vertexType" : "TRANSIT", + "zoneId" : "0" + }, + { + "arrival" : "2009-11-17T18:26:36.000+00:00", + "departure" : "2009-11-17T18:26:36.000+00:00", + "lat" : 45.52055, + "lon" : -122.683933, + "name" : "SW Morrison & 12th", + "stopCode" : "9598", + "stopId" : "prt:9598", + "stopIndex" : 62, + "stopSequence" : 63, "vertexType" : "TRANSIT", "zoneId" : "0" }, { - "arrival" : "2009-11-17T18:36:25.000+00:00", - "departure" : "2009-11-17T18:36:25.000+00:00", - "lat" : 45.523048, - "lon" : -122.681606, - "name" : "W Burnside & NW 10th", - "stopCode" : "10791", - "stopId" : "prt:10791", - "stopIndex" : 101, - "stopSequence" : 102, + "arrival" : "2009-11-17T18:27:25.000+00:00", + "departure" : "2009-11-17T18:27:25.000+00:00", + "lat" : 45.521063, + "lon" : -122.685848, + "name" : "SW Morrison & 14th", + "stopCode" : "9708", + "stopId" : "prt:9708", + "stopIndex" : 63, + "stopSequence" : 64, "vertexType" : "TRANSIT", - "zoneId" : "0" + "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:37:14.000+00:00", - "departure" : "2009-11-17T18:37:14.000+00:00", - "lat" : 45.523, - "lon" : -122.683535, - "name" : "W Burnside & NW 12th", - "stopCode" : "11032", - "stopId" : "prt:11032", - "stopIndex" : 102, - "stopSequence" : 103, + "arrival" : "2009-11-17T18:28:18.000+00:00", + "departure" : "2009-11-17T18:28:18.000+00:00", + "lat" : 45.521641, + "lon" : -122.687932, + "name" : "SW Morrison & 16th", + "stopCode" : "9613", + "stopId" : "prt:9613", + "stopIndex" : 64, + "stopSequence" : 65, "vertexType" : "TRANSIT", - "zoneId" : "0" + "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:39:09.000+00:00", - "departure" : "2009-11-17T18:39:09.000+00:00", - "lat" : 45.522985, - "lon" : -122.688091, - "name" : "W Burnside & NW 17th", - "stopCode" : "10809", - "stopId" : "prt:10809", - "stopIndex" : 103, - "stopSequence" : 104, + "arrival" : "2009-11-17T18:29:00.000+00:00", + "departure" : "2009-11-17T18:29:00.000+00:00", + "lat" : 45.52206, + "lon" : -122.689577, + "name" : "SW Morrison & 17th", + "stopCode" : "9599", + "stopId" : "prt:9599", + "stopIndex" : 65, + "stopSequence" : 66, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:40:00.000+00:00", - "departure" : "2009-11-17T18:40:00.000+00:00", + "arrival" : "2009-11-17T18:29:54.000+00:00", + "departure" : "2009-11-17T18:29:54.000+00:00", "lat" : 45.523097, "lon" : -122.690083, "name" : "W Burnside & NW 19th", "stopCode" : "735", "stopId" : "prt:735", - "stopIndex" : 104, - "stopSequence" : 105, + "stopIndex" : 66, + "stopSequence" : 67, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:40:27.000+00:00", - "departure" : "2009-11-17T18:40:27.000+00:00", + "arrival" : "2009-11-17T18:30:31.000+00:00", + "departure" : "2009-11-17T18:30:31.000+00:00", "lat" : 45.523176, "lon" : -122.692139, "name" : "W Burnside & NW 20th", "stopCode" : "741", "stopId" : "prt:741", - "stopIndex" : 105, - "stopSequence" : 106, + "stopIndex" : 67, + "stopSequence" : 68, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:40:40.000+00:00", - "departure" : "2009-11-17T18:40:40.000+00:00", + "arrival" : "2009-11-17T18:30:48.000+00:00", + "departure" : "2009-11-17T18:30:48.000+00:00", "lat" : 45.52322, "lon" : -122.69313, "name" : "W Burnside & NW 20th Pl", "stopCode" : "742", "stopId" : "prt:742", - "stopIndex" : 106, - "stopSequence" : 107, + "stopIndex" : 68, + "stopSequence" : 69, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:31:20.000+00:00", + "departure" : "2009-11-17T18:31:20.000+00:00", + "lat" : 45.523312, + "lon" : -122.694901, + "name" : "W Burnside & NW King", + "stopCode" : "747", + "stopId" : "prt:747", + "stopIndex" : 69, + "stopSequence" : 70, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:32:18.000+00:00", + "departure" : "2009-11-17T18:32:18.000+00:00", + "lat" : 45.523512, + "lon" : -122.698081, + "name" : "W Burnside & NW 23rd", + "stopCode" : "755", + "stopId" : "prt:755", + "stopIndex" : 70, + "stopSequence" : 71, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:33:11.000+00:00", + "departure" : "2009-11-17T18:33:11.000+00:00", + "lat" : 45.525416, + "lon" : -122.698381, + "name" : "NW 23rd & Flanders", + "stopCode" : "7157", + "stopId" : "prt:7157", + "stopIndex" : 71, + "stopSequence" : 72, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:34:05.000+00:00", + "departure" : "2009-11-17T18:34:05.000+00:00", + "lat" : 45.527543, + "lon" : -122.698473, + "name" : "NW 23rd & Irving", + "stopCode" : "7161", + "stopId" : "prt:7161", + "stopIndex" : 72, + "stopSequence" : 73, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + { + "arrival" : "2009-11-17T18:35:00.000+00:00", + "departure" : "2009-11-17T18:35:00.000+00:00", + "lat" : 45.529681, + "lon" : -122.698529, + "name" : "NW 23rd & Lovejoy", + "stopCode" : "7163", + "stopId" : "prt:7163", + "stopIndex" : 73, + "stopSequence" : 74, "vertexType" : "TRANSIT", "zoneId" : "1" } ], "legGeometry" : { - "length" : 94, - "points" : "coztGd}qkVNl@r@`CZhA`A`D??Ph@l@tBb@rARh@Pd@???BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A??@rBBzDBpE@~A???Z@tD@RBnEB|A???@BdB?lEBjA??BnBApF@dB?X?^@r@?f@@bCAx@EtB???VChAE|BGnD??AXKnEGnD???XGjD??AZEfCC`AEzB" + "length" : 135, + "points" : "kaytG||qkVA~@?jE?tC???r@AhE?jE?rA???tBAjE?nD???X?hE?xC??Ah@?pE?~C???J?`@?vAAvBEbE?jEAlE?`BAbB@d@??@tAAj@Cx@Cb@Cp@_@dEcAtFoA`IS~@i@`BmAzDi@zAc@pAi@~C??Id@u@jEm@bD??If@u@jEk@bD??If@u@|DW`B??CPs@|Du@lElBz@??VJbCfAk@dD??Id@w@rEWvAId@AF??Q~@s@`Ei@~C??Ib@u@dEWzA??]jB]MQSe@WOKOKIIQe@GWE]GnD??AXKnEGnD???XGjD??AZEfCC`AEzB??AXCfAGxDE|AEtBIlC??APkAh@o@?sCB{BD??S?mCDmCDyBB??U?mCDmCDyBB??S?oCDmCDmCBo@@" }, "mode" : "BUS", "pathway" : false, "realTime" : false, - "route" : "Burnside/Stark", - "routeId" : "prt:20", - "routeLongName" : "Burnside/Stark", - "routeShortName" : "20", + "route" : "Belmont/NW 23rd", + "routeId" : "prt:15", + "routeLongName" : "Belmont/NW 23rd", + "routeShortName" : "15", "routeType" : 3, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:27:58.000+00:00", + "startTime" : "2009-11-17T18:15:40.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T18:41:03.000+00:00", - "departure" : "2009-11-17T18:41:03.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", - "stopIndex" : 107, - "stopSequence" : 108, + "arrival" : "2009-11-17T18:35:54.000+00:00", + "departure" : "2009-11-17T18:35:54.000+00:00", + "lat" : 45.532159, + "lon" : -122.698634, + "name" : "NW 23rd & Overton", + "stopCode" : "8981", + "stopId" : "prt:8981", + "stopIndex" : 74, + "stopSequence" : 75, "vertexType" : "TRANSIT", "zoneId" : "1" }, "transitLeg" : true, - "tripBlockId" : "2071", - "tripId" : "prt:200W1210" + "tripBlockId" : "1549", + "tripId" : "prt:150W1400" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 999.1, - "endTime" : "2009-11-17T18:53:55.000+00:00", + "distance" : 266.21, + "endTime" : "2009-11-17T18:39:22.000+00:00", "from" : { - "arrival" : "2009-11-17T18:41:03.000+00:00", - "departure" : "2009-11-17T18:41:03.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", + "arrival" : "2009-11-17T18:35:54.000+00:00", + "departure" : "2009-11-17T18:35:54.000+00:00", + "lat" : 45.532159, + "lon" : -122.698634, + "name" : "NW 23rd & Overton", + "stopCode" : "8981", + "stopId" : "prt:8981", "vertexType" : "TRANSIT", "zoneId" : "1" }, - "generalizedCost" : 1511, + "generalizedCost" : 405, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 29, - "points" : "ugztGdzzkVL?ATClAI|DK?G?mCBkCDoCDmCBoCDkCBoCB[?sBD]?Y@eA@K?C?K?W@{A@M@C@I?_CB?G" + "length" : 13, + "points" : "}~{tGnq{kV?LVAF?J?L?rBCLA?Q?EAyAEcH?G" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:41:03.000+00:00", + "startTime" : "2009-11-17T18:35:54.000+00:00", "steps" : [ { - "absoluteDirection" : "WEST", + "absoluteDirection" : "SOUTH", "area" : false, "bogusName" : false, - "distance" : 113.27, + "distance" : 104.46, "elevation" : "", - "lat" : 45.5232491, - "lon" : -122.6949067, + "lat" : 45.5321578, + "lon" : -122.6987026, "relativeDirection" : "DEPART", "stayOn" : false, - "streetName" : "West Burnside Street", - "walkingBike" : false - }, - { - "absoluteDirection" : "NORTH", - "area" : false, - "bogusName" : false, - "distance" : 882.16, - "elevation" : "", - "lat" : 45.5233204, - "lon" : -122.696357, - "relativeDirection" : "RIGHT", - "stayOn" : false, - "streetName" : "Northwest 22nd Avenue", + "streetName" : "Northwest 23rd Avenue", "walkingBike" : false }, { "absoluteDirection" : "EAST", "area" : false, "bogusName" : false, - "distance" : 3.68, + "distance" : 161.77, "elevation" : "", - "lat" : 45.5312508, - "lon" : -122.6966386, - "relativeDirection" : "RIGHT", + "lat" : 45.5312188, + "lon" : -122.6986675, + "relativeDirection" : "LEFT", "stayOn" : false, "streetName" : "Northwest Northrup Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:53:55.000+00:00", + "arrival" : "2009-11-17T18:39:22.000+00:00", "lat" : 45.53122, "lon" : -122.69659, "name" : "NW Northrup St. & NW 22nd Ave. (P2)", @@ -1996,21 +2792,21 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "walkingBike" : false } ], - "startTime" : "2009-11-17T18:19:04.000+00:00", + "startTime" : "2009-11-17T18:11:56.000+00:00", "tooSloped" : false, "transfers" : 0, - "transitTime" : 785, + "transitTime" : 1214, "waitingTime" : 0, - "walkDistance" : 1672.66, + "walkDistance" : 556.93, "walkLimitExceeded" : false, - "walkTime" : 1306 + "walkTime" : 432 }, { "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 1716, + "duration" : 1635, "elevationGained" : 0.0, "elevationLost" : 0.0, - "endTime" : "2009-11-17T18:55:32.000+00:00", + "endTime" : "2009-11-17T18:46:19.000+00:00", "fare" : { "details" : { }, "fare" : { }, @@ -2034,42 +2830,62 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "name" : "regular" } ] + }, + { + "legIndices" : [ + 5 + ], + "products" : [ + { + "amount" : { + "cents" : 200, + "currency" : { + "currency" : "USD", + "currencyCode" : "USD", + "defaultFractionDigits" : 2, + "symbol" : "$" + } + }, + "id" : "prt:8", + "name" : "regular" + } + ] } ] }, - "generalizedCost" : 2732, + "generalizedCost" : 3652, "legs" : [ { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 290.72, - "endTime" : "2009-11-17T18:30:40.000+00:00", + "distance" : 673.56, + "endTime" : "2009-11-17T18:27:58.000+00:00", "from" : { - "departure" : "2009-11-17T18:26:56.000+00:00", + "departure" : "2009-11-17T18:19:04.000+00:00", "lat" : 45.51932, "lon" : -122.648567, "name" : "SE Stark St. & SE 17th Ave. (P0)", "vertexType" : "NORMAL" }, - "generalizedCost" : 442, + "generalizedCost" : 1031, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 6, - "points" : "unytGpxqkVjC?lC@nC@?fCG?" + "length" : 42, + "points" : "unytGpxqkVA??dACpB@PoC?_CAM?aC??A?A?A?A??AA?AAA??AAA???A?A?A???A@A??@A@?@??A@?@?BcC?mCAmCAmC?QBIYIWOH" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:26:56.000+00:00", + "startTime" : "2009-11-17T18:19:04.000+00:00", "steps" : [ { - "absoluteDirection" : "SOUTH", + "absoluteDirection" : "NORTH", "area" : false, "bogusName" : false, - "distance" : 237.26, + "distance" : 0.69, "elevation" : "", "lat" : 45.51932, "lon" : -122.6485648, @@ -2082,735 +2898,406 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 53.47, + "distance" : 79.12, "elevation" : "", - "lat" : 45.5171863, - "lon" : -122.6485801, - "relativeDirection" : "RIGHT", + "lat" : 45.5193262, + "lon" : -122.6485648, + "relativeDirection" : "LEFT", "stayOn" : false, - "streetName" : "Southeast Morrison Street", + "streetName" : "Southeast Stark Street", "walkingBike" : false - } - ], - "to" : { - "arrival" : "2009-11-17T18:30:40.000+00:00", - "departure" : "2009-11-17T18:30:40.000+00:00", - "lat" : 45.517226, - "lon" : -122.649266, - "name" : "SE Morrison & 16th", - "stopCode" : "4019", - "stopId" : "prt:4019", - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - "transitLeg" : false, - "walkingBike" : false - }, - { - "agencyId" : "prt:prt", - "agencyName" : "TriMet", - "agencyTimeZoneOffset" : -28800000, - "agencyUrl" : "http://trimet.org", - "arrivalDelay" : 0, - "departureDelay" : 0, - "distance" : 5218.86, - "endTime" : "2009-11-17T18:52:04.000+00:00", - "from" : { - "arrival" : "2009-11-17T18:30:40.000+00:00", - "departure" : "2009-11-17T18:30:40.000+00:00", - "lat" : 45.517226, - "lon" : -122.649266, - "name" : "SE Morrison & 16th", - "stopCode" : "4019", - "stopId" : "prt:4019", - "stopIndex" : 50, - "stopSequence" : 51, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - "generalizedCost" : 1884, - "headsign" : "NW 27th & Thurman", - "interlineWithPreviousLeg" : false, - "intermediateStops" : [ - { - "arrival" : "2009-11-17T18:31:15.000+00:00", - "departure" : "2009-11-17T18:31:15.000+00:00", - "lat" : 45.517253, - "lon" : -122.651354, - "name" : "SE Morrison & 14th", - "stopCode" : "4016", - "stopId" : "prt:4016", - "stopIndex" : 51, - "stopSequence" : 52, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:32:00.000+00:00", - "departure" : "2009-11-17T18:32:00.000+00:00", - "lat" : 45.517299, - "lon" : -122.654067, - "name" : "SE Morrison & 12th", - "stopCode" : "4014", - "stopId" : "prt:4014", - "stopIndex" : 52, - "stopSequence" : 53, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:32:38.000+00:00", - "departure" : "2009-11-17T18:32:38.000+00:00", - "lat" : 45.517292, - "lon" : -122.656563, - "name" : "SE Morrison & 9th", - "stopCode" : "4026", - "stopId" : "prt:4026", - "stopIndex" : 53, - "stopSequence" : 54, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:33:08.000+00:00", - "departure" : "2009-11-17T18:33:08.000+00:00", - "lat" : 45.517322, - "lon" : -122.65847, - "name" : "SE Morrison & 7th", - "stopCode" : "4025", - "stopId" : "prt:4025", - "stopIndex" : 54, - "stopSequence" : 55, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:33:39.000+00:00", - "departure" : "2009-11-17T18:33:39.000+00:00", - "lat" : 45.517298, - "lon" : -122.660523, - "name" : "SE Morrison & Grand", - "stopCode" : "4013", - "stopId" : "prt:4013", - "stopIndex" : 55, - "stopSequence" : 56, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:35:03.000+00:00", - "departure" : "2009-11-17T18:35:03.000+00:00", - "lat" : 45.517351, - "lon" : -122.66601, - "name" : "Morrison Bridge", - "stopCode" : "4029", - "stopId" : "prt:4029", - "stopIndex" : 56, - "stopSequence" : 57, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:37:27.000+00:00", - "departure" : "2009-11-17T18:37:27.000+00:00", - "lat" : 45.51959, - "lon" : -122.674599, - "name" : "SW Washington & 3rd", - "stopCode" : "6158", - "stopId" : "prt:6158", - "stopIndex" : 57, - "stopSequence" : 58, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:38:00.000+00:00", - "departure" : "2009-11-17T18:38:00.000+00:00", - "lat" : 45.520129, - "lon" : -122.676635, - "name" : "SW Washington & 5th", - "stopCode" : "6160", - "stopId" : "prt:6160", - "stopIndex" : 58, - "stopSequence" : 59, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:38:52.000+00:00", - "departure" : "2009-11-17T18:38:52.000+00:00", - "lat" : 45.520695, - "lon" : -122.678657, - "name" : "SW Washington & Broadway", - "stopCode" : "6137", - "stopId" : "prt:6137", - "stopIndex" : 59, - "stopSequence" : 60, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:39:34.000+00:00", - "departure" : "2009-11-17T18:39:34.000+00:00", - "lat" : 45.521124, - "lon" : -122.6803, - "name" : "SW Washington & 9th", - "stopCode" : "6169", - "stopId" : "prt:6169", - "stopIndex" : 60, - "stopSequence" : 61, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:40:47.000+00:00", - "departure" : "2009-11-17T18:40:47.000+00:00", - "lat" : 45.521094, - "lon" : -122.682819, - "name" : "SW 11th & Alder", - "stopCode" : "9600", - "stopId" : "prt:9600", - "stopIndex" : 61, - "stopSequence" : 62, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:41:36.000+00:00", - "departure" : "2009-11-17T18:41:36.000+00:00", - "lat" : 45.52055, - "lon" : -122.683933, - "name" : "SW Morrison & 12th", - "stopCode" : "9598", - "stopId" : "prt:9598", - "stopIndex" : 62, - "stopSequence" : 63, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:42:25.000+00:00", - "departure" : "2009-11-17T18:42:25.000+00:00", - "lat" : 45.521063, - "lon" : -122.685848, - "name" : "SW Morrison & 14th", - "stopCode" : "9708", - "stopId" : "prt:9708", - "stopIndex" : 63, - "stopSequence" : 64, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:43:18.000+00:00", - "departure" : "2009-11-17T18:43:18.000+00:00", - "lat" : 45.521641, - "lon" : -122.687932, - "name" : "SW Morrison & 16th", - "stopCode" : "9613", - "stopId" : "prt:9613", - "stopIndex" : 64, - "stopSequence" : 65, - "vertexType" : "TRANSIT", - "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:44:00.000+00:00", - "departure" : "2009-11-17T18:44:00.000+00:00", - "lat" : 45.52206, - "lon" : -122.689577, - "name" : "SW Morrison & 17th", - "stopCode" : "9599", - "stopId" : "prt:9599", - "stopIndex" : 65, - "stopSequence" : 66, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:45:03.000+00:00", - "departure" : "2009-11-17T18:45:03.000+00:00", - "lat" : 45.523097, - "lon" : -122.690083, - "name" : "W Burnside & NW 19th", - "stopCode" : "735", - "stopId" : "prt:735", - "stopIndex" : 66, - "stopSequence" : 67, - "vertexType" : "TRANSIT", - "zoneId" : "1" + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 402.13, + "elevation" : "", + "lat" : 45.5193388, + "lon" : -122.6495798, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Southeast 16th Avenue", + "walkingBike" : false }, { - "arrival" : "2009-11-17T18:45:46.000+00:00", - "departure" : "2009-11-17T18:45:46.000+00:00", - "lat" : 45.523176, - "lon" : -122.692139, - "name" : "W Burnside & NW 20th", - "stopCode" : "741", - "stopId" : "prt:741", - "stopIndex" : 67, - "stopSequence" : 68, - "vertexType" : "TRANSIT", - "zoneId" : "1" + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : false, + "distance" : 168.89, + "elevation" : "", + "lat" : 45.5228912, + "lon" : -122.6495528, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Northeast 16th Avenue", + "walkingBike" : false }, { - "arrival" : "2009-11-17T18:46:07.000+00:00", - "departure" : "2009-11-17T18:46:07.000+00:00", - "lat" : 45.52322, - "lon" : -122.69313, - "name" : "W Burnside & NW 20th Pl", - "stopCode" : "742", - "stopId" : "prt:742", - "stopIndex" : 68, - "stopSequence" : 69, + "absoluteDirection" : "NORTHEAST", + "area" : false, + "bogusName" : false, + "distance" : 22.74, + "elevation" : "", + "lat" : 45.524409, + "lon" : -122.6495675, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "Northeast Sandy Boulevard", + "walkingBike" : false + } + ], + "to" : { + "arrival" : "2009-11-17T18:27:58.000+00:00", + "departure" : "2009-11-17T18:27:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "transitLeg" : false, + "walkingBike" : false + }, + { + "agencyId" : "prt:prt", + "agencyName" : "TriMet", + "agencyTimeZoneOffset" : -28800000, + "agencyUrl" : "http://trimet.org", + "arrivalDelay" : 0, + "departureDelay" : 0, + "distance" : 2119.06, + "endTime" : "2009-11-17T18:34:00.000+00:00", + "from" : { + "arrival" : "2009-11-17T18:27:58.000+00:00", + "departure" : "2009-11-17T18:27:58.000+00:00", + "lat" : 45.524581, + "lon" : -122.649367, + "name" : "NE Sandy & 16th", + "stopCode" : "5060", + "stopId" : "prt:5060", + "stopIndex" : 92, + "stopSequence" : 93, + "vertexType" : "TRANSIT", + "zoneId" : "1" + }, + "generalizedCost" : 962, + "headsign" : "23rd Ave to Tichner", + "interlineWithPreviousLeg" : false, + "intermediateStops" : [ + { + "arrival" : "2009-11-17T18:28:32.000+00:00", + "departure" : "2009-11-17T18:28:32.000+00:00", + "lat" : 45.523767, + "lon" : -122.651428, + "name" : "NE Sandy & 14th", + "stopCode" : "5058", + "stopId" : "prt:5058", + "stopIndex" : 93, + "stopSequence" : 94, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:46:44.000+00:00", - "departure" : "2009-11-17T18:46:44.000+00:00", - "lat" : 45.523312, - "lon" : -122.694901, - "name" : "W Burnside & NW King", - "stopCode" : "747", - "stopId" : "prt:747", - "stopIndex" : 69, - "stopSequence" : 70, + "arrival" : "2009-11-17T18:29:00.000+00:00", + "departure" : "2009-11-17T18:29:00.000+00:00", + "lat" : 45.523103, + "lon" : -122.653064, + "name" : "NE Sandy & 12th", + "stopCode" : "5055", + "stopId" : "prt:5055", + "stopIndex" : 94, + "stopSequence" : 95, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:47:51.000+00:00", - "departure" : "2009-11-17T18:47:51.000+00:00", - "lat" : 45.523512, - "lon" : -122.698081, - "name" : "W Burnside & NW 23rd", - "stopCode" : "755", - "stopId" : "prt:755", - "stopIndex" : 70, - "stopSequence" : 71, + "arrival" : "2009-11-17T18:29:47.000+00:00", + "departure" : "2009-11-17T18:29:47.000+00:00", + "lat" : 45.523024, + "lon" : -122.656526, + "name" : "E Burnside & NE 9th", + "stopCode" : "819", + "stopId" : "prt:819", + "stopIndex" : 95, + "stopSequence" : 96, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:48:53.000+00:00", - "departure" : "2009-11-17T18:48:53.000+00:00", - "lat" : 45.525416, - "lon" : -122.698381, - "name" : "NW 23rd & Flanders", - "stopCode" : "7157", - "stopId" : "prt:7157", - "stopIndex" : 71, - "stopSequence" : 72, + "arrival" : "2009-11-17T18:30:24.000+00:00", + "departure" : "2009-11-17T18:30:24.000+00:00", + "lat" : 45.523012, + "lon" : -122.659365, + "name" : "E Burnside & NE 6th", + "stopCode" : "805", + "stopId" : "prt:805", + "stopIndex" : 96, + "stopSequence" : 97, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:49:56.000+00:00", - "departure" : "2009-11-17T18:49:56.000+00:00", - "lat" : 45.527543, - "lon" : -122.698473, - "name" : "NW 23rd & Irving", - "stopCode" : "7161", - "stopId" : "prt:7161", - "stopIndex" : 72, - "stopSequence" : 73, + "arrival" : "2009-11-17T18:30:52.000+00:00", + "departure" : "2009-11-17T18:30:52.000+00:00", + "lat" : 45.523015, + "lon" : -122.661534, + "name" : "E Burnside & NE M L King", + "stopCode" : "705", + "stopId" : "prt:705", + "stopIndex" : 97, + "stopSequence" : 98, "vertexType" : "TRANSIT", "zoneId" : "1" }, { - "arrival" : "2009-11-17T18:51:00.000+00:00", - "departure" : "2009-11-17T18:51:00.000+00:00", - "lat" : 45.529681, - "lon" : -122.698529, - "name" : "NW 23rd & Lovejoy", - "stopCode" : "7163", - "stopId" : "prt:7163", - "stopIndex" : 73, - "stopSequence" : 74, + "arrival" : "2009-11-17T18:33:00.000+00:00", + "departure" : "2009-11-17T18:33:00.000+00:00", + "lat" : 45.523249, + "lon" : -122.671269, + "name" : "W Burnside & Burnside Bridge", + "stopCode" : "689", + "stopId" : "prt:689", + "stopIndex" : 98, + "stopSequence" : 99, "vertexType" : "TRANSIT", - "zoneId" : "1" + "zoneId" : "0" } ], "legGeometry" : { - "length" : 135, - "points" : "kaytG||qkVA~@?jE?tC???r@AhE?jE?rA???tBAjE?nD???X?hE?xC??Ah@?pE?~C???J?`@?vAAvBEbE?jEAlE?`BAbB@d@??@tAAj@Cx@Cb@Cp@_@dEcAtFoA`IS~@i@`BmAzDi@zAc@pAi@~C??Id@u@jEm@bD??If@u@jEk@bD??If@u@|DW`B??CPs@|Du@lElBz@??VJbCfAk@dD??Id@w@rEWvAId@AF??Q~@s@`Ei@~C??Ib@u@dEWzA??]jB]MQSe@WOKOKIIQe@GWE]GnD??AXKnEGnD???XGjD??AZEfCC`AEzB??AXCfAGxDE|AEtBIlC??APkAh@o@?sCB{BD??S?mCDmCDyBB??U?mCDmCDyBB??S?oCDmCDmCBo@@" + "length" : 50, + "points" : "coztGd}qkVNl@r@`CZhA`A`D??Ph@l@tBb@rARh@Pd@???BPj@@jA?jEAhE?pD???VAjE?hE?dB?b@???`AAhE?dD???l@C`EAhEEhE?bAA|@?XAZ@\\AzACnGKbKAjC?bE???JEnE@fEDlE@hE@~A" }, "mode" : "BUS", "pathway" : false, "realTime" : false, - "route" : "Belmont/NW 23rd", - "routeId" : "prt:15", - "routeLongName" : "Belmont/NW 23rd", - "routeShortName" : "15", + "route" : "Burnside/Stark", + "routeId" : "prt:20", + "routeLongName" : "Burnside/Stark", + "routeShortName" : "20", "routeType" : 3, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:30:40.000+00:00", + "startTime" : "2009-11-17T18:27:58.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T18:52:04.000+00:00", - "departure" : "2009-11-17T18:52:04.000+00:00", - "lat" : 45.532159, - "lon" : -122.698634, - "name" : "NW 23rd & Overton", - "stopCode" : "8981", - "stopId" : "prt:8981", - "stopIndex" : 74, - "stopSequence" : 75, + "arrival" : "2009-11-17T18:34:00.000+00:00", + "departure" : "2009-11-17T18:34:00.000+00:00", + "lat" : 45.523169, + "lon" : -122.675893, + "name" : "W Burnside & NW 5th", + "stopCode" : "782", + "stopId" : "prt:782", + "stopIndex" : 99, + "stopSequence" : 100, "vertexType" : "TRANSIT", - "zoneId" : "1" + "zoneId" : "0" }, "transitLeg" : true, - "tripBlockId" : "1541", - "tripId" : "prt:150W1410" + "tripBlockId" : "2071", + "tripId" : "prt:200W1210" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 266.21, - "endTime" : "2009-11-17T18:55:32.000+00:00", + "distance" : 0.0, + "endTime" : "2009-11-17T18:34:00.000+00:00", "from" : { - "arrival" : "2009-11-17T18:52:04.000+00:00", - "departure" : "2009-11-17T18:52:04.000+00:00", - "lat" : 45.532159, - "lon" : -122.698634, - "name" : "NW 23rd & Overton", - "stopCode" : "8981", - "stopId" : "prt:8981", + "arrival" : "2009-11-17T18:34:00.000+00:00", + "departure" : "2009-11-17T18:34:00.000+00:00", + "lat" : 45.523169, + "lon" : -122.675893, + "name" : "W Burnside & NW 5th", + "stopCode" : "782", + "stopId" : "prt:782", "vertexType" : "TRANSIT", - "zoneId" : "1" + "zoneId" : "0" }, - "generalizedCost" : 405, + "generalizedCost" : 1, "interlineWithPreviousLeg" : false, + "legElevation" : "", "legGeometry" : { - "length" : 13, - "points" : "}~{tGnq{kV?LVAF?J?L?rBCLA?Q?EAyAEcH?G" + "length" : 2, + "points" : "wfztGjcwkVD?" }, "mode" : "WALK", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:52:04.000+00:00", - "steps" : [ - { - "absoluteDirection" : "SOUTH", - "area" : false, - "bogusName" : false, - "distance" : 104.46, - "elevation" : "", - "lat" : 45.5321578, - "lon" : -122.6987026, - "relativeDirection" : "DEPART", - "stayOn" : false, - "streetName" : "Northwest 23rd Avenue", - "walkingBike" : false - }, - { - "absoluteDirection" : "EAST", - "area" : false, - "bogusName" : false, - "distance" : 161.77, - "elevation" : "", - "lat" : 45.5312188, - "lon" : -122.6986675, - "relativeDirection" : "LEFT", - "stayOn" : false, - "streetName" : "Northwest Northrup Street", - "walkingBike" : false - } - ], + "startTime" : "2009-11-17T18:34:00.000+00:00", + "steps" : [ ], "to" : { - "arrival" : "2009-11-17T18:55:32.000+00:00", - "lat" : 45.53122, - "lon" : -122.69659, - "name" : "NW Northrup St. & NW 22nd Ave. (P2)", + "arrival" : "2009-11-17T18:34:00.000+00:00", + "departure" : "2009-11-17T18:34:00.000+00:00", + "lat" : 45.5231324, + "lon" : -122.6758917, + "name" : "West Burnside Street", "vertexType" : "NORMAL" }, - "transitLeg" : false, - "walkingBike" : false - } - ], - "startTime" : "2009-11-17T18:26:56.000+00:00", - "tooSloped" : false, - "transfers" : 0, - "transitTime" : 1284, - "waitingTime" : 0, - "walkDistance" : 556.93, - "walkLimitExceeded" : false, - "walkTime" : 432 - }, - { - "arrivedAtDestinationWithRentedBicycle" : false, - "duration" : 1778, - "elevationGained" : 0.0, - "elevationLost" : 0.0, - "endTime" : "2009-11-17T19:08:19.000+00:00", - "fare" : { - "details" : { }, - "fare" : { }, - "legProducts" : [ - { - "legIndices" : [ - 1 - ], - "products" : [ - { - "amount" : { - "cents" : 200, - "currency" : { - "currency" : "USD", - "currencyCode" : "USD", - "defaultFractionDigits" : 2, - "symbol" : "$" - } - }, - "id" : "prt:8", - "name" : "regular" - } - ] - }, - { - "legIndices" : [ - 2 - ], - "products" : [ - { - "amount" : { - "cents" : 200, - "currency" : { - "currency" : "USD", - "currencyCode" : "USD", - "defaultFractionDigits" : 2, - "symbol" : "$" - } - }, - "id" : "prt:8", - "name" : "regular" - } - ] - } - ] - }, - "generalizedCost" : 3296, - "legs" : [ + "transitLeg" : false, + "walkingBike" : false + }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 408.65, - "endTime" : "2009-11-17T18:44:00.000+00:00", + "distance" : 1767.93, + "endTime" : "2009-11-17T18:39:16.000+00:00", "from" : { - "departure" : "2009-11-17T18:38:41.000+00:00", - "lat" : 45.51932, - "lon" : -122.648567, - "name" : "SE Stark St. & SE 17th Ave. (P0)", + "arrival" : "2009-11-17T18:34:00.000+00:00", + "departure" : "2009-11-17T18:34:00.000+00:00", + "lat" : 45.5231324, + "lon" : -122.6758917, + "name" : "West Burnside Street", "vertexType" : "NORMAL" }, - "generalizedCost" : 623, + "generalizedCost" : 510, "interlineWithPreviousLeg" : false, "legGeometry" : { - "length" : 16, - "points" : "unytGpxqkVA??dACpB@P?f@?p@?j@?dAAhE?jE?vD?PJ?J@?S" + "length" : 97, + "points" : "qfztGjcwkV@`B?H?BM?iBBI?K?wBBK?K?sBDM@M@sB@K?K?uBBM?K?uBBI@K?aBBSAM@M@K?GBEDEHIJUX_@f@KNQRSVGFCBQPIHGDGBIBK@W@a@?mA@E?C@C@A?CBQTKJEHIJeC~CYZo@v@g@d@IJAFAD?L@vC@hB@p@?X?T@P?N@P@nA?j@AX?L@`B@dA?R?RBbD?T?NBbD?R?P@|D@jB?x@@J?N?B?P?LBjD@N" }, - "mode" : "WALK", + "mode" : "CAR", "pathway" : false, "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T18:38:41.000+00:00", + "startTime" : "2009-11-17T18:34:00.000+00:00", "steps" : [ { - "absoluteDirection" : "NORTH", + "absoluteDirection" : "WEST", "area" : false, "bogusName" : false, - "distance" : 0.69, + "distance" : 44.21, "elevation" : "", - "lat" : 45.51932, - "lon" : -122.6485648, + "lat" : 45.5231324, + "lon" : -122.6758917, "relativeDirection" : "DEPART", "stayOn" : false, - "streetName" : "Southeast 17th Avenue", + "streetName" : "West Burnside Street", "walkingBike" : false }, { - "absoluteDirection" : "WEST", + "absoluteDirection" : "NORTH", "area" : false, "bogusName" : false, - "distance" : 395.42, + "distance" : 548.38, "elevation" : "", - "lat" : 45.5193262, - "lon" : -122.6485648, - "relativeDirection" : "LEFT", + "lat" : 45.5231221, + "lon" : -122.676459, + "relativeDirection" : "RIGHT", "stayOn" : false, - "streetName" : "Southeast Stark Street", + "streetName" : "Northwest 6th Avenue", "walkingBike" : false }, { - "absoluteDirection" : "SOUTH", + "absoluteDirection" : "NORTH", "area" : false, "bogusName" : false, - "distance" : 12.54, + "distance" : 465.44, "elevation" : "", - "lat" : 45.5193421, - "lon" : -122.6536397, + "lat" : 45.5280515, + "lon" : -122.6766232, + "relativeDirection" : "CONTINUE", + "stayOn" : false, + "streetName" : "Northwest Station Way", + "walkingBike" : false + }, + { + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 709.95, + "elevation" : "", + "lat" : 45.5315452, + "lon" : -122.679511, "relativeDirection" : "LEFT", "stayOn" : false, - "streetName" : "Southeast 12th Avenue", + "streetName" : "Northwest Northrup Street", "walkingBike" : false } ], "to" : { - "arrival" : "2009-11-17T18:44:00.000+00:00", - "departure" : "2009-11-17T18:44:00.000+00:00", - "lat" : 45.519229, - "lon" : -122.653546, - "name" : "SE 12th & Stark", - "stopCode" : "6594", - "stopId" : "prt:6594", - "vertexType" : "TRANSIT", - "zoneId" : "1" + "arrival" : "2009-11-17T18:39:16.000+00:00", + "departure" : "2009-11-17T18:39:16.000+00:00", + "lat" : 45.5313992, + "lon" : -122.6886162, + "name" : "corner of Northwest Northrup Street and path", + "vertexType" : "NORMAL" }, "transitLeg" : false, "walkingBike" : false }, { - "agencyId" : "prt:prt", - "agencyName" : "TriMet", "agencyTimeZoneOffset" : -28800000, - "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 1794.66, - "endTime" : "2009-11-17T18:51:01.000+00:00", + "distance" : 70.46, + "endTime" : "2009-11-17T18:41:18.000+00:00", "from" : { - "arrival" : "2009-11-17T18:44:00.000+00:00", - "departure" : "2009-11-17T18:44:00.000+00:00", - "lat" : 45.519229, - "lon" : -122.653546, - "name" : "SE 12th & Stark", - "stopCode" : "6594", - "stopId" : "prt:6594", - "stopIndex" : 32, - "stopSequence" : 33, - "vertexType" : "TRANSIT", - "zoneId" : "1" + "arrival" : "2009-11-17T18:39:16.000+00:00", + "departure" : "2009-11-17T18:39:16.000+00:00", + "lat" : 45.5313992, + "lon" : -122.6886162, + "name" : "corner of Northwest Northrup Street and path", + "vertexType" : "NORMAL" }, - "generalizedCost" : 1021, - "headsign" : "Rose Qtr TC", + "generalizedCost" : 233, "interlineWithPreviousLeg" : false, - "intermediateStops" : [ - { - "arrival" : "2009-11-17T18:44:44.000+00:00", - "departure" : "2009-11-17T18:44:44.000+00:00", - "lat" : 45.520674, - "lon" : -122.653544, - "name" : "SE 12th & Pine", - "stopCode" : "6589", - "stopId" : "prt:6589", - "stopIndex" : 33, - "stopSequence" : 34, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:46:00.000+00:00", - "departure" : "2009-11-17T18:46:00.000+00:00", - "lat" : 45.52318, - "lon" : -122.653507, - "name" : "NE 12th & Sandy", - "stopCode" : "6592", - "stopId" : "prt:6592", - "stopIndex" : 34, - "stopSequence" : 35, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:47:45.000+00:00", - "departure" : "2009-11-17T18:47:45.000+00:00", - "lat" : 45.527449, - "lon" : -122.653462, - "name" : "NE 12th & Irving", - "stopCode" : "6582", - "stopId" : "prt:6582", - "stopIndex" : 35, - "stopSequence" : 36, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T18:49:00.000+00:00", - "departure" : "2009-11-17T18:49:00.000+00:00", - "lat" : 45.529793, - "lon" : -122.654429, - "name" : "NE 11th & Holladay", - "stopCode" : "8513", - "stopId" : "prt:8513", - "stopIndex" : 36, - "stopSequence" : 37, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, + "legGeometry" : { + "length" : 7, + "points" : "ez{tGzrykVC?I?@nBBH?d@??" + }, + "mode" : "WALK", + "pathway" : false, + "realTime" : false, + "rentedBike" : false, + "route" : "", + "startTime" : "2009-11-17T18:39:16.000+00:00", + "steps" : [ { - "arrival" : "2009-11-17T18:49:39.000+00:00", - "departure" : "2009-11-17T18:49:39.000+00:00", - "lat" : 45.53135, - "lon" : -122.654497, - "name" : "NE 11th & Multnomah", - "stopCode" : "8938", - "stopId" : "prt:8938", - "stopIndex" : 37, - "stopSequence" : 38, - "vertexType" : "TRANSIT", - "zoneId" : "0" + "absoluteDirection" : "NORTH", + "area" : false, + "bogusName" : true, + "distance" : 7.61, + "elevation" : "", + "lat" : 45.5313992, + "lon" : -122.6886162, + "relativeDirection" : "RIGHT", + "stayOn" : false, + "streetName" : "path", + "walkingBike" : false }, { - "arrival" : "2009-11-17T18:50:15.000+00:00", - "departure" : "2009-11-17T18:50:15.000+00:00", - "lat" : 45.531573, - "lon" : -122.656408, - "name" : "NE Multnomah & 9th", - "stopCode" : "4056", - "stopId" : "prt:4056", - "stopIndex" : 38, - "stopSequence" : 39, - "vertexType" : "TRANSIT", - "zoneId" : "0" + "absoluteDirection" : "WEST", + "area" : false, + "bogusName" : false, + "distance" : 62.85, + "elevation" : "", + "lat" : 45.5314676, + "lon" : -122.6886182, + "relativeDirection" : "LEFT", + "stayOn" : false, + "streetName" : "Northwest Northrup Street", + "walkingBike" : false } ], - "legGeometry" : { - "length" : 44, - "points" : "cnytGdxrkVW?mC?{BA??Q?oC?mC?kBAa@?w@???wA?mCAmC?oCA}C?sDC??aBAm@@k@AY?uABU@I@IBQFb@fC}@d@OFO@q@???Q?]?gGA??[??nJ???b@?vK?rA" - }, - "mode" : "BUS", - "pathway" : false, - "realTime" : false, - "route" : "12th Ave", - "routeId" : "prt:70", - "routeLongName" : "12th Ave", - "routeShortName" : "70", - "routeType" : 3, - "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:44:00.000+00:00", - "steps" : [ ], "to" : { - "arrival" : "2009-11-17T18:51:01.000+00:00", - "departure" : "2009-11-17T18:54:29.000+00:00", - "lat" : 45.531569, - "lon" : -122.659045, - "name" : "NE Multnomah & 7th", - "stopCode" : "4054", - "stopId" : "prt:4054", - "stopIndex" : 39, - "stopSequence" : 40, + "arrival" : "2009-11-17T18:41:18.000+00:00", + "departure" : "2009-11-17T18:43:26.000+00:00", + "lat" : 45.531434, + "lon" : -122.689417, + "name" : "NW Northrup & 18th", + "stopCode" : "10776", + "stopId" : "prt:10776", "vertexType" : "TRANSIT", - "zoneId" : "0" + "zoneId" : "1" }, - "transitLeg" : true, - "tripBlockId" : "7002", - "tripId" : "prt:700W1170" + "transitLeg" : false, + "walkingBike" : false }, { "agencyId" : "prt:prt", @@ -2819,197 +3306,79 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "agencyUrl" : "http://trimet.org", "arrivalDelay" : 0, "departureDelay" : 0, - "distance" : 3560.24, - "endTime" : "2009-11-17T19:07:55.000+00:00", + "distance" : 547.79, + "endTime" : "2009-11-17T18:45:55.000+00:00", "from" : { - "arrival" : "2009-11-17T18:51:01.000+00:00", - "departure" : "2009-11-17T18:54:29.000+00:00", - "lat" : 45.531569, - "lon" : -122.659045, - "name" : "NE Multnomah & 7th", - "stopCode" : "4054", - "stopId" : "prt:4054", - "stopIndex" : 81, - "stopSequence" : 82, + "arrival" : "2009-11-17T18:41:18.000+00:00", + "departure" : "2009-11-17T18:43:26.000+00:00", + "lat" : 45.531434, + "lon" : -122.689417, + "name" : "NW Northrup & 18th", + "stopCode" : "10776", + "stopId" : "prt:10776", + "stopIndex" : 20, + "stopSequence" : 21, "vertexType" : "TRANSIT", - "zoneId" : "0" + "zoneId" : "1" }, - "generalizedCost" : 1614, - "headsign" : "Montgomery Park", + "generalizedCost" : 877, + "headsign" : "NW 23rd Ave", "interlineWithPreviousLeg" : false, "intermediateStops" : [ { - "arrival" : "2009-11-17T18:55:05.000+00:00", - "departure" : "2009-11-17T18:55:05.000+00:00", - "lat" : 45.531586, - "lon" : -122.660482, - "name" : "NE Multnomah & Grand", - "stopCode" : "4043", - "stopId" : "prt:4043", - "stopIndex" : 82, - "stopSequence" : 83, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:56:09.000+00:00", - "departure" : "2009-11-17T18:56:09.000+00:00", - "lat" : 45.531159, - "lon" : -122.66293, - "name" : "NE Multnomah & 3rd", - "stopCode" : "11492", - "stopId" : "prt:11492", - "stopIndex" : 83, - "stopSequence" : 84, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T18:58:00.000+00:00", - "departure" : "2009-11-17T18:58:00.000+00:00", - "lat" : 45.530005, - "lon" : -122.666476, - "name" : "Rose Quarter Transit Center", - "stopCode" : "2592", - "stopId" : "prt:2592", - "stopIndex" : 84, - "stopSequence" : 85, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T19:01:20.000+00:00", - "departure" : "2009-11-17T19:01:20.000+00:00", - "lat" : 45.526655, - "lon" : -122.676462, - "name" : "NW Glisan & 6th", - "stopCode" : "10803", - "stopId" : "prt:10803", - "stopIndex" : 85, - "stopSequence" : 86, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T19:02:15.000+00:00", - "departure" : "2009-11-17T19:02:15.000+00:00", - "lat" : 45.528799, - "lon" : -122.677238, - "name" : "NW Station Way & Union Station", - "stopCode" : "12801", - "stopId" : "prt:12801", - "stopIndex" : 86, - "stopSequence" : 87, - "vertexType" : "TRANSIT", - "zoneId" : "0" - }, - { - "arrival" : "2009-11-17T19:04:00.000+00:00", - "departure" : "2009-11-17T19:04:00.000+00:00", - "lat" : 45.531582, - "lon" : -122.681193, - "name" : "NW Northrup & 10th", - "stopCode" : "12802", - "stopId" : "prt:12802", - "stopIndex" : 87, - "stopSequence" : 88, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T19:04:33.000+00:00", - "departure" : "2009-11-17T19:04:33.000+00:00", - "lat" : 45.531534, - "lon" : -122.683319, - "name" : "NW 12th & Northrup", - "stopCode" : "12796", - "stopId" : "prt:12796", - "stopIndex" : 88, - "stopSequence" : 89, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T19:05:04.000+00:00", - "departure" : "2009-11-17T19:05:04.000+00:00", - "lat" : 45.531503, - "lon" : -122.685357, - "name" : "NW Northrup & 14th", - "stopCode" : "10775", - "stopId" : "prt:10775", - "stopIndex" : 89, - "stopSequence" : 90, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T19:06:07.000+00:00", - "departure" : "2009-11-17T19:06:07.000+00:00", - "lat" : 45.531434, - "lon" : -122.689417, - "name" : "NW Northrup & 18th", - "stopCode" : "10776", - "stopId" : "prt:10776", - "stopIndex" : 90, - "stopSequence" : 91, - "vertexType" : "TRANSIT", - "zoneId" : "1" - }, - { - "arrival" : "2009-11-17T19:07:24.000+00:00", - "departure" : "2009-11-17T19:07:24.000+00:00", + "arrival" : "2009-11-17T18:45:13.000+00:00", + "departure" : "2009-11-17T18:45:13.000+00:00", "lat" : 45.531346, "lon" : -122.694455, "name" : "NW Northrup & 21st", "stopCode" : "10777", "stopId" : "prt:10777", - "stopIndex" : 91, - "stopSequence" : 92, + "stopIndex" : 21, + "stopSequence" : 22, "vertexType" : "TRANSIT", "zoneId" : "1" } ], "legGeometry" : { - "length" : 104, - "points" : "yz{tG`zskV?tBCfD???^?nE?V@Z?PH\\Nb@`@~@Rf@??`@bANb@FV@R?P?pE?jA@h@AnAbBl@LFJN\\f@LT??NXJPPVJFf@Vf@Pp@Nd@NRLB@RNXZR\\vAhC@BhAhD`AhClAbDBrDCnG@n@@^@d@HdAP`CBjEDvD???LqCFmCDYBGDEBGJkAzAQR??KNa@b@MJuBBY?OHW@u@~@aD`EcBhBBrD@xC??@l@BlE@lD???XBjEBpD???VBlE?dA@t@?b@?h@BfEBrD???VBhEFtKDvJ??@\\DnJ" + "length" : 8, + "points" : "cz{tGzwykV?VBhEFtKDvJ??@\\DnJ" }, - "mode" : "BUS", + "mode" : "TRAM", "pathway" : false, "realTime" : false, - "route" : "Broadway/Halsey", - "routeId" : "prt:77", - "routeLongName" : "Broadway/Halsey", - "routeShortName" : "77", - "routeType" : 3, + "route" : "Portland Streetcar", + "routeId" : "prt:193", + "routeLongName" : "Portland Streetcar", + "routeType" : 0, "serviceDate" : "2009-11-17", - "startTime" : "2009-11-17T18:54:29.000+00:00", + "startTime" : "2009-11-17T18:43:26.000+00:00", "steps" : [ ], "to" : { - "arrival" : "2009-11-17T19:07:55.000+00:00", - "departure" : "2009-11-17T19:07:55.000+00:00", + "arrival" : "2009-11-17T18:45:55.000+00:00", + "departure" : "2009-11-17T18:45:55.000+00:00", "lat" : 45.531308, "lon" : -122.696445, "name" : "NW Northrup & 22nd", "stopCode" : "10778", "stopId" : "prt:10778", - "stopIndex" : 92, - "stopSequence" : 93, + "stopIndex" : 22, + "stopSequence" : 23, "vertexType" : "TRANSIT", "zoneId" : "1" }, "transitLeg" : true, - "tripBlockId" : "7702", - "tripId" : "prt:771W1180" + "tripBlockId" : "9385", + "tripId" : "prt:1930W1220" }, { "agencyTimeZoneOffset" : -28800000, "arrivalDelay" : 0, "departureDelay" : 0, "distance" : 18.81, - "endTime" : "2009-11-17T19:08:19.000+00:00", + "endTime" : "2009-11-17T18:46:19.000+00:00", "from" : { - "arrival" : "2009-11-17T19:07:55.000+00:00", - "departure" : "2009-11-17T19:07:55.000+00:00", + "arrival" : "2009-11-17T18:45:55.000+00:00", + "departure" : "2009-11-17T18:45:55.000+00:00", "lat" : 45.531308, "lon" : -122.696445, "name" : "NW Northrup & 22nd", @@ -3029,7 +3398,7 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "realTime" : false, "rentedBike" : false, "route" : "", - "startTime" : "2009-11-17T19:07:55.000+00:00", + "startTime" : "2009-11-17T18:45:55.000+00:00", "steps" : [ { "absoluteDirection" : "WEST", @@ -3046,7 +3415,7 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl } ], "to" : { - "arrival" : "2009-11-17T19:08:19.000+00:00", + "arrival" : "2009-11-17T18:46:19.000+00:00", "lat" : 45.53122, "lon" : -122.69659, "name" : "NW Northrup St. & NW 22nd Ave. (P2)", @@ -3056,14 +3425,14 @@ org.opentripplanner.routing.algorithm.mapping.CarPickupSnapshotTest.test_trip_pl "walkingBike" : false } ], - "startTime" : "2009-11-17T18:38:41.000+00:00", + "startTime" : "2009-11-17T18:19:04.000+00:00", "tooSloped" : false, "transfers" : 1, - "transitTime" : 1227, - "waitingTime" : 208, - "walkDistance" : 427.46, + "transitTime" : 511, + "waitingTime" : 128, + "walkDistance" : 2530.76, "walkLimitExceeded" : false, - "walkTime" : 343 + "walkTime" : 996 } ] ] \ No newline at end of file diff --git a/application/src/test/java/org/opentripplanner/street/search/state/EdgeTraverserTest.java b/application/src/test/java/org/opentripplanner/street/search/state/EdgeTraverserTest.java new file mode 100644 index 00000000000..a2cd7e61b62 --- /dev/null +++ b/application/src/test/java/org/opentripplanner/street/search/state/EdgeTraverserTest.java @@ -0,0 +1,191 @@ +package org.opentripplanner.street.search.state; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opentripplanner.street.model._data.StreetModelForTest.intersectionVertex; + +import java.time.Instant; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.function.Function; +import org.junit.jupiter.api.Test; +import org.opentripplanner._support.geometry.Coordinates; +import org.opentripplanner.routing.api.request.StreetMode; +import org.opentripplanner.street.model.StreetTraversalPermission; +import org.opentripplanner.street.model._data.StreetModelForTest; +import org.opentripplanner.street.model.edge.Edge; +import org.opentripplanner.street.model.vertex.IntersectionVertex; +import org.opentripplanner.street.search.TraverseMode; +import org.opentripplanner.street.search.request.StreetSearchRequest; + +class EdgeTraverserTest { + + private static final IntersectionVertex BERLIN_V = intersectionVertex(Coordinates.BERLIN); + private static final IntersectionVertex BRANDENBURG_GATE_V = intersectionVertex( + Coordinates.BERLIN_BRANDENBURG_GATE + ); + private static final IntersectionVertex FERNSEHTURM_V = intersectionVertex( + Coordinates.BERLIN_FERNSEHTURM + ); + private static final IntersectionVertex ADMIRALBRUCKE_V = intersectionVertex( + Coordinates.BERLIN_ADMIRALBRUCKE + ); + + @Test + void emptyEdges() { + var request = StreetSearchRequest + .of() + .withStartTime(Instant.EPOCH) + .withMode(StreetMode.WALK) + .build(); + var initialStates = State.getInitialStates(Set.of(BERLIN_V), request); + var traversedState = EdgeTraverser.traverseEdges(initialStates, List.of()); + + assertSame(initialStates.iterator().next(), traversedState.get()); + } + + @Test + void failedTraversal() { + var edge = StreetModelForTest + .streetEdge(BERLIN_V, BRANDENBURG_GATE_V) + .toBuilder() + .withPermission(StreetTraversalPermission.NONE) + .buildAndConnect(); + + var edges = List.of(edge); + var request = StreetSearchRequest + .of() + .withStartTime(Instant.EPOCH) + .withMode(StreetMode.WALK) + .build(); + var initialStates = State.getInitialStates(Set.of(edge.getFromVertex()), request); + var traversedState = EdgeTraverser.traverseEdges(initialStates, edges); + + assertTrue(traversedState.isEmpty()); + } + + @Test + void withSingleState() { + var edge = StreetModelForTest + .streetEdge(BERLIN_V, BRANDENBURG_GATE_V) + .toBuilder() + .withPermission(StreetTraversalPermission.ALL) + .buildAndConnect(); + + var edges = List.of(edge); + var request = StreetSearchRequest + .of() + .withStartTime(Instant.EPOCH) + .withMode(StreetMode.WALK) + .build(); + var initialStates = State.getInitialStates(Set.of(edge.getFromVertex()), request); + var traversedState = EdgeTraverser.traverseEdges(initialStates, edges).get(); + + assertEquals(List.of(TraverseMode.WALK), stateValues(traversedState, State::getBackMode)); + assertEquals(1719, traversedState.getElapsedTimeSeconds()); + } + + @Test + void withSingleArriveByState() { + var edge = StreetModelForTest + .streetEdge(BERLIN_V, BRANDENBURG_GATE_V) + .toBuilder() + .withPermission(StreetTraversalPermission.ALL) + .buildAndConnect(); + + var edges = List.of(edge); + var request = StreetSearchRequest + .of() + .withStartTime(Instant.EPOCH) + .withMode(StreetMode.WALK) + .withArriveBy(true) + .build(); + var initialStates = State.getInitialStates(Set.of(edge.getToVertex()), request); + var traversedState = EdgeTraverser.traverseEdges(initialStates, edges).get(); + + assertSame(BERLIN_V, traversedState.getVertex()); + assertEquals(List.of(TraverseMode.WALK), stateValues(traversedState, State::getBackMode)); + assertEquals(1719, traversedState.getElapsedTimeSeconds()); + } + + @Test + void withMultipleStates() { + // CAR_PICKUP creates parallel walking and driving states + // This tests that of the two states (WALKING, CAR) the least weight (CAR) is selected + var edge = StreetModelForTest + .streetEdge(BERLIN_V, BRANDENBURG_GATE_V) + .toBuilder() + .withPermission(StreetTraversalPermission.ALL) + .buildAndConnect(); + + var edges = List.of(edge); + var request = StreetSearchRequest + .of() + .withStartTime(Instant.EPOCH) + .withMode(StreetMode.CAR_PICKUP) + .build(); + var initialStates = State.getInitialStates(Set.of(edge.getFromVertex()), request); + var traversedState = EdgeTraverser.traverseEdges(initialStates, edges).get(); + + assertEquals(List.of(TraverseMode.CAR), stateValues(traversedState, State::getBackMode)); + assertEquals(205, traversedState.getElapsedTimeSeconds()); + } + + @Test + void withDominatedStates() { + // CAR_PICKUP creates parallel walking and driving states + // This tests that the most optimal (walking and driving the last stretch) is found after + // discarding the initial driving state for edge1 + var edge1 = StreetModelForTest + .streetEdge(FERNSEHTURM_V, BERLIN_V) + .toBuilder() + .withPermission(StreetTraversalPermission.ALL) + .buildAndConnect(); + var edge2 = StreetModelForTest + .streetEdge(BERLIN_V, BRANDENBURG_GATE_V) + .toBuilder() + .withPermission(StreetTraversalPermission.PEDESTRIAN) + .buildAndConnect(); + var edge3 = StreetModelForTest + .streetEdge(BRANDENBURG_GATE_V, ADMIRALBRUCKE_V) + .toBuilder() + .withPermission(StreetTraversalPermission.ALL) + .buildAndConnect(); + + var edges = List.of(edge1, edge2, edge3); + var request = StreetSearchRequest + .of() + .withStartTime(Instant.EPOCH) + .withMode(StreetMode.CAR_PICKUP) + .build(); + var initialStates = State.getInitialStates(Set.of(edge1.getFromVertex()), request); + var traversedState = EdgeTraverser.traverseEdges(initialStates, edges).get(); + + assertEquals( + List.of(88.103, 2286.029, 3444.28), + stateValues( + traversedState, + state -> state.getBackEdge() != null ? state.getBackEdge().getDistanceMeters() : null + ) + ); + assertEquals( + List.of(TraverseMode.WALK, TraverseMode.WALK, TraverseMode.CAR), + stateValues(traversedState, State::getBackMode) + ); + assertEquals(2169, traversedState.getElapsedTimeSeconds()); + } + + private List stateValues(State state, Function extractor) { + var values = new ArrayList(); + while (state != null) { + var value = extractor.apply(state); + if (value != null) { + values.add(value); + } + state = state.getBackState(); + } + return values.reversed(); + } +} diff --git a/application/src/test/java/org/opentripplanner/street/search/state/TestStateBuilder.java b/application/src/test/java/org/opentripplanner/street/search/state/TestStateBuilder.java index 9605d950ae0..7ea56f66145 100644 --- a/application/src/test/java/org/opentripplanner/street/search/state/TestStateBuilder.java +++ b/application/src/test/java/org/opentripplanner/street/search/state/TestStateBuilder.java @@ -202,7 +202,7 @@ public TestStateBuilder elevator() { currentState = EdgeTraverser - .traverseEdges(currentState, List.of(link, boardEdge, hopEdge, alightEdge)) + .traverseEdges(new State[] { currentState }, List.of(link, boardEdge, hopEdge, alightEdge)) .orElseThrow(); return this; } From 514ac9fb695d699ef9913b810bac810b046abd7b Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Thu, 14 Nov 2024 11:49:14 +0200 Subject: [PATCH 086/169] Limit use of unrecommended shortcuts in car routing --- .../osm/tagmapping/FinlandMapper.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java b/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java index 5e413af510a..40132c3dd18 100644 --- a/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java +++ b/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java @@ -1,5 +1,7 @@ package org.opentripplanner.osm.tagmapping; +import java.util.Set; + import static org.opentripplanner.osm.wayproperty.MixinPropertiesBuilder.ofWalkSafety; import static org.opentripplanner.osm.wayproperty.WayPropertiesBuilder.withModes; import static org.opentripplanner.street.model.StreetTraversalPermission.ALL; @@ -25,6 +27,13 @@ * @see OsmTagMapper */ class FinlandMapper extends OsmTagMapper { + private static final Set NOTHROUGH_DRIVING_TAGS = Set.of( + "parking_aisle", + "driveway", + "alley", + "emergency_access", + "drive-through" + ); @Override public void populateProperties(WayPropertySet props) { @@ -219,4 +228,12 @@ public boolean isWalkNoThroughTrafficExplicitlyDisallowed(OsmWithTags way) { String foot = way.getTag("foot"); return isGeneralNoThroughTraffic(way) || doesTagValueDisallowThroughTraffic(foot); } + + @Override + public boolean isMotorVehicleThroughTrafficExplicitlyDisallowed(OsmWithTags way) { + if (super.isMotorVehicleThroughTrafficExplicitlyDisallowed(way)) { + return true; + } + return way.isOneOfTags("service", NOTHROUGH_DRIVING_TAGS); + } } From 9fc622152efb553ffed66a8e916de6a86d867de8 Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Fri, 15 Nov 2024 10:01:28 +0200 Subject: [PATCH 087/169] Move constant speed test to Finland test set, add serviceway nothrough test --- .../osm/tagmapping/FinlandMapper.java | 4 +-- .../osm/tagmapping/FinlandMapperTest.java | 35 ++++++++++++++++--- .../osm/tagmapping/OsmTagMapperTest.java | 14 -------- 3 files changed, 33 insertions(+), 20 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java b/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java index 40132c3dd18..3048439f377 100644 --- a/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java +++ b/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java @@ -1,7 +1,5 @@ package org.opentripplanner.osm.tagmapping; -import java.util.Set; - import static org.opentripplanner.osm.wayproperty.MixinPropertiesBuilder.ofWalkSafety; import static org.opentripplanner.osm.wayproperty.WayPropertiesBuilder.withModes; import static org.opentripplanner.street.model.StreetTraversalPermission.ALL; @@ -10,6 +8,7 @@ import static org.opentripplanner.street.model.StreetTraversalPermission.PEDESTRIAN; import static org.opentripplanner.street.model.StreetTraversalPermission.PEDESTRIAN_AND_BICYCLE; +import java.util.Set; import org.opentripplanner.framework.functional.FunctionUtils.TriFunction; import org.opentripplanner.osm.model.OsmWithTags; import org.opentripplanner.osm.wayproperty.WayPropertySet; @@ -27,6 +26,7 @@ * @see OsmTagMapper */ class FinlandMapper extends OsmTagMapper { + private static final Set NOTHROUGH_DRIVING_TAGS = Set.of( "parking_aisle", "driveway", diff --git a/application/src/test/java/org/opentripplanner/osm/tagmapping/FinlandMapperTest.java b/application/src/test/java/org/opentripplanner/osm/tagmapping/FinlandMapperTest.java index 8e931e1096a..24b46a001d7 100644 --- a/application/src/test/java/org/opentripplanner/osm/tagmapping/FinlandMapperTest.java +++ b/application/src/test/java/org/opentripplanner/osm/tagmapping/FinlandMapperTest.java @@ -1,10 +1,12 @@ package org.opentripplanner.osm.tagmapping; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.opentripplanner.street.model.StreetTraversalPermission.NONE; import static org.opentripplanner.street.model.StreetTraversalPermission.PEDESTRIAN; import static org.opentripplanner.street.model.StreetTraversalPermission.PEDESTRIAN_AND_BICYCLE; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.opentripplanner.osm.model.OsmWay; import org.opentripplanner.osm.model.OsmWithTags; @@ -13,12 +15,15 @@ public class FinlandMapperTest { - static WayPropertySet wps = new WayPropertySet(); + private WayPropertySet wps; + private OsmTagMapper mapper; static float epsilon = 0.01f; - static { - var source = new FinlandMapper(); - source.populateProperties(wps); + @BeforeEach + public void setup() { + this.wps = new WayPropertySet(); + this.mapper = new FinlandMapper(); + this.mapper.populateProperties(this.wps); } /** @@ -220,4 +225,26 @@ public void testArea() { wayData = wps.getDataForWay(way); assertEquals(wayData.getPermission(), PEDESTRIAN_AND_BICYCLE); } + + @Test + public void constantSpeedCarRouting() { + OsmTagMapper osmTagMapper = new ConstantSpeedFinlandMapper(20f); + + var slowWay = new OsmWithTags(); + slowWay.addTag("highway", "residential"); + assertEquals(20f, osmTagMapper.getCarSpeedForWay(slowWay, true)); + + var fastWay = new OsmWithTags(); + fastWay.addTag("highway", "motorway"); + fastWay.addTag("maxspeed", "120 kmph"); + assertEquals(20f, osmTagMapper.getCarSpeedForWay(fastWay, true)); + } + + @Test + public void serviceNoThroughTraffic() { + var way = new OsmWay(); + way.addTag("highway", "residential"); + way.addTag("service", "driveway"); + assertTrue(mapper.isMotorVehicleThroughTrafficExplicitlyDisallowed(way)); + } } diff --git a/application/src/test/java/org/opentripplanner/osm/tagmapping/OsmTagMapperTest.java b/application/src/test/java/org/opentripplanner/osm/tagmapping/OsmTagMapperTest.java index aaaf5178d5b..c668c1058a1 100644 --- a/application/src/test/java/org/opentripplanner/osm/tagmapping/OsmTagMapperTest.java +++ b/application/src/test/java/org/opentripplanner/osm/tagmapping/OsmTagMapperTest.java @@ -33,20 +33,6 @@ public void isMotorThroughTrafficExplicitlyDisallowed() { ); } - @Test - public void constantSpeedCarRouting() { - OsmTagMapper osmTagMapper = new ConstantSpeedFinlandMapper(20f); - - var slowWay = new OsmWithTags(); - slowWay.addTag("highway", "residential"); - assertEquals(20f, osmTagMapper.getCarSpeedForWay(slowWay, true)); - - var fastWay = new OsmWithTags(); - fastWay.addTag("highway", "motorway"); - fastWay.addTag("maxspeed", "120 kmph"); - assertEquals(20f, osmTagMapper.getCarSpeedForWay(fastWay, true)); - } - @Test public void isBicycleNoThroughTrafficExplicitlyDisallowed() { OsmTagMapper osmTagMapper = new OsmTagMapper(); From 49a0f78991c201b5c6069c8467067d95fc2388b6 Mon Sep 17 00:00:00 2001 From: sharhio Date: Fri, 15 Nov 2024 10:22:04 +0200 Subject: [PATCH 088/169] clarified the temporariness --- .../datasources/params/AllowedRentalType.java | 2 +- doc/user/UpdaterConfig.md | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java index f8ede8bbebf..ea901be4948 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java @@ -21,7 +21,7 @@ public enum AllowedRentalType implements DocumentedEnum { @Override public String typeDescription() { return ( - "Temporary parameter. Use this to specify the type of rental data that is allowed to be read from the data source." + "This is temporary and will be removed in a future version of OTP. Use this to specify the type of rental data that is allowed to be read from the data source." ); } diff --git a/doc/user/UpdaterConfig.md b/doc/user/UpdaterConfig.md index 1c47fc77e63..cdda5371d3d 100644 --- a/doc/user/UpdaterConfig.md +++ b/doc/user/UpdaterConfig.md @@ -313,19 +313,19 @@ GBFS form factors: -| Config Parameter | Type | Summary | Req./Opt. | Default Value | Since | -|---------------------------------------------------------------------------------------|:---------------:|-------------------------------------------------------------------------------------------------------------------|:----------:|---------------|:-----:| -| type = "vehicle-rental" | `enum` | The type of the updater. | *Required* | | 1.5 | -| [allowKeepingRentedVehicleAtDestination](#u_1_allowKeepingRentedVehicleAtDestination) | `boolean` | If a vehicle should be allowed to be kept at the end of a station-based rental. | *Optional* | `false` | 2.1 | -| [allowedRentalType](#u_1_allowedRentalType) | `enum` | Temporary parameter. Use this to specify the type of rental data that is allowed to be read from the data source. | *Optional* | `"all"` | 2.7 | -| frequency | `duration` | How often the data should be updated. | *Optional* | `"PT1M"` | 1.5 | -| [geofencingZones](#u_1_geofencingZones) | `boolean` | Compute rental restrictions based on GBFS 2.2 geofencing zones. | *Optional* | `false` | 2.3 | -| language | `string` | TODO | *Optional* | | 2.1 | -| [network](#u_1_network) | `string` | The name of the network to override the one derived from the source data. | *Optional* | | 1.5 | -| overloadingAllowed | `boolean` | Allow leaving vehicles at a station even though there are no free slots. | *Optional* | `false` | 2.2 | -| [sourceType](#u_1_sourceType) | `enum` | What source of vehicle rental updater to use. | *Required* | | 1.5 | -| url | `string` | The URL to download the data from. | *Required* | | 1.5 | -| [headers](#u_1_headers) | `map of string` | HTTP headers to add to the request. Any header key, value can be inserted. | *Optional* | | 1.5 | +| Config Parameter | Type | Summary | Req./Opt. | Default Value | Since | +|---------------------------------------------------------------------------------------|:---------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------:|---------------|:-----:| +| type = "vehicle-rental" | `enum` | The type of the updater. | *Required* | | 1.5 | +| [allowKeepingRentedVehicleAtDestination](#u_1_allowKeepingRentedVehicleAtDestination) | `boolean` | If a vehicle should be allowed to be kept at the end of a station-based rental. | *Optional* | `false` | 2.1 | +| [allowedRentalType](#u_1_allowedRentalType) | `enum` | This is temporary and will be removed in a future version of OTP. Use this to specify the type of rental data that is allowed to be read from the data source. | *Optional* | `"all"` | 2.7 | +| frequency | `duration` | How often the data should be updated. | *Optional* | `"PT1M"` | 1.5 | +| [geofencingZones](#u_1_geofencingZones) | `boolean` | Compute rental restrictions based on GBFS 2.2 geofencing zones. | *Optional* | `false` | 2.3 | +| language | `string` | TODO | *Optional* | | 2.1 | +| [network](#u_1_network) | `string` | The name of the network to override the one derived from the source data. | *Optional* | | 1.5 | +| overloadingAllowed | `boolean` | Allow leaving vehicles at a station even though there are no free slots. | *Optional* | `false` | 2.2 | +| [sourceType](#u_1_sourceType) | `enum` | What source of vehicle rental updater to use. | *Required* | | 1.5 | +| url | `string` | The URL to download the data from. | *Required* | | 1.5 | +| [headers](#u_1_headers) | `map of string` | HTTP headers to add to the request. Any header key, value can be inserted. | *Optional* | | 1.5 | ##### Parameter details @@ -353,7 +353,7 @@ For this to be possible three things need to be configured: **Path:** /updaters/[1] **Enum values:** `stations` | `vehicles` | `all` -Temporary parameter. Use this to specify the type of rental data that is allowed to be read from the data source. +This is temporary and will be removed in a future version of OTP. Use this to specify the type of rental data that is allowed to be read from the data source. - `stations` Only station data is allowed. - `vehicles` Only vehicle data is allowed. From 2202ba0d441f862c090d66dfcb6ffa457b940694 Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Fri, 15 Nov 2024 10:39:45 +0200 Subject: [PATCH 089/169] Remove double negation --- .../module/osm/SafetyValueNormalizer.java | 4 +- .../osm/tagmapping/FinlandMapper.java | 4 +- .../osm/tagmapping/OsmTagMapper.java | 4 +- .../osm/tagmapping/OsmTagMapperTest.java | 50 +++++++++---------- 4 files changed, 30 insertions(+), 32 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/SafetyValueNormalizer.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/SafetyValueNormalizer.java index 2f070f272c6..2cb5b01dcc6 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/SafetyValueNormalizer.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/SafetyValueNormalizer.java @@ -86,8 +86,8 @@ void applyWayProperties( boolean motorVehicleNoThrough = tagMapperForWay.isMotorVehicleThroughTrafficExplicitlyDisallowed( way ); - boolean bicycleNoThrough = tagMapperForWay.isBicycleNoThroughTrafficExplicitlyDisallowed(way); - boolean walkNoThrough = tagMapperForWay.isWalkNoThroughTrafficExplicitlyDisallowed(way); + boolean bicycleNoThrough = tagMapperForWay.isBicycleThroughTrafficExplicitlyDisallowed(way); + boolean walkNoThrough = tagMapperForWay.isWalkThroughTrafficExplicitlyDisallowed(way); if (street != null) { double bicycleSafety = wayData.bicycleSafety().forward(); diff --git a/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java b/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java index 3048439f377..e9ac9478552 100644 --- a/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java +++ b/application/src/main/java/org/opentripplanner/osm/tagmapping/FinlandMapper.java @@ -215,7 +215,7 @@ else if (speedLimit <= 16.65f) { } @Override - public boolean isBicycleNoThroughTrafficExplicitlyDisallowed(OsmWithTags way) { + public boolean isBicycleThroughTrafficExplicitlyDisallowed(OsmWithTags way) { String bicycle = way.getTag("bicycle"); return ( isVehicleThroughTrafficExplicitlyDisallowed(way) || @@ -224,7 +224,7 @@ public boolean isBicycleNoThroughTrafficExplicitlyDisallowed(OsmWithTags way) { } @Override - public boolean isWalkNoThroughTrafficExplicitlyDisallowed(OsmWithTags way) { + public boolean isWalkThroughTrafficExplicitlyDisallowed(OsmWithTags way) { String foot = way.getTag("foot"); return isGeneralNoThroughTraffic(way) || doesTagValueDisallowThroughTraffic(foot); } diff --git a/application/src/main/java/org/opentripplanner/osm/tagmapping/OsmTagMapper.java b/application/src/main/java/org/opentripplanner/osm/tagmapping/OsmTagMapper.java index e4c258ccdc4..2df3c22d6a9 100644 --- a/application/src/main/java/org/opentripplanner/osm/tagmapping/OsmTagMapper.java +++ b/application/src/main/java/org/opentripplanner/osm/tagmapping/OsmTagMapper.java @@ -768,7 +768,7 @@ public boolean isMotorVehicleThroughTrafficExplicitlyDisallowed(OsmWithTags way) /** * Returns true if through traffic for bicycle is not allowed. */ - public boolean isBicycleNoThroughTrafficExplicitlyDisallowed(OsmWithTags way) { + public boolean isBicycleThroughTrafficExplicitlyDisallowed(OsmWithTags way) { String bicycle = way.getTag("bicycle"); if (bicycle != null) { return doesTagValueDisallowThroughTraffic(bicycle); @@ -780,7 +780,7 @@ public boolean isBicycleNoThroughTrafficExplicitlyDisallowed(OsmWithTags way) { /** * Returns true if through traffic for walk is not allowed. */ - public boolean isWalkNoThroughTrafficExplicitlyDisallowed(OsmWithTags way) { + public boolean isWalkThroughTrafficExplicitlyDisallowed(OsmWithTags way) { String foot = way.getTag("foot"); if (foot != null) { return doesTagValueDisallowThroughTraffic(foot); diff --git a/application/src/test/java/org/opentripplanner/osm/tagmapping/OsmTagMapperTest.java b/application/src/test/java/org/opentripplanner/osm/tagmapping/OsmTagMapperTest.java index c668c1058a1..b3ee57f9710 100644 --- a/application/src/test/java/org/opentripplanner/osm/tagmapping/OsmTagMapperTest.java +++ b/application/src/test/java/org/opentripplanner/osm/tagmapping/OsmTagMapperTest.java @@ -34,23 +34,21 @@ public void isMotorThroughTrafficExplicitlyDisallowed() { } @Test - public void isBicycleNoThroughTrafficExplicitlyDisallowed() { + public void isBicycleThroughTrafficExplicitlyDisallowed() { OsmTagMapper osmTagMapper = new OsmTagMapper(); assertTrue( - osmTagMapper.isBicycleNoThroughTrafficExplicitlyDisallowed(way("bicycle", "destination")) + osmTagMapper.isBicycleThroughTrafficExplicitlyDisallowed(way("bicycle", "destination")) ); assertTrue( - osmTagMapper.isBicycleNoThroughTrafficExplicitlyDisallowed(way("access", "destination")) + osmTagMapper.isBicycleThroughTrafficExplicitlyDisallowed(way("access", "destination")) ); } @Test - public void isWalkNoThroughTrafficExplicitlyDisallowed() { + public void isWalkThroughTrafficExplicitlyDisallowed() { OsmTagMapper osmTagMapper = new OsmTagMapper(); - assertTrue(osmTagMapper.isWalkNoThroughTrafficExplicitlyDisallowed(way("foot", "destination"))); - assertTrue( - osmTagMapper.isWalkNoThroughTrafficExplicitlyDisallowed(way("access", "destination")) - ); + assertTrue(osmTagMapper.isWalkThroughTrafficExplicitlyDisallowed(way("foot", "destination"))); + assertTrue(osmTagMapper.isWalkThroughTrafficExplicitlyDisallowed(way("access", "destination"))); } @Test @@ -61,8 +59,8 @@ public void testAccessNo() { tags.addTag("access", "no"); assertTrue(osmTagMapper.isMotorVehicleThroughTrafficExplicitlyDisallowed(tags)); - assertTrue(osmTagMapper.isBicycleNoThroughTrafficExplicitlyDisallowed(tags)); - assertTrue(osmTagMapper.isWalkNoThroughTrafficExplicitlyDisallowed(tags)); + assertTrue(osmTagMapper.isBicycleThroughTrafficExplicitlyDisallowed(tags)); + assertTrue(osmTagMapper.isWalkThroughTrafficExplicitlyDisallowed(tags)); } @Test @@ -73,8 +71,8 @@ public void testAccessPrivate() { tags.addTag("access", "private"); assertTrue(osmTagMapper.isMotorVehicleThroughTrafficExplicitlyDisallowed(tags)); - assertTrue(osmTagMapper.isBicycleNoThroughTrafficExplicitlyDisallowed(tags)); - assertTrue(osmTagMapper.isWalkNoThroughTrafficExplicitlyDisallowed(tags)); + assertTrue(osmTagMapper.isBicycleThroughTrafficExplicitlyDisallowed(tags)); + assertTrue(osmTagMapper.isWalkThroughTrafficExplicitlyDisallowed(tags)); } @Test @@ -86,8 +84,8 @@ public void testFootModifier() { tags.addTag("foot", "yes"); assertTrue(osmTagMapper.isMotorVehicleThroughTrafficExplicitlyDisallowed(tags)); - assertTrue(osmTagMapper.isBicycleNoThroughTrafficExplicitlyDisallowed(tags)); - assertFalse(osmTagMapper.isWalkNoThroughTrafficExplicitlyDisallowed(tags)); + assertTrue(osmTagMapper.isBicycleThroughTrafficExplicitlyDisallowed(tags)); + assertFalse(osmTagMapper.isWalkThroughTrafficExplicitlyDisallowed(tags)); } @Test @@ -98,8 +96,8 @@ public void testVehicleDenied() { tags.addTag("vehicle", "destination"); assertTrue(osmTagMapper.isMotorVehicleThroughTrafficExplicitlyDisallowed(tags)); - assertTrue(osmTagMapper.isBicycleNoThroughTrafficExplicitlyDisallowed(tags)); - assertFalse(osmTagMapper.isWalkNoThroughTrafficExplicitlyDisallowed(tags)); + assertTrue(osmTagMapper.isBicycleThroughTrafficExplicitlyDisallowed(tags)); + assertFalse(osmTagMapper.isWalkThroughTrafficExplicitlyDisallowed(tags)); } @Test @@ -111,8 +109,8 @@ public void testVehicleDeniedMotorVehiclePermissive() { tags.addTag("motor_vehicle", "designated"); assertFalse(osmTagMapper.isMotorVehicleThroughTrafficExplicitlyDisallowed(tags)); - assertTrue(osmTagMapper.isBicycleNoThroughTrafficExplicitlyDisallowed(tags)); - assertFalse(osmTagMapper.isWalkNoThroughTrafficExplicitlyDisallowed(tags)); + assertTrue(osmTagMapper.isBicycleThroughTrafficExplicitlyDisallowed(tags)); + assertFalse(osmTagMapper.isWalkThroughTrafficExplicitlyDisallowed(tags)); } @Test @@ -124,8 +122,8 @@ public void testVehicleDeniedBicyclePermissive() { tags.addTag("bicycle", "designated"); assertTrue(osmTagMapper.isMotorVehicleThroughTrafficExplicitlyDisallowed(tags)); - assertFalse(osmTagMapper.isBicycleNoThroughTrafficExplicitlyDisallowed(tags)); - assertFalse(osmTagMapper.isWalkNoThroughTrafficExplicitlyDisallowed(tags)); + assertFalse(osmTagMapper.isBicycleThroughTrafficExplicitlyDisallowed(tags)); + assertFalse(osmTagMapper.isWalkThroughTrafficExplicitlyDisallowed(tags)); } @Test @@ -137,8 +135,8 @@ public void testMotorcycleModifier() { tags.addTag("motor_vehicle", "yes"); assertFalse(osmTagMapper.isMotorVehicleThroughTrafficExplicitlyDisallowed(tags)); - assertTrue(osmTagMapper.isBicycleNoThroughTrafficExplicitlyDisallowed(tags)); - assertTrue(osmTagMapper.isWalkNoThroughTrafficExplicitlyDisallowed(tags)); + assertTrue(osmTagMapper.isBicycleThroughTrafficExplicitlyDisallowed(tags)); + assertTrue(osmTagMapper.isWalkThroughTrafficExplicitlyDisallowed(tags)); } @Test @@ -150,8 +148,8 @@ public void testBicycleModifier() { tags.addTag("bicycle", "yes"); assertTrue(osmTagMapper.isMotorVehicleThroughTrafficExplicitlyDisallowed(tags)); - assertFalse(osmTagMapper.isBicycleNoThroughTrafficExplicitlyDisallowed(tags)); - assertTrue(osmTagMapper.isWalkNoThroughTrafficExplicitlyDisallowed(tags)); + assertFalse(osmTagMapper.isBicycleThroughTrafficExplicitlyDisallowed(tags)); + assertTrue(osmTagMapper.isWalkThroughTrafficExplicitlyDisallowed(tags)); } @Test @@ -163,8 +161,8 @@ public void testBicyclePermissive() { tags.addTag("bicycle", "permissive"); assertTrue(osmTagMapper.isMotorVehicleThroughTrafficExplicitlyDisallowed(tags)); - assertFalse(osmTagMapper.isBicycleNoThroughTrafficExplicitlyDisallowed(tags)); - assertTrue(osmTagMapper.isWalkNoThroughTrafficExplicitlyDisallowed(tags)); + assertFalse(osmTagMapper.isBicycleThroughTrafficExplicitlyDisallowed(tags)); + assertTrue(osmTagMapper.isWalkThroughTrafficExplicitlyDisallowed(tags)); } public OsmWithTags way(String key, String value) { From cc2c37a54bffc045b98d487b3855e42c47e2c805 Mon Sep 17 00:00:00 2001 From: Eivind Morris Bakke Date: Fri, 15 Nov 2024 10:11:11 +0100 Subject: [PATCH 090/169] Fix stop index filtering on ServiceJourney Transmodel --- .../timetable/DatedServiceJourneyType.java | 18 +++++----- .../model/timetable/ServiceJourneyType.java | 36 ++++++------------- 2 files changed, 20 insertions(+), 34 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyType.java index 7fcce88c4ee..1ad05118e11 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyType.java @@ -125,14 +125,16 @@ public static GraphQLObjectType create( if (first != null && last != null) { throw new AssertException("Both first and last can't be defined simultaneously."); - } else if (first != null) { - if (first > stops.size()) { - return stops.subList(0, first); - } - } else if (last != null) { - if (last > stops.size()) { - return stops.subList(stops.size() - last, stops.size()); - } + } + + if ((first != null && first < 0) || (last != null && last < 0)) { + throw new AssertException("first and last must be positive integers."); + } + + if (first != null && first < stops.size()) { + return stops.subList(0, first); + } else if (last != null && last < stops.size()) { + return stops.subList(stops.size() - last, stops.size()); } return stops; }) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/ServiceJourneyType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/ServiceJourneyType.java index e61d0a12edc..20a290863df 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/ServiceJourneyType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/ServiceJourneyType.java @@ -75,13 +75,6 @@ public static GraphQLObjectType create( ) .build() ) - // .field(GraphQLFieldDefinition.newFieldDefinition() - // .name("serviceAlteration") - // .type(serviceAlterationEnum) - // .description("Whether journey is as planned, a cancellation or an extra journey. Default is as planned") - // .dataFetcher(environment -> (((Trip) trip(environment)).getServiceAlteration())) - // .build()) - .field( GraphQLFieldDefinition .newFieldDefinition() @@ -218,14 +211,16 @@ public static GraphQLObjectType create( if (first != null && last != null) { throw new AssertException("Both first and last can't be defined simultaneously."); - } else if (first != null) { - if (first > stops.size()) { - return stops.subList(0, first); - } - } else if (last != null) { - if (last > stops.size()) { - return stops.subList(stops.size() - last, stops.size()); - } + } + + if ((first != null && first < 0) || (last != null && last < 0)) { + throw new AssertException("first and last must be positive integers."); + } + + if (first != null && first < stops.size()) { + return stops.subList(0, first); + } else if (last != null && last < stops.size()) { + return stops.subList(stops.size() - last, stops.size()); } return stops; }) @@ -329,17 +324,6 @@ public static GraphQLObjectType create( ) .build() ) - // .field(GraphQLFieldDefinition.newFieldDefinition() - // .name("keyValues") - // .description("List of keyValue pairs for the service journey.") - // .type(new GraphQLList(keyValueType)) - // .dataFetcher(environment -> ((Trip) trip(environment)).getKeyValues()) - // .build()) - // .field(GraphQLFieldDefinition.newFieldDefinition() - // .name("flexibleServiceType") - // .description("Type of flexible service, or null if service is not flexible.") - // .type(flexibleServiceTypeEnum) - // .build()) .field( GraphQLFieldDefinition .newFieldDefinition() From 263de6775f84428995e83590a51de84135b87062 Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Fri, 15 Nov 2024 09:11:26 +0000 Subject: [PATCH 091/169] Add changelog entry for #6251 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index 11f9acd31ea..66d3a1961c4 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -42,6 +42,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - add stopPositionInPattern in Stoptime in GTFS GraphQL API [#6204](https://github.com/opentripplanner/OpenTripPlanner/pull/6204) - Fix parsing of wheelchair accessible parking, add wheelchair debug layer [#6229](https://github.com/opentripplanner/OpenTripPlanner/pull/6229) - Add previousLegs into GTFS GraphQL API [#6142](https://github.com/opentripplanner/OpenTripPlanner/pull/6142) +- Fix stop index filtering on ServiceJourney Transmodel GraphQL API [#6251](https://github.com/opentripplanner/OpenTripPlanner/pull/6251) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From 1227a5c2d8768868419df1c15b1da617cf57a457 Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Fri, 15 Nov 2024 11:08:12 +0000 Subject: [PATCH 092/169] Add changelog entry for #6233 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index 66d3a1961c4..973be1b8c01 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -43,6 +43,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Fix parsing of wheelchair accessible parking, add wheelchair debug layer [#6229](https://github.com/opentripplanner/OpenTripPlanner/pull/6229) - Add previousLegs into GTFS GraphQL API [#6142](https://github.com/opentripplanner/OpenTripPlanner/pull/6142) - Fix stop index filtering on ServiceJourney Transmodel GraphQL API [#6251](https://github.com/opentripplanner/OpenTripPlanner/pull/6251) +- Fix rental searches when destination is in a no-drop-off zone [#6233](https://github.com/opentripplanner/OpenTripPlanner/pull/6233) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From e595147c8b662757796dd58936369524403a795c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2024 03:26:44 +0000 Subject: [PATCH 093/169] Update Test dependencies (#6256) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 3c29e5f25eb..9e3f4d6f32c 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,7 @@ 2.52 2.18.1 3.1.9 - 5.11.2 + 5.11.3 1.13.7 5.6.0 1.5.12 @@ -174,7 +174,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.1 + 3.5.2 me.fabriciorby From e17f2e9387ab9dfa50350b902d2172513a1e2399 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2024 20:03:35 +0000 Subject: [PATCH 094/169] Update Debug UI dependencies (non-major) --- client/package-lock.json | 269 +++++++++++++++++++++++---------------- client/package.json | 8 +- 2 files changed, 161 insertions(+), 116 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index a438e9403fd..e1e00b4e99d 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -23,14 +23,14 @@ "@graphql-codegen/cli": "5.0.3", "@graphql-codegen/client-preset": "4.5.0", "@graphql-codegen/introspection": "4.0.3", - "@parcel/watcher": "2.4.1", + "@parcel/watcher": "2.5.0", "@testing-library/react": "16.0.1", "@types/react": "18.3.12", "@types/react-dom": "18.3.1", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", "@vitejs/plugin-react": "4.3.3", - "@vitest/coverage-v8": "2.1.4", + "@vitest/coverage-v8": "2.1.5", "eslint": "8.57.1", "eslint-config-prettier": "9.1.0", "eslint-plugin-import": "2.31.0", @@ -41,8 +41,8 @@ "jsdom": "25.0.1", "prettier": "3.3.3", "typescript": "5.6.3", - "vite": "5.4.10", - "vitest": "2.1.4" + "vite": "5.4.11", + "vitest": "2.1.5" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -2767,10 +2767,12 @@ } }, "node_modules/@parcel/watcher": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.4.1.tgz", - "integrity": "sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.0.tgz", + "integrity": "sha512-i0GV1yJnm2n3Yq1qw6QrUrd/LI9bE8WEBOTtOkpCXHHdyN3TAGgqAK/DAT05z4fq2x04cARXt2pDmjWjL92iTQ==", "dev": true, + "hasInstallScript": true, + "license": "MIT", "dependencies": { "detect-libc": "^1.0.3", "is-glob": "^4.0.3", @@ -2785,28 +2787,30 @@ "url": "https://opencollective.com/parcel" }, "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.4.1", - "@parcel/watcher-darwin-arm64": "2.4.1", - "@parcel/watcher-darwin-x64": "2.4.1", - "@parcel/watcher-freebsd-x64": "2.4.1", - "@parcel/watcher-linux-arm-glibc": "2.4.1", - "@parcel/watcher-linux-arm64-glibc": "2.4.1", - "@parcel/watcher-linux-arm64-musl": "2.4.1", - "@parcel/watcher-linux-x64-glibc": "2.4.1", - "@parcel/watcher-linux-x64-musl": "2.4.1", - "@parcel/watcher-win32-arm64": "2.4.1", - "@parcel/watcher-win32-ia32": "2.4.1", - "@parcel/watcher-win32-x64": "2.4.1" + "@parcel/watcher-android-arm64": "2.5.0", + "@parcel/watcher-darwin-arm64": "2.5.0", + "@parcel/watcher-darwin-x64": "2.5.0", + "@parcel/watcher-freebsd-x64": "2.5.0", + "@parcel/watcher-linux-arm-glibc": "2.5.0", + "@parcel/watcher-linux-arm-musl": "2.5.0", + "@parcel/watcher-linux-arm64-glibc": "2.5.0", + "@parcel/watcher-linux-arm64-musl": "2.5.0", + "@parcel/watcher-linux-x64-glibc": "2.5.0", + "@parcel/watcher-linux-x64-musl": "2.5.0", + "@parcel/watcher-win32-arm64": "2.5.0", + "@parcel/watcher-win32-ia32": "2.5.0", + "@parcel/watcher-win32-x64": "2.5.0" } }, "node_modules/@parcel/watcher-android-arm64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz", - "integrity": "sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.0.tgz", + "integrity": "sha512-qlX4eS28bUcQCdribHkg/herLe+0A9RyYC+mm2PXpncit8z5b3nSqGVzMNR3CmtAOgRutiZ02eIJJgP/b1iEFQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" @@ -2820,13 +2824,14 @@ } }, "node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.4.1.tgz", - "integrity": "sha512-ln41eihm5YXIY043vBrrHfn94SIBlqOWmoROhsMVTSXGh0QahKGy77tfEywQ7v3NywyxBBkGIfrWRHm0hsKtzA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.0.tgz", + "integrity": "sha512-hyZ3TANnzGfLpRA2s/4U1kbw2ZI4qGxaRJbBH2DCSREFfubMswheh8TeiC1sGZ3z2jUf3s37P0BBlrD3sjVTUw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2840,13 +2845,14 @@ } }, "node_modules/@parcel/watcher-darwin-x64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.4.1.tgz", - "integrity": "sha512-yrw81BRLjjtHyDu7J61oPuSoeYWR3lDElcPGJyOvIXmor6DEo7/G2u1o7I38cwlcoBHQFULqF6nesIX3tsEXMg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.0.tgz", + "integrity": "sha512-9rhlwd78saKf18fT869/poydQK8YqlU26TMiNg7AIu7eBp9adqbJZqmdFOsbZ5cnLp5XvRo9wcFmNHgHdWaGYA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2860,13 +2866,14 @@ } }, "node_modules/@parcel/watcher-freebsd-x64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.4.1.tgz", - "integrity": "sha512-TJa3Pex/gX3CWIx/Co8k+ykNdDCLx+TuZj3f3h7eOjgpdKM+Mnix37RYsYU4LHhiYJz3DK5nFCCra81p6g050w==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.0.tgz", + "integrity": "sha512-syvfhZzyM8kErg3VF0xpV8dixJ+RzbUaaGaeb7uDuz0D3FK97/mZ5AJQ3XNnDsXX7KkFNtyQyFrXZzQIcN49Tw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "freebsd" @@ -2880,13 +2887,35 @@ } }, "node_modules/@parcel/watcher-linux-arm-glibc": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.4.1.tgz", - "integrity": "sha512-4rVYDlsMEYfa537BRXxJ5UF4ddNwnr2/1O4MHM5PjI9cvV2qymvhwZSFgXqbS8YoTk5i/JR0L0JDs69BUn45YA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.0.tgz", + "integrity": "sha512-0VQY1K35DQET3dVYWpOaPFecqOT9dbuCfzjxoQyif1Wc574t3kOSkKevULddcR9znz1TcklCE7Ht6NIxjvTqLA==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.0.tgz", + "integrity": "sha512-6uHywSIzz8+vi2lAzFeltnYbdHsDm3iIB57d4g5oaB9vKwjb6N6dRIgZMujw4nm5r6v9/BQH0noq6DzHrqr2pA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2900,13 +2929,14 @@ } }, "node_modules/@parcel/watcher-linux-arm64-glibc": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.4.1.tgz", - "integrity": "sha512-BJ7mH985OADVLpbrzCLgrJ3TOpiZggE9FMblfO65PlOCdG++xJpKUJ0Aol74ZUIYfb8WsRlUdgrZxKkz3zXWYA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.0.tgz", + "integrity": "sha512-BfNjXwZKxBy4WibDb/LDCriWSKLz+jJRL3cM/DllnHH5QUyoiUNEp3GmL80ZqxeumoADfCCP19+qiYiC8gUBjA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2920,13 +2950,14 @@ } }, "node_modules/@parcel/watcher-linux-arm64-musl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.4.1.tgz", - "integrity": "sha512-p4Xb7JGq3MLgAfYhslU2SjoV9G0kI0Xry0kuxeG/41UfpjHGOhv7UoUDAz/jb1u2elbhazy4rRBL8PegPJFBhA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.0.tgz", + "integrity": "sha512-S1qARKOphxfiBEkwLUbHjCY9BWPdWnW9j7f7Hb2jPplu8UZ3nes7zpPOW9bkLbHRvWM0WDTsjdOTUgW0xLBN1Q==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2940,13 +2971,14 @@ } }, "node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.4.1.tgz", - "integrity": "sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.0.tgz", + "integrity": "sha512-d9AOkusyXARkFD66S6zlGXyzx5RvY+chTP9Jp0ypSTC9d4lzyRs9ovGf/80VCxjKddcUvnsGwCHWuF2EoPgWjw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2960,13 +2992,14 @@ } }, "node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.4.1.tgz", - "integrity": "sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.0.tgz", + "integrity": "sha512-iqOC+GoTDoFyk/VYSFHwjHhYrk8bljW6zOhPuhi5t9ulqiYq1togGJB5e3PwYVFFfeVgc6pbz3JdQyDoBszVaA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" @@ -2980,13 +3013,14 @@ } }, "node_modules/@parcel/watcher-win32-arm64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.4.1.tgz", - "integrity": "sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.0.tgz", + "integrity": "sha512-twtft1d+JRNkM5YbmexfcH/N4znDtjgysFaV9zvZmmJezQsKpkfLYJ+JFV3uygugK6AtIM2oADPkB2AdhBrNig==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -3000,13 +3034,14 @@ } }, "node_modules/@parcel/watcher-win32-ia32": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.4.1.tgz", - "integrity": "sha512-maNRit5QQV2kgHFSYwftmPBxiuK5u4DXjbXx7q6eKjq5dsLXZ4FJiVvlcw35QXzk0KrUecJmuVFbj4uV9oYrcw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.0.tgz", + "integrity": "sha512-+rgpsNRKwo8A53elqbbHXdOMtY/tAtTzManTWShB5Kk54N8Q9mzNWV7tV+IbGueCbcj826MfWGU3mprWtuf1TA==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -3020,13 +3055,14 @@ } }, "node_modules/@parcel/watcher-win32-x64": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.4.1.tgz", - "integrity": "sha512-+DvS92F9ezicfswqrvIRM2njcYJbd5mb9CUgtrHCHmvn7pPPa+nMDRu1o1bYYz/l5IB2NVGNJWiH7h1E58IF2A==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.0.tgz", + "integrity": "sha512-lPrxve92zEHdgeff3aiu4gDOIt4u7sJYha6wbdEZDCDUhtjTsOMiaJzG5lMY4GkWH8p0fMmO2Ppq5G5XXG+DQw==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -3816,9 +3852,9 @@ } }, "node_modules/@vitest/coverage-v8": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.4.tgz", - "integrity": "sha512-FPKQuJfR6VTfcNMcGpqInmtJuVXFSCd9HQltYncfR01AzXhLucMEtQ5SinPdZxsT5x/5BK7I5qFJ5/ApGCmyTQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.5.tgz", + "integrity": "sha512-/RoopB7XGW7UEkUndRXF87A9CwkoZAJW01pj8/3pgmDVsjMH2IKy6H1A38po9tmUlwhSyYs0az82rbKd9Yaynw==", "dev": true, "license": "MIT", "dependencies": { @@ -3831,7 +3867,7 @@ "istanbul-reports": "^3.1.7", "magic-string": "^0.30.12", "magicast": "^0.3.5", - "std-env": "^3.7.0", + "std-env": "^3.8.0", "test-exclude": "^7.0.1", "tinyrainbow": "^1.2.0" }, @@ -3839,8 +3875,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "2.1.4", - "vitest": "2.1.4" + "@vitest/browser": "2.1.5", + "vitest": "2.1.5" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -3849,14 +3885,14 @@ } }, "node_modules/@vitest/expect": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.4.tgz", - "integrity": "sha512-DOETT0Oh1avie/D/o2sgMHGrzYUFFo3zqESB2Hn70z6QB1HrS2IQ9z5DfyTqU8sg4Bpu13zZe9V4+UTNQlUeQA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.5.tgz", + "integrity": "sha512-nZSBTW1XIdpZvEJyoP/Sy8fUg0b8od7ZpGDkTUcfJ7wz/VoZAFzFfLyxVxGFhUjJzhYqSbIpfMtl/+k/dpWa3Q==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "2.1.4", - "@vitest/utils": "2.1.4", + "@vitest/spy": "2.1.5", + "@vitest/utils": "2.1.5", "chai": "^5.1.2", "tinyrainbow": "^1.2.0" }, @@ -3865,13 +3901,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.4.tgz", - "integrity": "sha512-Ky/O1Lc0QBbutJdW0rqLeFNbuLEyS+mIPiNdlVlp2/yhJ0SbyYqObS5IHdhferJud8MbbwMnexg4jordE5cCoQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.5.tgz", + "integrity": "sha512-XYW6l3UuBmitWqSUXTNXcVBUCRytDogBsWuNXQijc00dtnU/9OqpXWp4OJroVrad/gLIomAq9aW8yWDBtMthhQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "2.1.4", + "@vitest/spy": "2.1.5", "estree-walker": "^3.0.3", "magic-string": "^0.30.12" }, @@ -3892,9 +3928,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.4.tgz", - "integrity": "sha512-L95zIAkEuTDbUX1IsjRl+vyBSLh3PwLLgKpghl37aCK9Jvw0iP+wKwIFhfjdUtA2myLgjrG6VU6JCFLv8q/3Ww==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.5.tgz", + "integrity": "sha512-4ZOwtk2bqG5Y6xRGHcveZVr+6txkH7M2e+nPFd6guSoN638v/1XQ0K06eOpi0ptVU/2tW/pIU4IoPotY/GZ9fw==", "dev": true, "license": "MIT", "dependencies": { @@ -3905,13 +3941,13 @@ } }, "node_modules/@vitest/runner": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.4.tgz", - "integrity": "sha512-sKRautINI9XICAMl2bjxQM8VfCMTB0EbsBc/EDFA57V6UQevEKY/TOPOF5nzcvCALltiLfXWbq4MaAwWx/YxIA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.5.tgz", + "integrity": "sha512-pKHKy3uaUdh7X6p1pxOkgkVAFW7r2I818vHDthYLvUyjRfkKOU6P45PztOch4DZarWQne+VOaIMwA/erSSpB9g==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "2.1.4", + "@vitest/utils": "2.1.5", "pathe": "^1.1.2" }, "funding": { @@ -3919,13 +3955,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.4.tgz", - "integrity": "sha512-3Kab14fn/5QZRog5BPj6Rs8dc4B+mim27XaKWFWHWA87R56AKjHTGcBFKpvZKDzC4u5Wd0w/qKsUIio3KzWW4Q==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.5.tgz", + "integrity": "sha512-zmYw47mhfdfnYbuhkQvkkzYroXUumrwWDGlMjpdUr4jBd3HZiV2w7CQHj+z7AAS4VOtWxI4Zt4bWt4/sKcoIjg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.4", + "@vitest/pretty-format": "2.1.5", "magic-string": "^0.30.12", "pathe": "^1.1.2" }, @@ -3934,9 +3970,9 @@ } }, "node_modules/@vitest/spy": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.4.tgz", - "integrity": "sha512-4JOxa+UAizJgpZfaCPKK2smq9d8mmjZVPMt2kOsg/R8QkoRzydHH1qHxIYNvr1zlEaFj4SXiaaJWxq/LPLKaLg==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.5.tgz", + "integrity": "sha512-aWZF3P0r3w6DiYTVskOYuhBc7EMc3jvn1TkBg8ttylFFRqNN2XGD7V5a4aQdk6QiUzZQ4klNBSpCLJgWNdIiNw==", "dev": true, "license": "MIT", "dependencies": { @@ -3947,13 +3983,13 @@ } }, "node_modules/@vitest/utils": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.4.tgz", - "integrity": "sha512-MXDnZn0Awl2S86PSNIim5PWXgIAx8CIkzu35mBdSApUip6RFOGXBCf3YFyeEu8n1IHk4bWD46DeYFu9mQlFIRg==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.5.tgz", + "integrity": "sha512-yfj6Yrp0Vesw2cwJbP+cl04OC+IHFsuQsrsJBL9pyGeQXE56v1UAOQco+SR55Vf1nQzfV0QJg1Qum7AaWUwwYg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.4", + "@vitest/pretty-format": "2.1.5", "loupe": "^3.1.2", "tinyrainbow": "^1.2.0" }, @@ -5466,6 +5502,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true, + "license": "MIT" + }, "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", @@ -9872,10 +9915,11 @@ "dev": true }, "node_modules/std-env": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", - "dev": true + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", + "dev": true, + "license": "MIT" }, "node_modules/streamsearch": { "version": "1.1.0", @@ -10687,9 +10731,9 @@ } }, "node_modules/vite": { - "version": "5.4.10", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz", - "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==", + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", "dev": true, "license": "MIT", "dependencies": { @@ -10747,14 +10791,15 @@ } }, "node_modules/vite-node": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.4.tgz", - "integrity": "sha512-kqa9v+oi4HwkG6g8ufRnb5AeplcRw8jUF6/7/Qz1qRQOXHImG8YnLbB+LLszENwFnoBl9xIf9nVdCFzNd7GQEg==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.5.tgz", + "integrity": "sha512-rd0QIgx74q4S1Rd56XIiL2cYEdyWn13cunYBIuqh9mpmQr7gGS0IxXoP8R6OaZtNQQLyXSWbd4rXKYUbhFpK5w==", "dev": true, "license": "MIT", "dependencies": { "cac": "^6.7.14", "debug": "^4.3.7", + "es-module-lexer": "^1.5.4", "pathe": "^1.1.2", "vite": "^5.0.0" }, @@ -10769,31 +10814,31 @@ } }, "node_modules/vitest": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.4.tgz", - "integrity": "sha512-eDjxbVAJw1UJJCHr5xr/xM86Zx+YxIEXGAR+bmnEID7z9qWfoxpHw0zdobz+TQAFOLT+nEXz3+gx6nUJ7RgmlQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.5.tgz", + "integrity": "sha512-P4ljsdpuzRTPI/kbND2sDZ4VmieerR2c9szEZpjc+98Z9ebvnXmM5+0tHEKqYZumXqlvnmfWsjeFOjXVriDG7A==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "2.1.4", - "@vitest/mocker": "2.1.4", - "@vitest/pretty-format": "^2.1.4", - "@vitest/runner": "2.1.4", - "@vitest/snapshot": "2.1.4", - "@vitest/spy": "2.1.4", - "@vitest/utils": "2.1.4", + "@vitest/expect": "2.1.5", + "@vitest/mocker": "2.1.5", + "@vitest/pretty-format": "^2.1.5", + "@vitest/runner": "2.1.5", + "@vitest/snapshot": "2.1.5", + "@vitest/spy": "2.1.5", + "@vitest/utils": "2.1.5", "chai": "^5.1.2", "debug": "^4.3.7", "expect-type": "^1.1.0", "magic-string": "^0.30.12", "pathe": "^1.1.2", - "std-env": "^3.7.0", + "std-env": "^3.8.0", "tinybench": "^2.9.0", "tinyexec": "^0.3.1", "tinypool": "^1.0.1", "tinyrainbow": "^1.2.0", "vite": "^5.0.0", - "vite-node": "2.1.4", + "vite-node": "2.1.5", "why-is-node-running": "^2.3.0" }, "bin": { @@ -10808,8 +10853,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.1.4", - "@vitest/ui": "2.1.4", + "@vitest/browser": "2.1.5", + "@vitest/ui": "2.1.5", "happy-dom": "*", "jsdom": "*" }, diff --git a/client/package.json b/client/package.json index 9753fae9777..d511ba477bc 100644 --- a/client/package.json +++ b/client/package.json @@ -32,14 +32,14 @@ "@graphql-codegen/cli": "5.0.3", "@graphql-codegen/client-preset": "4.5.0", "@graphql-codegen/introspection": "4.0.3", - "@parcel/watcher": "2.4.1", + "@parcel/watcher": "2.5.0", "@testing-library/react": "16.0.1", "@types/react": "18.3.12", "@types/react-dom": "18.3.1", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", "@vitejs/plugin-react": "4.3.3", - "@vitest/coverage-v8": "2.1.4", + "@vitest/coverage-v8": "2.1.5", "eslint": "8.57.1", "eslint-config-prettier": "9.1.0", "eslint-plugin-import": "2.31.0", @@ -50,7 +50,7 @@ "jsdom": "25.0.1", "prettier": "3.3.3", "typescript": "5.6.3", - "vite": "5.4.10", - "vitest": "2.1.4" + "vite": "5.4.11", + "vitest": "2.1.5" } } From ab96fec8f3ed31f32ffe7b676568ea8c706e9fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rich=C3=A1rd=20K=C5=91szegi?= Date: Mon, 18 Nov 2024 11:35:59 +0100 Subject: [PATCH 095/169] Remove unneeded eslint-disable-line --- client/src/hooks/useQuayCoordinateQuery.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/hooks/useQuayCoordinateQuery.ts b/client/src/hooks/useQuayCoordinateQuery.ts index e2e401a950b..4b30f0f5ca2 100644 --- a/client/src/hooks/useQuayCoordinateQuery.ts +++ b/client/src/hooks/useQuayCoordinateQuery.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { request } from 'graphql-request'; // eslint-disable-line import/no-unresolved +import { request } from 'graphql-request'; import { Location, QueryType } from '../gql/graphql.ts'; import { getApiUrl } from '../util/getApiUrl.ts'; import { graphql } from '../gql'; From 62c3d7bd82a16a4d848cbf35064989cc31a05c64 Mon Sep 17 00:00:00 2001 From: OTP Bot Date: Mon, 18 Nov 2024 10:45:06 +0000 Subject: [PATCH 096/169] Upgrade debug client to version 2024/11/2024-11-18T10:44 --- application/src/client/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/client/index.html b/application/src/client/index.html index c731f6b1bc2..c54c7349042 100644 --- a/application/src/client/index.html +++ b/application/src/client/index.html @@ -5,8 +5,8 @@ OTP Debug Client - - + +

From 56f3b2a58da322c2ed06d5c8a89a7d2e59cd4b71 Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Mon, 18 Nov 2024 14:03:28 +0000 Subject: [PATCH 097/169] Add changelog entry for #6208 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index 973be1b8c01..a86eddbf388 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -44,6 +44,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Add previousLegs into GTFS GraphQL API [#6142](https://github.com/opentripplanner/OpenTripPlanner/pull/6142) - Fix stop index filtering on ServiceJourney Transmodel GraphQL API [#6251](https://github.com/opentripplanner/OpenTripPlanner/pull/6251) - Fix rental searches when destination is in a no-drop-off zone [#6233](https://github.com/opentripplanner/OpenTripPlanner/pull/6233) +- Include empty rail stops in transfers [#6208](https://github.com/opentripplanner/OpenTripPlanner/pull/6208) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From fbaa09466cc740d315e94f9d77b8bc5879ed6075 Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Mon, 18 Nov 2024 16:04:28 +0200 Subject: [PATCH 098/169] reformat wide code --- .../street/model/edge/StreetEdge.java | 20 +++++++++++++++---- .../model/edge/StreetEdgeGeofencingTest.java | 1 - 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java index d20ff5a404c..123e6733f52 100644 --- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java +++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java @@ -977,7 +977,10 @@ static int defaultMillimeterLength(LineString geometry) { return (int) (SphericalDistanceLibrary.length(geometry) * 1000); } - private State makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(State s0, String network) { + private State makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching( + State s0, + String network + ) { var preferences = s0.getRequest().preferences(); var edit = doTraverse(s0, TraverseMode.WALK, false); if (edit != null) { @@ -1008,14 +1011,23 @@ private State makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(State * zone applies to where we pick up a vehicle with a specific network. */ private State[] splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching(State s0) { - var states = tov.rentalRestrictions().noDropOffNetworks().stream().map(network -> makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, network)).filter(Objects::nonNull).toList(); + var states = tov + .rentalRestrictions() + .noDropOffNetworks() + .stream() + .map(network -> makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, network)) + .filter(Objects::nonNull) + .toList(); var statesStream = states.stream(); if (!states.isEmpty()) { // null is a special rental network that speculatively assumes that you can take any vehicle // you have to check in the rental edge if this has search has been started in a no-drop off zone - statesStream = Stream.concat(Stream.of(makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, null)), - statesStream); + statesStream = + Stream.concat( + Stream.of(makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, null)), + statesStream + ); } // Also include a state which continues walking, because the vehicle rental states are diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java index 1d4b560b5a1..f271317f03f 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java @@ -284,7 +284,6 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { assertEquals(BICYCLE, tierState.currentMode()); assertEquals(NETWORK_TIER, tierState.getVehicleRentalNetwork()); assertEquals(Set.of(), tierState.stateData.noRentalDropOffZonesAtStartOfReverseSearch); - /* * These rental networks are not allowed in the request so they are no longer returned final State birdState = states[3]; From e9aa49393581768389f7bf0d1606b4b23dd9ac1b Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Thu, 14 Nov 2024 22:46:27 +0100 Subject: [PATCH 099/169] Only allow the following combinations of transit-group-priority and via-visit, and any combination of via-pass-through and relaxed-cost. --- .../transit/mappers/RaptorRequestMapper.java | 31 ++-- .../routing/api/request/RouteRequest.java | 3 +- .../preference/TransitPreferences.java | 4 + .../mappers/RaptorRequestMapperTest.java | 165 +++++++++++++++--- .../preference/TransitPreferencesTest.java | 6 + 5 files changed, 173 insertions(+), 36 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapper.java b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapper.java index 8de3a16553d..c5a75b02bbc 100644 --- a/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapper.java +++ b/application/src/main/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapper.java @@ -16,6 +16,7 @@ import org.opentripplanner.raptor.api.model.RaptorTripSchedule; import org.opentripplanner.raptor.api.model.RelaxFunction; import org.opentripplanner.raptor.api.request.DebugRequestBuilder; +import org.opentripplanner.raptor.api.request.MultiCriteriaRequest; import org.opentripplanner.raptor.api.request.Optimization; import org.opentripplanner.raptor.api.request.PassThroughPoint; import org.opentripplanner.raptor.api.request.RaptorRequest; @@ -26,6 +27,7 @@ import org.opentripplanner.routing.api.request.DebugEventType; import org.opentripplanner.routing.api.request.RouteRequest; import org.opentripplanner.routing.api.request.framework.CostLinearFunction; +import org.opentripplanner.routing.api.request.preference.TransitPreferences; import org.opentripplanner.routing.api.request.via.ViaLocation; import org.opentripplanner.transit.model.network.grouppriority.DefaultTransitGroupPriorityCalculator; @@ -128,15 +130,20 @@ private RaptorRequest doMap() { var pt = preferences.transit(); var r = pt.raptor(); - // Note! If a pass-through-point exists, then the transit-group-priority feature is disabled - - // TODO - We need to handle via locations that are not pass-through-points here if (hasPassThroughOnly()) { mcBuilder.withPassThroughPoints(mapPassThroughPoints()); + } else if (hasViaLocationsOnly()) { + builder.searchParams().addViaLocations(mapViaLocations()); + // relax transit group priority can be used with via-visit-stop, but not with pass-through + if (pt.isRelaxTransitGroupPrioritySet()) { + mapRelaxTransitGroupPriority(mcBuilder, pt); + } + } else if (pt.isRelaxTransitGroupPrioritySet()) { + mapRelaxTransitGroupPriority(mcBuilder, pt); + } else { + // The deprecated relaxGeneralizedCostAtDestination is only enabled, if there is no + // via location and the relaxTransitGroupPriority is not used (Normal). r.relaxGeneralizedCostAtDestination().ifPresent(mcBuilder::withRelaxCostAtDestination); - } else if (!pt.relaxTransitGroupPriority().isNormal()) { - mcBuilder.withTransitPriorityCalculator(new DefaultTransitGroupPriorityCalculator()); - mcBuilder.withRelaxC1(mapRelaxCost(pt.relaxTransitGroupPriority())); } }); @@ -160,10 +167,6 @@ private RaptorRequest doMap() { .addAccessPaths(accessPaths) .addEgressPaths(egressPaths); - if (hasViaLocationsOnly()) { - builder.searchParams().addViaLocations(mapViaLocations()); - } - var raptorDebugging = request.journey().transit().raptorDebugging(); if (raptorDebugging.isEnabled()) { @@ -271,6 +274,14 @@ private int relativeTime(Instant time) { return (int) (time.getEpochSecond() - transitSearchTimeZeroEpocSecond); } + private static void mapRelaxTransitGroupPriority( + MultiCriteriaRequest.Builder mcBuilder, + TransitPreferences pt + ) { + mcBuilder.withTransitPriorityCalculator(new DefaultTransitGroupPriorityCalculator()); + mcBuilder.withRelaxC1(mapRelaxCost(pt.relaxTransitGroupPriority())); + } + private static void addLogListenerForEachEventTypeRequested( DebugRequestBuilder target, DebugEventType type, diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java b/application/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java index 8e649b3be49..4e36b1b58db 100644 --- a/application/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java +++ b/application/src/main/java/org/opentripplanner/routing/api/request/RouteRequest.java @@ -292,8 +292,9 @@ public List getViaLocations() { return via; } - public void setViaLocations(final List via) { + public RouteRequest setViaLocations(final List via) { this.via = via; + return this; } /** diff --git a/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransitPreferences.java b/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransitPreferences.java index f15b47216e5..a237dd53527 100644 --- a/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransitPreferences.java +++ b/application/src/main/java/org/opentripplanner/routing/api/request/preference/TransitPreferences.java @@ -137,6 +137,10 @@ public CostLinearFunction relaxTransitGroupPriority() { return relaxTransitGroupPriority; } + public boolean isRelaxTransitGroupPrioritySet() { + return !relaxTransitGroupPriority.isNormal(); + } + /** * When true, real-time updates are ignored during this search. */ diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java index e9b235c1c3e..ab97262f16f 100644 --- a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java @@ -3,12 +3,18 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.opentripplanner.routing.algorithm.raptoradapter.transit.mappers.RaptorRequestMapperTest.RequestFeature.RELAX_COST_DEST; +import static org.opentripplanner.routing.algorithm.raptoradapter.transit.mappers.RaptorRequestMapperTest.RequestFeature.TRANSIT_GROUP_PRIORITY; +import static org.opentripplanner.routing.algorithm.raptoradapter.transit.mappers.RaptorRequestMapperTest.RequestFeature.VIA_PASS_THROUGH; +import static org.opentripplanner.routing.algorithm.raptoradapter.transit.mappers.RaptorRequestMapperTest.RequestFeature.VIA_VISIT; import java.time.Duration; import java.time.ZonedDateTime; import java.util.List; import java.util.Map; import java.util.stream.IntStream; +import javax.annotation.Nullable; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -24,11 +30,22 @@ import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.transit.model.site.StopLocation; +import org.opentripplanner.utils.collection.ListUtils; class RaptorRequestMapperTest { private static final TimetableRepositoryForTest TEST_MODEL = TimetableRepositoryForTest.of(); private static final StopLocation STOP_A = TEST_MODEL.stop("Stop:A").build(); + public static final PassThroughViaLocation PASS_THROUGH_VIA_LOCATION = new PassThroughViaLocation( + "Via A", + List.of(STOP_A.getId()) + ); + public static final VisitViaLocation VISIT_VIA_LOCATION = new VisitViaLocation( + "Via A", + null, + List.of(STOP_A.getId()), + List.of() + ); private static final List ACCESS = List.of(TestAccessEgress.walk(12, 45)); private static final List EGRESS = List.of(TestAccessEgress.walk(144, 54)); @@ -37,6 +54,10 @@ class RaptorRequestMapperTest { private static final CostLinearFunction R3 = CostLinearFunction.of("30 + 2.0x"); private static final Map STOPS_MAP = Map.of(STOP_A.getId(), STOP_A); + private static final CostLinearFunction RELAX_TRANSIT_GROUP_PRIORITY = CostLinearFunction.of( + "30m + 1.2t" + ); + public static final double RELAX_GENERALIZED_COST_AT_DESTINATION = 2.0; static List testCasesRelaxedCost() { return List.of( @@ -102,40 +123,67 @@ void testTransitGroupPriority() { var result = map(req); - assertFalse(result.multiCriteria().transitPriorityCalculator().isEmpty()); + assertTrue(result.multiCriteria().transitPriorityCalculator().isPresent()); } - @Test - void testVisitViaAllowsTransitGroupPriority() { - var req = new RouteRequest(); - - // Set visit-via and relax transit-group-priority - req.setViaLocations( - List.of(new VisitViaLocation("Via A", null, List.of(STOP_A.getId()), List.of())) - ); - req.withPreferences(p -> - p.withTransit(t -> t.withRelaxTransitGroupPriority(CostLinearFunction.of("30m + 1.2t"))) + static List testViaAndTransitGroupPriorityCombinationsTestCases() { + return List.of( + Arguments.of(List.of(VIA_VISIT), List.of(VIA_VISIT), null), + Arguments.of(List.of(VIA_PASS_THROUGH), List.of(VIA_PASS_THROUGH), null), + Arguments.of(List.of(TRANSIT_GROUP_PRIORITY), List.of(TRANSIT_GROUP_PRIORITY), null), + Arguments.of(List.of(RELAX_COST_DEST), List.of(RELAX_COST_DEST), null), + Arguments.of( + List.of(VIA_VISIT, TRANSIT_GROUP_PRIORITY), + List.of(VIA_VISIT, TRANSIT_GROUP_PRIORITY), + null + ), + Arguments.of( + List.of(VIA_PASS_THROUGH, TRANSIT_GROUP_PRIORITY, RELAX_COST_DEST), + List.of(VIA_PASS_THROUGH), + null + ), + Arguments.of( + List.of(VIA_VISIT, TRANSIT_GROUP_PRIORITY, RELAX_COST_DEST), + List.of(VIA_VISIT, TRANSIT_GROUP_PRIORITY), + null + ), + Arguments.of( + List.of(TRANSIT_GROUP_PRIORITY, RELAX_COST_DEST), + List.of(TRANSIT_GROUP_PRIORITY), + null + ), + Arguments.of( + List.of(VIA_VISIT, VIA_PASS_THROUGH), + List.of(), + "A mix of via-locations and pass-through is not allowed in this version." + ) ); - - var result = map(req); - - assertFalse(result.multiCriteria().transitPriorityCalculator().isEmpty()); } - @Test - void testPassThroughPointsTurnTransitGroupPriorityOff() { + @ParameterizedTest + @MethodSource("testViaAndTransitGroupPriorityCombinationsTestCases") + void testViaAndTransitGroupPriorityCombinations( + List input, + List expectedEnabledFeatures, + @Nullable String errorMessage + ) { var req = new RouteRequest(); - // Set pass-through and relax transit-group-priority - req.setViaLocations(List.of(new PassThroughViaLocation("Via A", List.of(STOP_A.getId())))); - req.withPreferences(p -> - p.withTransit(t -> t.withRelaxTransitGroupPriority(CostLinearFunction.of("30m + 1.2t"))) - ); + for (RequestFeature it : input) { + req = setFeaturesOnRequest(req, it); + } - var result = map(req); + if (errorMessage == null) { + var result = map(req); - // transit-group-priority CANNOT be used with pass-through and is turned off... - assertTrue(result.multiCriteria().transitPriorityCalculator().isEmpty()); + for (var feature : RequestFeature.values()) { + assertFeatureSet(feature, result, expectedEnabledFeatures.contains(feature)); + } + } else { + var r = req; + var ex = Assertions.assertThrows(IllegalArgumentException.class, () -> map(r)); + assertEquals(errorMessage, ex.getMessage()); + } } private static RaptorRequest map(RouteRequest request) { @@ -149,4 +197,71 @@ private static RaptorRequest map(RouteRequest request) { id -> IntStream.of(STOPS_MAP.get(id).getIndex()) ); } + + private static void assertFeatureSet( + RequestFeature feature, + RaptorRequest result, + boolean expected + ) { + switch (feature) { + case VIA_VISIT: + if (expected) { + assertTrue(result.searchParams().hasViaLocations()); + // One via location exist(no NPE), but it does not allow pass-through + assertEquals( + "Via{label: Via A, connections: [0]}", + result.searchParams().viaLocations().get(0).toString() + ); + } + break; + case VIA_PASS_THROUGH: + if (expected) { + assertTrue(result.multiCriteria().hasPassThroughPoints()); + assertEquals( + "(Via A, stops: 0)", + result.multiCriteria().passThroughPoints().get(0).toString() + ); + } + break; + case TRANSIT_GROUP_PRIORITY: + assertEquals(expected, result.multiCriteria().transitPriorityCalculator().isPresent()); + if (expected) { + assertFalse(result.multiCriteria().hasPassThroughPoints()); + } + break; + case RELAX_COST_DEST: + assertEquals(expected, result.multiCriteria().relaxCostAtDestination() != null); + if (expected) { + assertFalse(result.multiCriteria().hasPassThroughPoints()); + assertFalse(result.searchParams().hasViaLocations()); + } + break; + } + } + + private static RouteRequest setFeaturesOnRequest(RouteRequest req, RequestFeature feature) { + return switch (feature) { + case VIA_VISIT -> req.setViaLocations(List.of(VISIT_VIA_LOCATION)); + case VIA_PASS_THROUGH -> req.setViaLocations( + ListUtils.combine(req.getViaLocations(), List.of(PASS_THROUGH_VIA_LOCATION)) + ); + case TRANSIT_GROUP_PRIORITY -> req.withPreferences(p -> + p.withTransit(t -> t.withRelaxTransitGroupPriority(RELAX_TRANSIT_GROUP_PRIORITY)) + ); + case RELAX_COST_DEST -> req.withPreferences(p -> + p.withTransit(t -> + t.withRaptor(r -> + r.withRelaxGeneralizedCostAtDestination(RELAX_GENERALIZED_COST_AT_DESTINATION) + ) + ) + ); + }; + } + + enum RequestFeature { + VIA_VISIT, + VIA_PASS_THROUGH, + TRANSIT_GROUP_PRIORITY, + RELAX_COST_DEST, + } } diff --git a/application/src/test/java/org/opentripplanner/routing/api/request/preference/TransitPreferencesTest.java b/application/src/test/java/org/opentripplanner/routing/api/request/preference/TransitPreferencesTest.java index b77a7d9085b..bcdfcfc545c 100644 --- a/application/src/test/java/org/opentripplanner/routing/api/request/preference/TransitPreferencesTest.java +++ b/application/src/test/java/org/opentripplanner/routing/api/request/preference/TransitPreferencesTest.java @@ -81,6 +81,12 @@ void relaxTransitGroupPriority() { assertEquals(TRANSIT_GROUP_PRIORITY_RELAX, subject.relaxTransitGroupPriority()); } + @Test + void isRelaxTransitGroupPrioritySet() { + assertTrue(subject.isRelaxTransitGroupPrioritySet()); + assertFalse(TransitPreferences.DEFAULT.isRelaxTransitGroupPrioritySet()); + } + @Test void ignoreRealtimeUpdates() { assertFalse(TransitPreferences.DEFAULT.ignoreRealtimeUpdates()); From 6cd9ed81a38485b8e06280fb28079c5499f18600 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 18 Nov 2024 15:34:24 +0100 Subject: [PATCH 100/169] Mention that Cobb service doesn't exist anymore --- .../ext/flex/trip/ScheduledDeviatedTripIntegrationTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripIntegrationTest.java b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripIntegrationTest.java index 9145ff91659..3a8e33cfbf2 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripIntegrationTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/flex/trip/ScheduledDeviatedTripIntegrationTest.java @@ -51,7 +51,8 @@ * contains both flex zones but also scheduled stops. Inside the zone, passengers can get on or off * anywhere, so there it works more like a taxi. *

- * Read about the details at: https://www.cobbcounty.org/transportation/cobblinc/routes-and-schedules/flex + * This service is not being offered anymore, but we keep the test because others of the same + * type still exist. */ class ScheduledDeviatedTripIntegrationTest { From d1a819fd60be2951c4221e878662f612ded55b1d Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Mon, 18 Nov 2024 15:46:44 +0100 Subject: [PATCH 101/169] Refactor: Make RaptorRequestMapperTest more robust --- .../transit/mappers/RaptorRequestMapperTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java index ab97262f16f..dcd58908255 100644 --- a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java @@ -241,7 +241,9 @@ private static void assertFeatureSet( private static RouteRequest setFeaturesOnRequest(RouteRequest req, RequestFeature feature) { return switch (feature) { - case VIA_VISIT -> req.setViaLocations(List.of(VISIT_VIA_LOCATION)); + case VIA_VISIT -> req.setViaLocations( + ListUtils.combine(req.getViaLocations(), List.of(VISIT_VIA_LOCATION)) + ); case VIA_PASS_THROUGH -> req.setViaLocations( ListUtils.combine(req.getViaLocations(), List.of(PASS_THROUGH_VIA_LOCATION)) ); From a2ff9e196fcf8402cdc7471cbbe00ad7d0a16f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rich=C3=A1rd=20K=C5=91szegi?= Date: Mon, 18 Nov 2024 16:24:26 +0100 Subject: [PATCH 102/169] debug client: turn off location validation in inputs and handle query errors --- client/src/hooks/useQuayCoordinateQuery.ts | 6 +++++- client/src/hooks/useTripQuery.ts | 12 ++++++++---- client/src/util/locationConverter.ts | 16 +++------------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/client/src/hooks/useQuayCoordinateQuery.ts b/client/src/hooks/useQuayCoordinateQuery.ts index 4b30f0f5ca2..6d4655a6838 100644 --- a/client/src/hooks/useQuayCoordinateQuery.ts +++ b/client/src/hooks/useQuayCoordinateQuery.ts @@ -20,7 +20,11 @@ export const useQuayCoordinateQuery = (location: Location) => { const fetchData = async () => { if (location.place) { const variables = { id: location.place }; - setData((await request(getApiUrl(), query, variables)) as QueryType); + try { + setData((await request(getApiUrl(), query, variables)) as QueryType); + } catch (e) { + console.error('Error at useQuayCoordinateQuery', e); + } } else { setData(null); } diff --git a/client/src/hooks/useTripQuery.ts b/client/src/hooks/useTripQuery.ts index 651a99a8d8f..f1f8c859bd0 100644 --- a/client/src/hooks/useTripQuery.ts +++ b/client/src/hooks/useTripQuery.ts @@ -22,10 +22,14 @@ export const useTripQuery: TripQueryHook = (variables) => { } else { if (variables) { setLoading(true); - if (pageCursor) { - setData((await request(getApiUrl(), query, { ...variables, pageCursor })) as QueryType); - } else { - setData((await request(getApiUrl(), query, variables)) as QueryType); + try { + if (pageCursor) { + setData((await request(getApiUrl(), query, { ...variables, pageCursor })) as QueryType); + } else { + setData((await request(getApiUrl(), query, variables)) as QueryType); + } + } catch (e) { + console.error('Error at useTripQuery', e); } setLoading(false); } else { diff --git a/client/src/util/locationConverter.ts b/client/src/util/locationConverter.ts index 647c78582e9..bb9c8a5b01d 100644 --- a/client/src/util/locationConverter.ts +++ b/client/src/util/locationConverter.ts @@ -5,8 +5,6 @@ const DOUBLE_PATTERN = '-{0,1}\\d+(\\.\\d+){0,1}'; const LAT_LON_PATTERN = '(' + DOUBLE_PATTERN + ')(\\s*,\\s*|\\s+)(' + DOUBLE_PATTERN + ')'; -const ID_SEPARATOR = ':'; - export function parseLocation(value: string): Location | null { const latLonMatch = value.match(LAT_LON_PATTERN); @@ -19,17 +17,9 @@ export function parseLocation(value: string): Location | null { }; } - if (validFeedScopeIdString(value)) { - return { - place: value, - }; - } - - return null; -} - -function validFeedScopeIdString(value: string): boolean { - return value.indexOf(ID_SEPARATOR) > -1; + return { + place: value, + }; } export function toString(location: Location): string | null { From bdb6e54aa4cb2929d659e275b3b9ca165db58485 Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Mon, 18 Nov 2024 16:24:41 +0100 Subject: [PATCH 103/169] Document RaptorRequestMapperTest test-cases --- .../mappers/RaptorRequestMapperTest.java | 69 ++++++++++++++----- 1 file changed, 53 insertions(+), 16 deletions(-) diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java index dcd58908255..9424a6b2d13 100644 --- a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/RaptorRequestMapperTest.java @@ -128,48 +128,85 @@ void testTransitGroupPriority() { static List testViaAndTransitGroupPriorityCombinationsTestCases() { return List.of( - Arguments.of(List.of(VIA_VISIT), List.of(VIA_VISIT), null), - Arguments.of(List.of(VIA_PASS_THROUGH), List.of(VIA_PASS_THROUGH), null), - Arguments.of(List.of(TRANSIT_GROUP_PRIORITY), List.of(TRANSIT_GROUP_PRIORITY), null), - Arguments.of(List.of(RELAX_COST_DEST), List.of(RELAX_COST_DEST), null), + // If ONE feature is requested, the same feature is expected Arguments.of( - List.of(VIA_VISIT, TRANSIT_GROUP_PRIORITY), - List.of(VIA_VISIT, TRANSIT_GROUP_PRIORITY), + "VIA_PASS_THROUGH only", + List.of(VIA_PASS_THROUGH), + List.of(VIA_PASS_THROUGH), + null + ), + Arguments.of("VIA_VISIT only", List.of(VIA_VISIT), List.of(VIA_VISIT), null), + Arguments.of( + "TRANSIT_GROUP_PRIORITY only", + List.of(TRANSIT_GROUP_PRIORITY), + List.of(TRANSIT_GROUP_PRIORITY), + null + ), + Arguments.of( + "RELAX_COST_DEST only", + List.of(RELAX_COST_DEST), + List.of(RELAX_COST_DEST), null ), Arguments.of( + "VIA_VISIT is not allowed together VIA_PASS_THROUGH, an error is expected.", + List.of(VIA_VISIT, VIA_PASS_THROUGH), + List.of(), + "A mix of via-locations and pass-through is not allowed in this version." + ), + Arguments.of( + """ + VIA_VISIT is not allowed together VIA_PASS_THROUGH, an error is expected. + Other features are ignored. + """, + List.of(VIA_VISIT, VIA_PASS_THROUGH, TRANSIT_GROUP_PRIORITY, RELAX_COST_DEST), + List.of(), + "A mix of via-locations and pass-through is not allowed in this version." + ), + Arguments.of( + "VIA_PASS_THROUGH cannot be combined with other features, and other features are dropped", List.of(VIA_PASS_THROUGH, TRANSIT_GROUP_PRIORITY, RELAX_COST_DEST), List.of(VIA_PASS_THROUGH), null ), Arguments.of( + "VIA_VISIT can be combined with TRANSIT_GROUP_PRIORITY", + List.of(VIA_VISIT, TRANSIT_GROUP_PRIORITY), + List.of(VIA_VISIT, TRANSIT_GROUP_PRIORITY), + null + ), + Arguments.of( + """ + VIA_VISIT can only be combined with TRANSIT_GROUP_PRIORITY, and other features are dropped + VIA_PASS_THROUGH override VIA_VISIT (see above) + """, List.of(VIA_VISIT, TRANSIT_GROUP_PRIORITY, RELAX_COST_DEST), List.of(VIA_VISIT, TRANSIT_GROUP_PRIORITY), null ), Arguments.of( + """ + TRANSIT_GROUP_PRIORITY cannot be combined with other features, override RELAX_COST_DEST + VIA_PASS_THROUGH and VIA_VISIT override VIA_VISIT (see above) + """, List.of(TRANSIT_GROUP_PRIORITY, RELAX_COST_DEST), List.of(TRANSIT_GROUP_PRIORITY), null - ), - Arguments.of( - List.of(VIA_VISIT, VIA_PASS_THROUGH), - List.of(), - "A mix of via-locations and pass-through is not allowed in this version." ) ); } - @ParameterizedTest + @ParameterizedTest(name = "{0}. {1} => {2}") @MethodSource("testViaAndTransitGroupPriorityCombinationsTestCases") void testViaAndTransitGroupPriorityCombinations( - List input, - List expectedEnabledFeatures, + String testDescription, + List requestedFeatures, + List expectedFeatures, @Nullable String errorMessage ) { var req = new RouteRequest(); - for (RequestFeature it : input) { + for (RequestFeature it : requestedFeatures) { req = setFeaturesOnRequest(req, it); } @@ -177,7 +214,7 @@ void testViaAndTransitGroupPriorityCombinations( var result = map(req); for (var feature : RequestFeature.values()) { - assertFeatureSet(feature, result, expectedEnabledFeatures.contains(feature)); + assertFeatureSet(feature, result, expectedFeatures.contains(feature)); } } else { var r = req; From 2be774b24293b222a92b63d5476f9d06ee2e494b Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 18 Nov 2024 17:55:00 +0100 Subject: [PATCH 104/169] Apply review feedback --- .../GtfsRealtimeFuzzyTripMatcherTest.java | 65 +++++++++++-------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java index 82e8c2f825d..b1df8a08e6a 100644 --- a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java +++ b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java @@ -7,11 +7,9 @@ import com.google.transit.realtime.GtfsRealtime.TripDescriptor; import java.time.LocalDate; import java.util.List; -import java.util.function.Function; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.model.calendar.CalendarServiceData; import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; @@ -41,7 +39,7 @@ public class GtfsRealtimeFuzzyTripMatcherTest { ); private static final RegularStop STOP_1 = TEST_MODEL.stop("s1").build(); private static final RegularStop STOP_2 = TEST_MODEL.stop("s2").build(); - private static final TimetableRepository TT_REPO = new TimetableRepository( + private static final TimetableRepository TIMETABLE_REPOSITORY = new TimetableRepository( siteRepositoryBuilder.build(), new Deduplicator() ); @@ -67,10 +65,14 @@ static void setup() { TRIP_TIMES.setServiceCode(SERVICE_CODE); CalendarServiceData calendarServiceData = new CalendarServiceData(); calendarServiceData.putServiceDatesForServiceId(SERVICE_ID, List.of(SERVICE_DATE)); - TT_REPO.addTripPattern(TRIP_PATTERN.getId(), TRIP_PATTERN); - TT_REPO.getServiceCodes().put(SERVICE_ID, SERVICE_CODE); - TT_REPO.updateCalendarServiceData(true, calendarServiceData, DataImportIssueStore.NOOP); - TT_REPO.index(); + TIMETABLE_REPOSITORY.addTripPattern(TRIP_PATTERN.getId(), TRIP_PATTERN); + TIMETABLE_REPOSITORY.getServiceCodes().put(SERVICE_ID, SERVICE_CODE); + TIMETABLE_REPOSITORY.updateCalendarServiceData( + true, + calendarServiceData, + DataImportIssueStore.NOOP + ); + TIMETABLE_REPOSITORY.index(); } @Test @@ -115,23 +117,6 @@ void incorrectDirection() { assertFalse(matcher.match(FEED_ID, trip1).hasTripId()); } - public static List> incompleteDataCases() { - return List.of( - TripDescriptor.Builder::clearDirectionId, - TripDescriptor.Builder::clearRouteId, - TripDescriptor.Builder::clearStartTime, - TripDescriptor.Builder::clearStartDate - ); - } - - @MethodSource("incompleteDataCases") - @ParameterizedTest - void incompleteMatchingData(Function modifier) { - var matcher = matcher(); - TripDescriptor trip1 = modifier.apply(matchingTripUpdate()).build(); - assertFalse(matcher.match(FEED_ID, trip1).hasTripId()); - } - @Test void noMatch() { // Test matching with "real time", when schedule uses time grater than 24:00 @@ -155,8 +140,36 @@ void noMatch() { assertFalse(trip1.hasTripId()); } + @Nested + class IncompleteData { + + @Test + void noRouteId() { + var td = matchingTripUpdate().clearRouteId().build(); + assertFalse(matcher().match(FEED_ID, td).hasTripId()); + } + + @Test + void noDirectionId() { + var td = matchingTripUpdate().clearDirectionId().build(); + assertFalse(matcher().match(FEED_ID, td).hasTripId()); + } + + @Test + void noStartDate() { + var td = matchingTripUpdate().clearStartDate().build(); + assertFalse(matcher().match(FEED_ID, td).hasTripId()); + } + + @Test + void noStartTime() { + var td = matchingTripUpdate().clearStartTime().build(); + assertFalse(matcher().match(FEED_ID, td).hasTripId()); + } + } + private static GtfsRealtimeFuzzyTripMatcher matcher() { - return new GtfsRealtimeFuzzyTripMatcher(new DefaultTransitService(TT_REPO)); + return new GtfsRealtimeFuzzyTripMatcher(new DefaultTransitService(TIMETABLE_REPOSITORY)); } private static TripDescriptor.Builder matchingTripUpdate() { From 6205e97e6bc3f61e442359fbdbc27c9123e9e615 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 18 Nov 2024 23:02:09 +0100 Subject: [PATCH 105/169] Make stops layers clickable when rendering debug client --- client/src/components/MapView/LayerControl.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/components/MapView/LayerControl.tsx b/client/src/components/MapView/LayerControl.tsx index e79ae95e61e..61dd48e4a34 100644 --- a/client/src/components/MapView/LayerControl.tsx +++ b/client/src/components/MapView/LayerControl.tsx @@ -62,6 +62,8 @@ class LayerControl implements IControl { } } }); + // initialize clickable layers (initially stops) + this.updateInteractiveLayerIds(map); }); return this.container; From 6075162552c219e4f7ae95e71f634b1260e8d122 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Tue, 19 Nov 2024 10:09:07 +0100 Subject: [PATCH 106/169] Fix formatting --- .../module/nearbystops/PatternConsideringNearbyStopFinder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java b/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java index 3804e7f65d8..8df2a25b64e 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/nearbystops/PatternConsideringNearbyStopFinder.java @@ -1,7 +1,7 @@ package org.opentripplanner.graph_builder.module.nearbystops; -import java.util.HashSet; import java.util.Collection; +import java.util.HashSet; import java.util.List; import java.util.Set; import org.opentripplanner.ext.flex.trip.FlexTrip; From 7336d91012857bd555c6bd8cc2b996988d8e3fc5 Mon Sep 17 00:00:00 2001 From: OTP Bot Date: Tue, 19 Nov 2024 11:11:07 +0000 Subject: [PATCH 107/169] Upgrade debug client to version 2024/11/2024-11-19T11:10 --- application/src/client/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/client/index.html b/application/src/client/index.html index c54c7349042..dbd69816a5b 100644 --- a/application/src/client/index.html +++ b/application/src/client/index.html @@ -5,8 +5,8 @@ OTP Debug Client - - + +

From a9df68921e255ffb32cd03ed9cc2f1ebbcb68626 Mon Sep 17 00:00:00 2001 From: OTP Bot Date: Tue, 19 Nov 2024 11:17:07 +0000 Subject: [PATCH 108/169] Upgrade debug client to version 2024/11/2024-11-19T11:16 --- application/src/client/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/client/index.html b/application/src/client/index.html index dbd69816a5b..7c460db6dd9 100644 --- a/application/src/client/index.html +++ b/application/src/client/index.html @@ -5,8 +5,8 @@ OTP Debug Client - - + +
From 0dea496dd6b85dadde1affd04ffa13b842f6f465 Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Tue, 19 Nov 2024 11:17:22 +0000 Subject: [PATCH 109/169] Add changelog entry for #6231 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index a86eddbf388..895044bc3c9 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -45,6 +45,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Fix stop index filtering on ServiceJourney Transmodel GraphQL API [#6251](https://github.com/opentripplanner/OpenTripPlanner/pull/6251) - Fix rental searches when destination is in a no-drop-off zone [#6233](https://github.com/opentripplanner/OpenTripPlanner/pull/6233) - Include empty rail stops in transfers [#6208](https://github.com/opentripplanner/OpenTripPlanner/pull/6208) +- Relax rejection of GTFS flex trips that also contain continuous stopping [#6231](https://github.com/opentripplanner/OpenTripPlanner/pull/6231) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From 5b5d92fe7e81c2fab07f2ff6ae8f7488427be71c Mon Sep 17 00:00:00 2001 From: OTP Serialization Version Bot Date: Tue, 19 Nov 2024 11:17:43 +0000 Subject: [PATCH 110/169] Bump serialization version id for #6231 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9e3f4d6f32c..b520f3cad63 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ - 171 + 172 32.0 2.52 From d2cf56f5be4929850fc084aa89106f87613275a1 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Tue, 19 Nov 2024 14:08:26 +0100 Subject: [PATCH 111/169] Change trip_bikes_allowed, route_bikes_allowed in simple GTFS feed --- application/src/test/resources/gtfs/simple/routes.txt | 8 ++++---- application/src/test/resources/gtfs/simple/trips.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/application/src/test/resources/gtfs/simple/routes.txt b/application/src/test/resources/gtfs/simple/routes.txt index ba2bb397941..2957341851e 100755 --- a/application/src/test/resources/gtfs/simple/routes.txt +++ b/application/src/test/resources/gtfs/simple/routes.txt @@ -1,13 +1,13 @@ -route_id,route_short_name,route_long_name,route_type,route_bikes_allowed -1,1,1,3,2 -2,2,2,3,1 +route_id,route_short_name,route_long_name,route_type,bikes_allowed +1,1,1,3,1 +2,2,2,3,2 3,3,3,3, 4,4,4,7, 5,5,5,2, 6,6,6,2, 7,7,7,2, 8,8,8,3, -9,9,9,2,2 +9,9,9,2,1 10,10,10,2, 11,11,11,2, 12,12,12,2, diff --git a/application/src/test/resources/gtfs/simple/trips.txt b/application/src/test/resources/gtfs/simple/trips.txt index d18b02d6896..ca826df2c5c 100755 --- a/application/src/test/resources/gtfs/simple/trips.txt +++ b/application/src/test/resources/gtfs/simple/trips.txt @@ -1,9 +1,9 @@ -route_id,service_id,trip_id,shape_id,block_id,wheelchair_accessible,trip_bikes_allowed,direction_id,trip_headsign +route_id,service_id,trip_id,shape_id,block_id,wheelchair_accessible,bikes_allowed,direction_id,trip_headsign 1,alldays,1.1,,,1,,,foo 1,alldays,1.2,,,1,,,foo 1,alldays,1.3,,,1,,,foo -2,alldays,2.1,,,0,2,,foo -2,alldays,2.2,,,0,2,,foo +2,alldays,2.1,,,0,1,,foo +2,alldays,2.2,,,0,1,,foo 3,alldays,3.1,,,1,,,foo 3,alldays,3.2,,,1,,,foo 4,weekdays,4.1,4,,,,,foo @@ -15,7 +15,7 @@ route_id,service_id,trip_id,shape_id,block_id,wheelchair_accessible,trip_bikes_a 6,alldays,6.2,,block.2,,,,foo 7,alldays,7.2,,block.2,,,,foo 8,alldays,8.1,,block.2,,,,foo -9,alldays,9.1,,,,1,,foo +9,alldays,9.1,,,,2,,foo 10,alldays,10.1,,,,,,foo 10,alldays,10.2,,,,,,foo 10,alldays,10.3,,,,,,foo From 15e88f26b39ee1ad2bb01e71d418c6f707f47776 Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Wed, 20 Nov 2024 12:13:58 +0200 Subject: [PATCH 112/169] much better test coverage for splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching --- .../street/model/edge/StreetEdge.java | 25 ++- .../model/edge/StreetEdgeGeofencingTest.java | 159 ++++++++++++++++-- 2 files changed, 161 insertions(+), 23 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java index 123e6733f52..1c017a21063 100644 --- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java +++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java @@ -9,7 +9,9 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import java.util.Set; import java.util.stream.Stream; +import javax.annotation.Nullable; import org.locationtech.jts.geom.LineString; import org.locationtech.jts.geom.impl.PackedCoordinateSequence; import org.opentripplanner.framework.geometry.CompactLineStringUtils; @@ -979,9 +981,9 @@ static int defaultMillimeterLength(LineString geometry) { private State makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching( State s0, - String network + String network, + RoutingPreferences preferences ) { - var preferences = s0.getRequest().preferences(); var edit = doTraverse(s0, TraverseMode.WALK, false); if (edit != null) { edit.dropFloatingVehicle(s0.vehicleRentalFormFactor(), network, s0.getRequest().arriveBy()); @@ -990,9 +992,17 @@ private State makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching( } State state = edit.makeState(); if (state != null && network != null) { - var allowedNetworks = preferences.rental(state.currentMode()).allowedNetworks(); - if (!allowedNetworks.contains(network)) { - return null; + var rentalPreferences = preferences.rental(state.currentMode()); + var allowedNetworks = rentalPreferences.allowedNetworks(); + var bannedNetworks = rentalPreferences.bannedNetworks(); + if (allowedNetworks.isEmpty()) { + if (bannedNetworks.contains(network)) { + return null; + } + } else { + if (!allowedNetworks.contains(network)) { + return null; + } } } return state; @@ -1011,11 +1021,12 @@ private State makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching( * zone applies to where we pick up a vehicle with a specific network. */ private State[] splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching(State s0) { + var preferences = s0.getRequest().preferences(); var states = tov .rentalRestrictions() .noDropOffNetworks() .stream() - .map(network -> makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, network)) + .map(network -> makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, network, preferences)) .filter(Objects::nonNull) .toList(); var statesStream = states.stream(); @@ -1025,7 +1036,7 @@ private State[] splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching(St // you have to check in the rental edge if this has search has been started in a no-drop off zone statesStream = Stream.concat( - Stream.of(makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, null)), + Stream.of(makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, null, preferences)), statesStream ); } diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java index f271317f03f..31a6c3bc369 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java @@ -13,6 +13,8 @@ import static org.opentripplanner.street.search.state.VehicleRentalState.HAVE_RENTED; import static org.opentripplanner.street.search.state.VehicleRentalState.RENTING_FLOATING; +import java.util.Arrays; +import java.util.Collections; import java.util.Set; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; @@ -213,14 +215,7 @@ public void backwardsDontEnterNoTraversalZone() { public void pickupFloatingVehicleWhenLeavingAZone() { var req = defaultArriveByRequest(); - // this is the state that starts inside a restricted zone (no drop off, no traversal or outside business area) - // and is walking towards finding a rental vehicle - var haveRentedState = State - .getInitialStates(Set.of(V2), req) - .stream() - .filter(s -> s.getVehicleRentalState() == HAVE_RENTED) - .findAny() - .get(); + var haveRentedState = makeHaveRentedState(V2, req); var edge = streetEdge(V1, V2); V2.addRentalRestriction(NO_TRAVERSAL); @@ -244,14 +239,7 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { V2.addRentalRestriction(NO_DROP_OFF_TIER); V2.addRentalRestriction(noDropOffRestriction(NETWORK_BIRD)); - // this is the state that starts inside a no drop off - // and is walking towards finding a rental vehicle - var haveRentedState = State - .getInitialStates(Set.of(V2), req) - .stream() - .filter(s -> s.getVehicleRentalState() == HAVE_RENTED) - .findAny() - .get(); + var haveRentedState = makeHaveRentedState(V2, req); var edge = streetEdge(V1, V2); @@ -294,6 +282,134 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { */ } + @Test + public void pickupFloatingVehiclesWhenStartedInNoDropOffZoneAllNetworksAllowedByDefault() { + var states = runTraverse(Collections.emptySet(), Collections.emptySet()); + + // Walking, unknown, Tier, Bird. (Order of last two not guaranteed) + assertEquals(4, states.length); + final State walkState = states[0]; + assertEquals(HAVE_RENTED, walkState.getVehicleRentalState()); + assertEquals(WALK, walkState.currentMode()); + + final State unknownNetworkState = states[1]; + assertEquals(RENTING_FLOATING, unknownNetworkState.getVehicleRentalState()); + assertEquals(BICYCLE, unknownNetworkState.currentMode()); + assertNull(unknownNetworkState.getVehicleRentalNetwork()); + + final State tierState = Arrays.stream(states).filter(s -> NETWORK_TIER.equals(s.getVehicleRentalNetwork())).findFirst().get(); + assertEquals(RENTING_FLOATING, tierState.getVehicleRentalState()); + assertEquals(BICYCLE, tierState.currentMode()); + + final State birdState = Arrays.stream(states).filter(s -> NETWORK_BIRD.equals(s.getVehicleRentalNetwork())).findFirst().get(); + assertEquals(RENTING_FLOATING, birdState.getVehicleRentalState()); + assertEquals(BICYCLE, birdState.currentMode()); + } + + @Test + public void pickupFloatingVehiclesWhenStartedInNoDropOffZoneAllNetworksAllowed() { + var states = runTraverse(Set.of(NETWORK_TIER, NETWORK_BIRD), Collections.emptySet()); + + // Walking, unknown, Tier, Bird. (Order of last two not guaranteed) + assertEquals(4, states.length); + final State walkState = states[0]; + assertEquals(HAVE_RENTED, walkState.getVehicleRentalState()); + assertEquals(WALK, walkState.currentMode()); + + final State unknownNetworkState = states[1]; + assertEquals(RENTING_FLOATING, unknownNetworkState.getVehicleRentalState()); + assertEquals(BICYCLE, unknownNetworkState.currentMode()); + assertNull(unknownNetworkState.getVehicleRentalNetwork()); + + final State tierState = Arrays.stream(states).filter(s -> NETWORK_TIER.equals(s.getVehicleRentalNetwork())).findFirst().get(); + assertEquals(RENTING_FLOATING, tierState.getVehicleRentalState()); + assertEquals(BICYCLE, tierState.currentMode()); + + final State birdState = Arrays.stream(states).filter(s -> NETWORK_BIRD.equals(s.getVehicleRentalNetwork())).findFirst().get(); + assertEquals(RENTING_FLOATING, birdState.getVehicleRentalState()); + assertEquals(BICYCLE, birdState.currentMode()); + } + + @Test + public void pickupFloatingVehiclesWhenStartedInNoDropOffZoneSomeNetworksAllowed() { + var states = runTraverse(Set.of(NETWORK_TIER), Collections.emptySet()); + + // Walking, unknown, Tier. + assertEquals(3, states.length); + final State walkState = states[0]; + assertEquals(HAVE_RENTED, walkState.getVehicleRentalState()); + assertEquals(WALK, walkState.currentMode()); + + final State unknownNetworkState = states[1]; + assertEquals(RENTING_FLOATING, unknownNetworkState.getVehicleRentalState()); + assertEquals(BICYCLE, unknownNetworkState.currentMode()); + assertNull(unknownNetworkState.getVehicleRentalNetwork()); + + final State tierState = states[2]; + assertEquals(RENTING_FLOATING, tierState.getVehicleRentalState()); + assertEquals(BICYCLE, tierState.currentMode()); + assertEquals(NETWORK_TIER, tierState.getVehicleRentalNetwork()); + } + + @Test + public void pickupFloatingVehiclesWhenStartedInNoDropOffZoneAllNetworksBanned() { + var states = runTraverse(Collections.emptySet(), Set.of(NETWORK_TIER, NETWORK_BIRD)); + + // Should only have a walking state. The unknown network state should only be + // generated if there are known network states. + assertEquals(1, states.length); + final State walkState = states[0]; + assertEquals(HAVE_RENTED, walkState.getVehicleRentalState()); + assertEquals(WALK, walkState.currentMode()); + } + + @Test + public void pickupFloatingVehiclesWhenStartedInNoDropOffZoneSomeNetworksBanned() { + var states = runTraverse(Collections.emptySet(), Set.of(NETWORK_BIRD)); + + // Walking state, unknown network state, known network state for Tier (which wasn't banned) + assertEquals(3, states.length); + + final State walkState = states[0]; + assertEquals(HAVE_RENTED, walkState.getVehicleRentalState()); + assertEquals(WALK, walkState.currentMode()); + + final State unknownNetworkState = states[1]; + assertEquals(RENTING_FLOATING, unknownNetworkState.getVehicleRentalState()); + assertEquals(BICYCLE, unknownNetworkState.currentMode()); + assertNull(unknownNetworkState.getVehicleRentalNetwork()); + + final State tierState = states[2]; + assertEquals(RENTING_FLOATING, tierState.getVehicleRentalState()); + assertEquals(BICYCLE, tierState.currentMode()); + assertEquals(NETWORK_TIER, tierState.getVehicleRentalNetwork()); + } + + private State[] runTraverse(Set allowedNetworks, Set bannedNetworks) { + var req = makeArriveByRequest(allowedNetworks, bannedNetworks); + + V2.addRentalRestriction(NO_DROP_OFF_TIER); + V2.addRentalRestriction(noDropOffRestriction(NETWORK_BIRD)); + + var haveRentedState = makeHaveRentedState(V2, req); + + var edge = streetEdge(V1, V2); + + return edge.traverse(haveRentedState); + } + + private static State makeHaveRentedState(Vertex vertex, StreetSearchRequest req) { + // this is the state that starts inside a restricted zone + // (no drop off, no traversal or outside business area) + // and is walking towards finding a rental vehicle + return State + .getInitialStates(Set.of(vertex), req) + .stream() + .filter(s -> s.getVehicleRentalState() == HAVE_RENTED) + .findAny() + .get(); + } + private static StreetSearchRequest defaultArriveByRequest() { return StreetSearchRequest .of() @@ -304,6 +420,17 @@ private static StreetSearchRequest defaultArriveByRequest() { .withArriveBy(true) .build(); } + + private static StreetSearchRequest makeArriveByRequest(Set allowedNetworks, Set bannedNetworks) { + return StreetSearchRequest + .of() + .withPreferences(p -> + p.withBike(b -> b.withRental(r -> r.withAllowedNetworks(allowedNetworks).withBannedNetworks(bannedNetworks))) + ) + .withMode(StreetMode.SCOOTER_RENTAL) + .withArriveBy(true) + .build(); + } } private static GeofencingZoneExtension noDropOffRestriction(String networkTier) { From 36bbe816c4f909118e4b509b93f2b2ad730fcdb7 Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Wed, 20 Nov 2024 12:24:09 +0200 Subject: [PATCH 113/169] add javadoc for makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching --- .../opentripplanner/street/model/edge/StreetEdge.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java index 1c017a21063..6ec8df555f5 100644 --- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java +++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java @@ -979,6 +979,16 @@ static int defaultMillimeterLength(LineString geometry) { return (int) (SphericalDistanceLibrary.length(geometry) * 1000); } + /** + * Helper method for {@link #splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching}. + * Create a single new state, exiting a no-drop-off zone, in reverse, and continuing + * on a rental vehicle in the named network, or an unknown network if network is null, + * unless the named network is not accepted by the {@link RoutingPreferences} given. + * @param s0 The parent state (i.e. the following state, as we are in reverse) + * @param network Network name, or null if unknown + * @param preferences Active {@link RoutingPreferences} + * @return Newly generated {@link State}, or null if the state would have been forbidden. + */ private State makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching( State s0, String network, From 42c318f2b2426508cfba7eef6a80bf6d320ab52f Mon Sep 17 00:00:00 2001 From: sharhio Date: Wed, 20 Nov 2024 12:37:07 +0200 Subject: [PATCH 114/169] rename and refactor --- .../SmooveBikeRentalDataSourceTest.java | 6 ++--- .../SmooveBikeRentalDataSourceParameters.java | 9 ++++--- .../VehicleRentalServiceDirectoryFetcher.java | 6 ++--- .../sources/VehicleRentalSourceFactory.java | 17 ++++++------ .../GbfsVehicleRentalDataSource.java | 7 +++-- ...GbfsVehicleRentalDataSourceParameters.java | 13 ++++----- ...dRentalType.java => RentalPickupType.java} | 16 +++++++---- .../VehicleRentalDataSourceParameters.java | 2 +- .../VehicleRentalUpdaterTest.java | 4 +-- .../GbfsVehicleRentalDataSourceTest.java | 8 +++--- doc/user/UpdaterConfig.md | 27 +++++++++---------- 11 files changed, 59 insertions(+), 56 deletions(-) rename application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/{AllowedRentalType.java => RentalPickupType.java} (63%) diff --git a/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java b/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java index d080cf584f9..84161c00484 100644 --- a/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java +++ b/application/src/ext-test/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceTest.java @@ -7,7 +7,7 @@ import java.util.List; import org.junit.jupiter.api.Test; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; -import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; +import org.opentripplanner.updater.vehicle_rental.datasources.params.RentalPickupType; import org.opentripplanner.updater.spi.HttpHeaders; class SmooveBikeRentalDataSourceTest { @@ -20,7 +20,7 @@ void makeStation() { null, true, HttpHeaders.empty(), - AllowedRentalType.ALL + RentalPickupType.ALL ) ); assertTrue(source.update()); @@ -87,7 +87,7 @@ void makeStationWithoutOverloading() { null, false, HttpHeaders.empty(), - AllowedRentalType.ALL + RentalPickupType.ALL ) ); assertTrue(source.update()); diff --git a/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java b/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java index 35e5557a49b..a04ea004bf0 100644 --- a/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java +++ b/application/src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSourceParameters.java @@ -1,7 +1,8 @@ package org.opentripplanner.ext.smoovebikerental; +import java.util.Set; import javax.annotation.Nullable; -import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; +import org.opentripplanner.updater.vehicle_rental.datasources.params.RentalPickupType; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; import org.opentripplanner.updater.vehicle_rental.datasources.params.VehicleRentalDataSourceParameters; @@ -14,7 +15,7 @@ public record SmooveBikeRentalDataSourceParameters( String network, boolean overloadingAllowed, HttpHeaders httpHeaders, - AllowedRentalType allowedRentalType + Set rentalPickupTypes ) implements VehicleRentalDataSourceParameters { /** @@ -33,7 +34,7 @@ public VehicleRentalSourceType sourceType() { } @Override - public boolean allowRentalType(AllowedRentalType rentalType) { - return allowedRentalType == null || allowedRentalType == AllowedRentalType.ALL || rentalType == allowedRentalType; + public boolean allowRentalType(RentalPickupType rentalPickupType) { + return rentalPickupTypes.contains(rentalPickupType); } } diff --git a/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java b/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java index bf846238eed..dc0fa2868ec 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java +++ b/application/src/ext/java/org/opentripplanner/ext/vehiclerentalservicedirectory/VehicleRentalServiceDirectoryFetcher.java @@ -18,7 +18,7 @@ import org.opentripplanner.updater.spi.GraphUpdater; import org.opentripplanner.updater.vehicle_rental.VehicleRentalUpdater; import org.opentripplanner.updater.vehicle_rental.datasources.VehicleRentalDataSourceFactory; -import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; +import org.opentripplanner.updater.vehicle_rental.datasources.params.RentalPickupType; import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -112,8 +112,8 @@ private static List buildListOfNetworksFr networkParams.geofencingZones(), // overloadingAllowed - not part of GBFS, not supported here false, - // allowedRentalType not supported - AllowedRentalType.ALL + // rentalPickupType not supported + RentalPickupType.ALL ) ); } else { diff --git a/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java b/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java index a3819053d62..e58b5e96ae8 100644 --- a/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java +++ b/application/src/main/java/org/opentripplanner/standalone/config/routerconfig/updaters/sources/VehicleRentalSourceFactory.java @@ -7,13 +7,14 @@ import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V2_3; import static org.opentripplanner.standalone.config.framework.json.OtpVersion.V2_7; +import java.util.Set; import org.opentripplanner.ext.smoovebikerental.SmooveBikeRentalDataSourceParameters; import org.opentripplanner.standalone.config.framework.json.NodeAdapter; import org.opentripplanner.standalone.config.routerconfig.updaters.HttpHeadersConfig; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; -import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters; +import org.opentripplanner.updater.vehicle_rental.datasources.params.RentalPickupType; import org.opentripplanner.updater.vehicle_rental.datasources.params.VehicleRentalDataSourceParameters; /** @@ -47,14 +48,14 @@ public VehicleRentalDataSourceParameters create() { network(), geofencingZones(), overloadingAllowed(), - allowedRentalType() + rentalPickupTypes() ); case SMOOVE -> new SmooveBikeRentalDataSourceParameters( url(), network(), overloadingAllowed(), headers(), - allowedRentalType() + rentalPickupTypes() ); }; } @@ -127,12 +128,12 @@ private boolean geofencingZones() { .asBoolean(false); } - private AllowedRentalType allowedRentalType() { + private Set rentalPickupTypes() { return c - .of("allowedRentalType") + .of("rentalPickupTypes") .since(V2_7) - .summary(AllowedRentalType.ALL.typeDescription()) - .description(docEnumValueList(AllowedRentalType.values())) - .asEnum(AllowedRentalType.ALL); + .summary(RentalPickupType.STATION.typeDescription()) + .description(docEnumValueList(RentalPickupType.values())) + .asEnumSet(RentalPickupType.class, RentalPickupType.ALL); } } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java index 70840249066..12db43b418d 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSource.java @@ -22,8 +22,8 @@ import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalSystem; -import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters; +import org.opentripplanner.updater.vehicle_rental.datasources.params.RentalPickupType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -76,8 +76,7 @@ public List getUpdates() { final Map vehicleTypes = getVehicleTypes(system); List stations = new LinkedList<>(); - - if (params.allowRentalType(AllowedRentalType.STATIONS)) { + if (params.allowRentalType(RentalPickupType.STATION)) { // Both station information and status are required for all systems using stations GBFSStationInformation stationInformation = loader.getFeed(GBFSStationInformation.class); GBFSStationStatus stationStatus = loader.getFeed(GBFSStationStatus.class); @@ -114,7 +113,7 @@ public List getUpdates() { } // Append the floating bike stations. - if (OTPFeature.FloatingBike.isOn() && params.allowRentalType(AllowedRentalType.VEHICLES)) { + if (OTPFeature.FloatingBike.isOn() && params.allowRentalType(RentalPickupType.FREE_FLOATING)) { GBFSFreeBikeStatus freeBikeStatus = loader.getFeed(GBFSFreeBikeStatus.class); if (freeBikeStatus != null) { GbfsFreeVehicleStatusMapper freeVehicleStatusMapper = new GbfsFreeVehicleStatusMapper( diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java index 75a6aad0959..31c81079046 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/GbfsVehicleRentalDataSourceParameters.java @@ -1,6 +1,7 @@ package org.opentripplanner.updater.vehicle_rental.datasources.params; import java.util.Objects; +import java.util.Set; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.VehicleRentalSourceType; @@ -12,11 +13,11 @@ public record GbfsVehicleRentalDataSourceParameters( String network, boolean geofencingZones, boolean overloadingAllowed, - AllowedRentalType allowedRentalType + Set rentalPickupTypes ) implements VehicleRentalDataSourceParameters { public GbfsVehicleRentalDataSourceParameters { - Objects.requireNonNull(allowedRentalType); + Objects.requireNonNull(rentalPickupTypes); } @Override public VehicleRentalSourceType sourceType() { @@ -24,11 +25,7 @@ public VehicleRentalSourceType sourceType() { } @Override - public boolean allowRentalType(AllowedRentalType rentalType) { - return ( - allowedRentalType == null || - allowedRentalType == AllowedRentalType.ALL || - allowedRentalType == rentalType - ); + public boolean allowRentalType(RentalPickupType rentalPickupType) { + return rentalPickupTypes.contains(rentalPickupType); } } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/RentalPickupType.java similarity index 63% rename from application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java rename to application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/RentalPickupType.java index ea901be4948..c601b2845de 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/AllowedRentalType.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/RentalPickupType.java @@ -1,5 +1,8 @@ package org.opentripplanner.updater.vehicle_rental.datasources.params; +import java.util.Collections; +import java.util.EnumSet; +import java.util.Set; import org.opentripplanner.framework.doc.DocumentedEnum; /** @@ -7,14 +10,17 @@ * * Enum to specify the type of rental data that is allowed to be read from the data source. */ -public enum AllowedRentalType implements DocumentedEnum { - STATIONS("Only station data is allowed."), - VEHICLES("Only vehicle data is allowed."), - ALL("All types of rental data are allowed."); +public enum RentalPickupType implements DocumentedEnum { + STATION("Only station data is allowed."), + FREE_FLOATING("Only vehicle data is allowed."); + + public static final Set ALL = Collections.unmodifiableSet( + EnumSet.allOf(RentalPickupType.class) + ); private final String description; - AllowedRentalType(String description) { + RentalPickupType(String description) { this.description = description.stripIndent().trim(); } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java index 88af23ac1e6..e87e7909bc5 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/VehicleRentalDataSourceParameters.java @@ -14,5 +14,5 @@ public interface VehicleRentalDataSourceParameters { HttpHeaders httpHeaders(); - boolean allowRentalType(AllowedRentalType rentalType); + boolean allowRentalType(RentalPickupType rentalPickupType); } diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java index eca1f78d059..f48faef3180 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/VehicleRentalUpdaterTest.java @@ -20,7 +20,7 @@ import org.opentripplanner.updater.GraphWriterRunnable; import org.opentripplanner.updater.spi.HttpHeaders; import org.opentripplanner.updater.vehicle_rental.datasources.VehicleRentalDatasource; -import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; +import org.opentripplanner.updater.vehicle_rental.datasources.params.RentalPickupType; import org.opentripplanner.updater.vehicle_rental.datasources.params.VehicleRentalDataSourceParameters; class VehicleRentalUpdaterTest { @@ -106,7 +106,7 @@ public HttpHeaders httpHeaders() { } @Override - public boolean allowRentalType(AllowedRentalType rentalType) { + public boolean allowRentalType(RentalPickupType rentalPickupType) { return true; } } diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java index acc987d6786..b238b22f305 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsVehicleRentalDataSourceTest.java @@ -15,8 +15,8 @@ import org.opentripplanner.service.vehiclerental.model.RentalVehicleType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.updater.spi.HttpHeaders; -import org.opentripplanner.updater.vehicle_rental.datasources.params.AllowedRentalType; import org.opentripplanner.updater.vehicle_rental.datasources.params.GbfsVehicleRentalDataSourceParameters; +import org.opentripplanner.updater.vehicle_rental.datasources.params.RentalPickupType; /** * This tests the mapping between data coming from a {@link GbfsFeedLoader} to OTP station models. @@ -34,7 +34,7 @@ void makeStationFromV22() { null, false, false, - AllowedRentalType.ALL + RentalPickupType.ALL ), new OtpHttpClientFactory() ); @@ -126,7 +126,7 @@ void geofencing() { null, true, false, - AllowedRentalType.ALL + RentalPickupType.ALL ), new OtpHttpClientFactory() ); @@ -169,7 +169,7 @@ void makeStationFromV10() { network, false, true, - AllowedRentalType.ALL + RentalPickupType.ALL ), new OtpHttpClientFactory() ); diff --git a/doc/user/UpdaterConfig.md b/doc/user/UpdaterConfig.md index cdda5371d3d..8336d6e2f7d 100644 --- a/doc/user/UpdaterConfig.md +++ b/doc/user/UpdaterConfig.md @@ -317,7 +317,6 @@ GBFS form factors: |---------------------------------------------------------------------------------------|:---------------:|----------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------:|---------------|:-----:| | type = "vehicle-rental" | `enum` | The type of the updater. | *Required* | | 1.5 | | [allowKeepingRentedVehicleAtDestination](#u_1_allowKeepingRentedVehicleAtDestination) | `boolean` | If a vehicle should be allowed to be kept at the end of a station-based rental. | *Optional* | `false` | 2.1 | -| [allowedRentalType](#u_1_allowedRentalType) | `enum` | This is temporary and will be removed in a future version of OTP. Use this to specify the type of rental data that is allowed to be read from the data source. | *Optional* | `"all"` | 2.7 | | frequency | `duration` | How often the data should be updated. | *Optional* | `"PT1M"` | 1.5 | | [geofencingZones](#u_1_geofencingZones) | `boolean` | Compute rental restrictions based on GBFS 2.2 geofencing zones. | *Optional* | `false` | 2.3 | | language | `string` | TODO | *Optional* | | 2.1 | @@ -326,6 +325,7 @@ GBFS form factors: | [sourceType](#u_1_sourceType) | `enum` | What source of vehicle rental updater to use. | *Required* | | 1.5 | | url | `string` | The URL to download the data from. | *Required* | | 1.5 | | [headers](#u_1_headers) | `map of string` | HTTP headers to add to the request. Any header key, value can be inserted. | *Optional* | | 1.5 | +| [rentalPickupTypes](#u_1_rentalPickupTypes) | `enum set` | This is temporary and will be removed in a future version of OTP. Use this to specify the type of rental data that is allowed to be read from the data source. | *Optional* | | 2.7 | ##### Parameter details @@ -347,19 +347,6 @@ For this to be possible three things need to be configured: - If keeping the vehicle at the destination should be discouraged, then `keepingRentedVehicleAtDestinationCost` (default: 0) may also be set in the routing defaults. -

allowedRentalType

- -**Since version:** `2.7` ∙ **Type:** `enum` ∙ **Cardinality:** `Optional` ∙ **Default value:** `"all"` -**Path:** /updaters/[1] -**Enum values:** `stations` | `vehicles` | `all` - -This is temporary and will be removed in a future version of OTP. Use this to specify the type of rental data that is allowed to be read from the data source. - - - `stations` Only station data is allowed. - - `vehicles` Only vehicle data is allowed. - - `all` All types of rental data are allowed. - -

geofencingZones

**Since version:** `2.3` ∙ **Type:** `boolean` ∙ **Cardinality:** `Optional` ∙ **Default value:** `false` @@ -397,6 +384,18 @@ What source of vehicle rental updater to use. HTTP headers to add to the request. Any header key, value can be inserted. +

rentalPickupTypes

+ +**Since version:** `2.7` ∙ **Type:** `enum set` ∙ **Cardinality:** `Optional` +**Path:** /updaters/[1] +**Enum values:** `station` | `free-floating` + +This is temporary and will be removed in a future version of OTP. Use this to specify the type of rental data that is allowed to be read from the data source. + + - `station` Only station data is allowed. + - `free-floating` Only vehicle data is allowed. + + ##### Example configuration From dd363aab68cacb173a5ada49a4bd888c19af329b Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 20 Nov 2024 11:56:00 +0100 Subject: [PATCH 115/169] Apply review feedback about collection types --- .../parkAndRideApi/ParkAndRideResource.java | 3 +- .../ext/restapi/model/ApiRouterInfo.java | 6 +-- .../VehicleParkingGroupsLayerBuilder.java | 2 +- .../VehicleParkingsLayerBuilder.java | 2 +- .../apis/gtfs/datafetchers/QueryTypeImpl.java | 30 +++++++++----- .../transmodel/TransmodelGraphQLSchema.java | 6 ++- .../VehicleParkingRepository.java | 3 +- .../vehicleparking/VehicleParkingService.java | 12 +++--- .../DefaultVehicleParkingRepository.java | 5 +-- .../DefaultVehicleParkingService.java | 28 ++++++++----- .../VehicleParkingAvailabilityUpdater.java | 3 +- .../module/VehicleParkingLinkingTest.java | 2 +- .../module/osm/OsmModuleTest.java | 6 +-- ...VehicleParkingAvailabilityUpdaterTest.java | 6 +-- .../VehicleParkingUpdaterTest.java | 40 +++++++++---------- 15 files changed, 84 insertions(+), 70 deletions(-) diff --git a/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java b/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java index cf86f803aba..747ba0617ec 100644 --- a/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java +++ b/application/src/ext/java/org/opentripplanner/ext/parkAndRideApi/ParkAndRideResource.java @@ -73,7 +73,8 @@ public Response getParkAndRide( } var prs = vehicleParkingService - .getCarParks() + .listCarParks() + .stream() .filter(lot -> envelope.contains(lot.getCoordinate().asJtsCoordinate())) .filter(lot -> hasTransitStopsNearby(maxTransitDistance, lot)) .map(ParkAndRideInfo::ofVehicleParking) diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java index ba5dd39ea59..4ebce8c33d6 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/model/ApiRouterInfo.java @@ -66,21 +66,21 @@ public boolean mapHasBikePark(VehicleParkingService service) { if (service == null) { return false; } - return service.getBikeParks().findAny().isPresent(); + return service.listBikeParks().stream().findAny().isPresent(); } public boolean mapHasCarPark(VehicleParkingService service) { if (service == null) { return false; } - return service.getCarParks().findAny().isPresent(); + return service.listCarParks().stream().findAny().isPresent(); } public boolean mapHasVehicleParking(VehicleParkingService service) { if (service == null) { return false; } - return service.getVehicleParkings().findAny().isPresent(); + return service.listVehicleParkings().stream().findAny().isPresent(); } public double getLowerLeftLatitude() { diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java index 6df19d61a8a..36217e05972 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingGroupsLayerBuilder.java @@ -39,7 +39,7 @@ public VehicleParkingGroupsLayerBuilder( @Override protected List getGeometries(Envelope query) { return service - .getVehicleParkingGroups() + .listVehicleParkingGroups() .asMap() .entrySet() .stream() diff --git a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java index 40d9c97e4d7..22fb75f7b49 100644 --- a/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java +++ b/application/src/ext/java/org/opentripplanner/ext/vectortiles/layers/vehicleparkings/VehicleParkingsLayerBuilder.java @@ -46,7 +46,7 @@ public VehicleParkingsLayerBuilder( @Override protected List getGeometries(Envelope query) { return service - .getVehicleParkings() + .listVehicleParkings().stream() .map(vehicleParking -> { Coordinate coordinate = vehicleParking.getCoordinate().asJtsCoordinate(); Point point = GeometryUtils.getGeometryFactory().createPoint(coordinate); diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java index 4f1400ab110..49d04f98076 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/QueryTypeImpl.java @@ -123,7 +123,8 @@ public DataFetcher bikePark() { .vehicleParkingService(); return vehicleParkingService - .getBikeParks() + .listBikeParks() + .stream() .filter(bikePark -> bikePark.getId().getId().equals(args.getGraphQLId())) .findAny() .orElse(null); @@ -137,7 +138,7 @@ public DataFetcher> bikeParks() { .getContext() .vehicleParkingService(); - return vehicleParkingService.getBikeParks().toList(); + return vehicleParkingService.listBikeParks().stream().toList(); }; } @@ -210,7 +211,8 @@ public DataFetcher carPark() { .vehicleParkingService(); return vehicleParkingService - .getCarParks() + .listCarParks() + .stream() .filter(carPark -> carPark.getId().getId().equals(args.getGraphQLId())) .findAny() .orElse(null); @@ -231,14 +233,15 @@ public DataFetcher> carParks() { if (!idList.isEmpty()) { Map carParkMap = vehicleParkingService - .getCarParks() + .listCarParks() + .stream() .collect(Collectors.toMap(station -> station.getId().getId(), station -> station)); return idList.stream().map(carParkMap::get).toList(); } } - return vehicleParkingService.getCarParks().toList(); + return vehicleParkingService.listCarParks(); }; } @@ -400,7 +403,8 @@ public DataFetcher node() { return vehicleParkingService == null ? null : vehicleParkingService - .getBikeParks() + .listBikeParks() + .stream() .filter(bikePark -> bikePark.getId().equals(bikeParkId)) .findAny() .orElse(null); @@ -421,7 +425,8 @@ public DataFetcher node() { return vehicleParkingService == null ? null : vehicleParkingService - .getCarParks() + .listCarParks() + .stream() .filter(carPark -> carPark.getId().equals(carParkId)) .findAny() .orElse(null); @@ -472,7 +477,8 @@ public DataFetcher node() { return vehicleParkingService == null ? null : vehicleParkingService - .getVehicleParkings() + .listVehicleParkings() + .stream() .filter(bikePark -> bikePark.getId().equals(vehicleParkingId)) .findAny() .orElse(null); @@ -836,7 +842,8 @@ public DataFetcher vehicleParking() { var vehicleParkingId = FeedScopedId.parse(args.getGraphQLId()); return vehicleParkingService - .getVehicleParkings() + .listVehicleParkings() + .stream() .filter(vehicleParking -> vehicleParking.getId().equals(vehicleParkingId)) .findAny() .orElse(null); @@ -857,14 +864,15 @@ public DataFetcher> vehicleParkings() { if (!idList.isEmpty()) { Map vehicleParkingMap = vehicleParkingService - .getVehicleParkings() + .listVehicleParkings() + .stream() .collect(Collectors.toMap(station -> station.getId().toString(), station -> station)); return idList.stream().map(vehicleParkingMap::get).toList(); } } - return vehicleParkingService.getVehicleParkings().toList(); + return vehicleParkingService.listVehicleParkings(); }; } diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java b/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java index 2ffb9941bc6..33fd2b9a72f 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java @@ -1450,7 +1450,8 @@ private GraphQLSchema create() { var bikeParkId = TransitIdMapper.mapIDToDomain(environment.getArgument("id")); return GqlUtil .getVehicleParkingService(environment) - .getBikeParks() + .listBikeParks() + .stream() .filter(bikePark -> bikePark.getId().equals(bikeParkId)) .findFirst() .orElse(null); @@ -1467,7 +1468,8 @@ private GraphQLSchema create() { .dataFetcher(environment -> GqlUtil .getVehicleParkingService(environment) - .getBikeParks() + .listBikeParks() + .stream() .collect(Collectors.toCollection(ArrayList::new)) ) .build() diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java index cdb6f195f10..ae4094d904e 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java @@ -2,7 +2,6 @@ import com.google.common.collect.ImmutableListMultimap; import java.util.Collection; -import java.util.stream.Stream; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; @@ -14,7 +13,7 @@ void updateVehicleParking( Collection parkingToAdd, Collection parkingToRemove ); - Stream getVehicleParkings(); + Collection listVehicleParkings(); ImmutableListMultimap getVehicleParkingGroups(); } diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java index 3ca13165a05..4603367979e 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingService.java @@ -1,7 +1,7 @@ package org.opentripplanner.service.vehicleparking; -import com.google.common.collect.ImmutableListMultimap; -import java.util.stream.Stream; +import com.google.common.collect.ListMultimap; +import java.util.Collection; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; @@ -11,13 +11,13 @@ * For writing data see {@link VehicleParkingRepository} */ public interface VehicleParkingService { - Stream getBikeParks(); + Collection listBikeParks(); - Stream getCarParks(); + Collection listCarParks(); - Stream getVehicleParkings(); + Collection listVehicleParkings(); - ImmutableListMultimap getVehicleParkingGroups(); + ListMultimap listVehicleParkingGroups(); boolean hasBikeParking(); diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java index 660b539052e..e0714e74ee8 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java @@ -8,7 +8,6 @@ import java.util.Collection; import java.util.HashSet; import java.util.Set; -import java.util.stream.Stream; import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; @@ -67,8 +66,8 @@ public void updateVehicleParking( } @Override - public Stream getVehicleParkings() { - return vehicleParkings.stream(); + public Collection listVehicleParkings() { + return Set.copyOf(vehicleParkings); } @Override diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java index 04ff1558347..cb4f6680b82 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java @@ -4,7 +4,7 @@ import jakarta.inject.Inject; import jakarta.inject.Singleton; import java.io.Serializable; -import java.util.stream.Stream; +import java.util.Collection; import org.opentripplanner.service.vehicleparking.VehicleParkingRepository; import org.opentripplanner.service.vehicleparking.VehicleParkingService; import org.opentripplanner.service.vehicleparking.model.VehicleParking; @@ -29,32 +29,40 @@ public DefaultVehicleParkingService(VehicleParkingRepository repository) { } @Override - public Stream getBikeParks() { - return repository.getVehicleParkings().filter(VehicleParking::hasBicyclePlaces); + public Collection listBikeParks() { + return repository + .listVehicleParkings() + .stream() + .filter(VehicleParking::hasBicyclePlaces) + .toList(); } @Override - public Stream getCarParks() { - return repository.getVehicleParkings().filter(VehicleParking::hasAnyCarPlaces); + public Collection listCarParks() { + return repository + .listVehicleParkings() + .stream() + .filter(VehicleParking::hasAnyCarPlaces) + .toList(); } @Override - public Stream getVehicleParkings() { - return repository.getVehicleParkings(); + public Collection listVehicleParkings() { + return repository.listVehicleParkings(); } @Override - public ImmutableListMultimap getVehicleParkingGroups() { + public ImmutableListMultimap listVehicleParkingGroups() { return repository.getVehicleParkingGroups(); } @Override public boolean hasBikeParking() { - return repository.getVehicleParkings().anyMatch(VehicleParking::hasBicyclePlaces); + return repository.listVehicleParkings().stream().anyMatch(VehicleParking::hasBicyclePlaces); } @Override public boolean hasCarParking() { - return repository.getVehicleParkings().anyMatch(VehicleParking::hasAnyCarPlaces); + return repository.listVehicleParkings().stream().anyMatch(VehicleParking::hasAnyCarPlaces); } } diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java index c4de4de23a1..e548d5d75be 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdater.java @@ -67,7 +67,8 @@ private AvailabilityUpdater(List updates) { this.updates = List.copyOf(updates); this.parkingById = repository - .getVehicleParkings() + .listVehicleParkings() + .stream() .collect(Collectors.toUnmodifiableMap(VehicleParking::getId, Function.identity())); } diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java index 02795b45042..4f0a20bfb7f 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/VehicleParkingLinkingTest.java @@ -184,6 +184,6 @@ public void removeVehicleParkingWithOneEntranceAndNonExistingVertexTest() { assertEquals(0, graph.getEdgesOfType(StreetVehicleParkingLink.class).size()); assertEquals(0, graph.getEdgesOfType(StreetVehicleParkingLink.class).size()); - assertEquals(0, vehicleParkingService.getVehicleParkings().count()); + assertEquals(0, vehicleParkingService.listVehicleParkings().size()); } } diff --git a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java index 3c391a57246..833b14ade9d 100644 --- a/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java +++ b/application/src/test/java/org/opentripplanner/graph_builder/module/osm/OsmModuleTest.java @@ -286,9 +286,9 @@ public void testLocalizedString() { void addParkingLotsToService() { var service = new DefaultVehicleParkingService(buildParkingLots().repository); - assertEquals(11, service.getVehicleParkings().count()); - assertEquals(6, service.getBikeParks().count()); - assertEquals(5, service.getCarParks().count()); + assertEquals(11, service.listVehicleParkings().size()); + assertEquals(6, service.listBikeParks().size()); + assertEquals(5, service.listCarParks().size()); } @Test diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java index 26e8403abe9..ecf7904de4a 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingAvailabilityUpdaterTest.java @@ -56,7 +56,7 @@ void updateCarAvailability() { runUpdaterOnce(updater); - var updated = service.getVehicleParkings().toList().getFirst(); + var updated = List.copyOf(service.listVehicleParkings()).getFirst(); assertEquals(ID, updated.getId()); assertEquals(8, updated.getAvailability().getCarSpaces()); assertNull(updated.getAvailability().getBicycleSpaces()); @@ -73,7 +73,7 @@ void updateBicycleAvailability() { runUpdaterOnce(updater); - var updated = service.getVehicleParkings().toList().getFirst(); + var updated = List.copyOf(service.listVehicleParkings()).getFirst(); assertEquals(ID, updated.getId()); assertEquals(8, updated.getAvailability().getBicycleSpaces()); assertNull(updated.getAvailability().getCarSpaces()); @@ -90,7 +90,7 @@ void notFound() { runUpdaterOnce(updater); - var updated = service.getVehicleParkings().toList().getFirst(); + var updated = List.copyOf(service.listVehicleParkings()).getFirst(); assertEquals(ID, updated.getId()); assertNull(updated.getAvailability()); } diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java index dbabc3dd89c..261cd55011d 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_parking/VehicleParkingUpdaterTest.java @@ -33,7 +33,6 @@ class VehicleParkingUpdaterTest { private DataSource dataSource; private Graph graph; - private TimetableRepository timetableRepository; private DefaultRealTimeUpdateContext realTimeUpdateContext; private VehicleParkingUpdater vehicleParkingUpdater; @@ -45,7 +44,7 @@ public void setup() { VehicleParkingTestGraphData graphData = new VehicleParkingTestGraphData(); graphData.initGraph(); graph = graphData.getGraph(); - timetableRepository = graphData.getTimetableRepository(); + TimetableRepository timetableRepository = graphData.getTimetableRepository(); parkingRepository = new DefaultVehicleParkingRepository(); realTimeUpdateContext = new DefaultRealTimeUpdateContext(graph, timetableRepository); @@ -105,7 +104,11 @@ void updateVehicleParkingTest() { assertVehicleParkingsInGraph(1); - var vehicleParkingInGraph = parkingRepository.getVehicleParkings().findFirst().orElseThrow(); + var vehicleParkingInGraph = parkingRepository + .listVehicleParkings() + .stream() + .findFirst() + .orElseThrow(); assertEquals(vehiclePlaces, vehicleParkingInGraph.getAvailability()); assertEquals(vehiclePlaces, vehicleParkingInGraph.getCapacity()); @@ -118,7 +121,8 @@ void updateVehicleParkingTest() { assertVehicleParkingsInGraph(1); - vehicleParkingInGraph = parkingRepository.getVehicleParkings().findFirst().orElseThrow(); + vehicleParkingInGraph = + parkingRepository.listVehicleParkings().stream().findFirst().orElseThrow(); assertEquals(vehiclePlaces, vehicleParkingInGraph.getAvailability()); assertEquals(vehiclePlaces, vehicleParkingInGraph.getCapacity()); } @@ -153,7 +157,7 @@ void addNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, parkingRepository.getVehicleParkings().count()); + assertEquals(1, parkingRepository.listVehicleParkings().size()); assertVehicleParkingNotLinked(); } @@ -170,10 +174,10 @@ void updateNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, parkingRepository.getVehicleParkings().count()); + assertEquals(1, parkingRepository.listVehicleParkings().size()); assertEquals( vehiclePlaces, - parkingRepository.getVehicleParkings().findFirst().orElseThrow().getAvailability() + parkingRepository.listVehicleParkings().stream().findFirst().orElseThrow().getAvailability() ); assertVehicleParkingNotLinked(); @@ -189,10 +193,10 @@ void updateNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, parkingRepository.getVehicleParkings().count()); + assertEquals(1, parkingRepository.listVehicleParkings().size()); assertEquals( vehiclePlaces, - parkingRepository.getVehicleParkings().findFirst().orElseThrow().getAvailability() + parkingRepository.listVehicleParkings().stream().findFirst().orElseThrow().getAvailability() ); assertVehicleParkingNotLinked(); } @@ -207,12 +211,12 @@ void deleteNotOperatingVehicleParkingTest() { when(dataSource.getUpdates()).thenReturn(List.of(vehicleParking)); runUpdaterOnce(); - assertEquals(1, parkingRepository.getVehicleParkings().count()); + assertEquals(1, parkingRepository.listVehicleParkings().size()); when(dataSource.getUpdates()).thenReturn(List.of()); runUpdaterOnce(); - assertEquals(0, parkingRepository.getVehicleParkings().count()); + assertEquals(0, parkingRepository.listVehicleParkings().size()); } private void assertVehicleParkingsInGraph(int vehicleParkingNumber) { @@ -253,17 +257,13 @@ private void assertVehicleParkingsInGraph(int vehicleParkingNumber) { ); } - assertEquals(vehicleParkingNumber, parkingRepository.getVehicleParkings().count()); + assertEquals(vehicleParkingNumber, parkingRepository.listVehicleParkings().size()); } private void runUpdaterOnce() { class GraphUpdaterMock extends GraphUpdaterManager { - public GraphUpdaterMock( - Graph graph, - TimetableRepository timetableRepository, - List updaters - ) { + public GraphUpdaterMock(List updaters) { super(realTimeUpdateContext, updaters); } @@ -274,11 +274,7 @@ public Future execute(GraphWriterRunnable runnable) { } } - var graphUpdaterManager = new GraphUpdaterMock( - graph, - timetableRepository, - List.of(vehicleParkingUpdater) - ); + var graphUpdaterManager = new GraphUpdaterMock(List.of(vehicleParkingUpdater)); graphUpdaterManager.startUpdaters(); graphUpdaterManager.stop(false); } From ee142c4d659b1ec76591bb3cc6eb93698a2f783b Mon Sep 17 00:00:00 2001 From: JustCris Date: Wed, 20 Nov 2024 12:12:24 +0100 Subject: [PATCH 116/169] add RentalPlace union graphql gtfs schema --- .../apis/gtfs/GtfsGraphQLIndex.java | 4 +-- ...lver.java => RentalPlaceTypeResolver.java} | 2 +- .../gtfs/generated/GraphQLDataFetchers.java | 30 ++----------------- .../apis/gtfs/generated/graphql-codegen.yml | 2 +- .../opentripplanner/apis/gtfs/schema.graphqls | 23 ++++---------- 5 files changed, 12 insertions(+), 49 deletions(-) rename application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/{VehicleRentalTypeResolver.java => RentalPlaceTypeResolver.java} (92%) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/GtfsGraphQLIndex.java b/application/src/main/java/org/opentripplanner/apis/gtfs/GtfsGraphQLIndex.java index 4031b8625f3..34e9b2f8346 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/GtfsGraphQLIndex.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/GtfsGraphQLIndex.java @@ -52,6 +52,7 @@ import org.opentripplanner.apis.gtfs.datafetchers.PlanConnectionImpl; import org.opentripplanner.apis.gtfs.datafetchers.PlanImpl; import org.opentripplanner.apis.gtfs.datafetchers.QueryTypeImpl; +import org.opentripplanner.apis.gtfs.datafetchers.RentalPlaceTypeResolver; import org.opentripplanner.apis.gtfs.datafetchers.RentalVehicleImpl; import org.opentripplanner.apis.gtfs.datafetchers.RentalVehicleTypeImpl; import org.opentripplanner.apis.gtfs.datafetchers.RideHailingEstimateImpl; @@ -75,7 +76,6 @@ import org.opentripplanner.apis.gtfs.datafetchers.VehiclePositionImpl; import org.opentripplanner.apis.gtfs.datafetchers.VehicleRentalNetworkImpl; import org.opentripplanner.apis.gtfs.datafetchers.VehicleRentalStationImpl; -import org.opentripplanner.apis.gtfs.datafetchers.VehicleRentalTypeResolver; import org.opentripplanner.apis.gtfs.datafetchers.debugOutputImpl; import org.opentripplanner.apis.gtfs.datafetchers.elevationProfileComponentImpl; import org.opentripplanner.apis.gtfs.datafetchers.placeAtDistanceImpl; @@ -124,7 +124,7 @@ protected static GraphQLSchema buildSchema() { ) .type("Node", type -> type.typeResolver(new NodeTypeResolver())) .type("PlaceInterface", type -> type.typeResolver(new PlaceInterfaceTypeResolver())) - .type("VehicleRental", type -> type.typeResolver(new VehicleRentalTypeResolver())) + .type("RentalPlace", type -> type.typeResolver(new RentalPlaceTypeResolver())) .type("StopPosition", type -> type.typeResolver(new StopPosition() {})) .type("FareProduct", type -> type.typeResolver(new FareProductTypeResolver())) .type("AlertEntity", type -> type.typeResolver(new AlertEntityTypeResolver())) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/VehicleRentalTypeResolver.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RentalPlaceTypeResolver.java similarity index 92% rename from application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/VehicleRentalTypeResolver.java rename to application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RentalPlaceTypeResolver.java index 9563b2fed98..9e4e5fdb109 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/VehicleRentalTypeResolver.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/RentalPlaceTypeResolver.java @@ -7,7 +7,7 @@ import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; -public class VehicleRentalTypeResolver implements TypeResolver { +public class RentalPlaceTypeResolver implements TypeResolver { @Override public GraphQLObjectType getType(TypeResolutionEnvironment env) { diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index b3c688d5d4a..8541a16bc25 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -844,6 +844,9 @@ public interface GraphQLRealTimeEstimate { public DataFetcher time(); } + /** Rental place union that represents either a VehicleRentalStation or RentalVehicle */ + public interface GraphQLRentalPlace extends TypeResolver {} + /** Rental vehicle represents a vehicle that belongs to a rental network. */ public interface GraphQLRentalVehicle { public DataFetcher allowPickupNow(); @@ -1276,33 +1279,6 @@ public interface GraphQLVehiclePosition { public DataFetcher vehicleId(); } - /** Interface for rental vehicles, e.g. free floating vehicles and rental vehicle stations */ - public interface GraphQLVehicleRental extends TypeResolver { - public default DataFetcher allowPickupNow() { - return null; - } - - public default DataFetcher lat() { - return null; - } - - public default DataFetcher lon() { - return null; - } - - public default DataFetcher operative() { - return null; - } - - public default DataFetcher rentalNetwork() { - return null; - } - - public default DataFetcher rentalUris() { - return null; - } - } - /** * Vehicle rental network, which is referred as system in the GBFS terminology. Note, the same operator can operate in multiple * regions either with the same network/system or with a different one. This can contain information about either the rental brand diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml index affbbd577d3..bf6b010bf2c 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml @@ -125,5 +125,5 @@ config: FareMedium: org.opentripplanner.model.fare.FareMedium#FareMedium RiderCategory: org.opentripplanner.model.fare.RiderCategory#RiderCategory StopPosition: org.opentripplanner.apis.gtfs.model.StopPosition#StopPosition - VehicleRental: org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace#VehicleRentalPlace + RentalPlace: org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace#VehicleRentalPlace diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index 1013e51f925..5c9395ead71 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -70,21 +70,8 @@ interface PlaceInterface { lon: Float } -"Interface for rental vehicles, e.g. free floating vehicles and rental vehicle stations" -interface VehicleRental { - "If true, a vehicle can be picked up." - allowPickupNow: Boolean - "Latitude of the vehicle rental object (WGS 84)" - lat: Float - "Longitude of the vehicle rental object (WGS 84)" - lon: Float - "If true, rental object is not disabled." - operative: Boolean - "The vehicle rental network information. This is referred as system in the GBFS terminology." - rentalNetwork: VehicleRentalNetwork! - "Platform-specific URLs to begin the vehicle." - rentalUris: VehicleRentalUris -} +"Rental place union that represents either a VehicleRentalStation or a RentalVehicle" +union RentalPlace = VehicleRentalStation | RentalVehicle "Entity related to an alert" union AlertEntity = Agency | Pattern | Route | RouteType | Stop | StopOnRoute | StopOnTrip | Trip | Unknown @@ -1757,7 +1744,7 @@ type QueryType { minimumLatitude: CoordinateValue!, "Western bound of the bounding box" minimumLongitude: CoordinateValue! - ): [VehicleRental!]! + ): [RentalPlace]! "Needed until https://github.com/facebook/relay/issues/112 is resolved" viewer: QueryType } @@ -1774,7 +1761,7 @@ type RealTimeEstimate { } "Rental vehicle represents a vehicle that belongs to a rental network." -type RentalVehicle implements Node & PlaceInterface & VehicleRental { +type RentalVehicle implements Node & PlaceInterface { "If true, vehicle is currently available for renting." allowPickupNow: Boolean "Global object ID provided by Relay. This value can be used to refetch this object using **node** query." @@ -2496,7 +2483,7 @@ type VehicleRentalNetwork { } "Vehicle rental station represents a location where users can rent bicycles etc. for a fee." -type VehicleRentalStation implements Node & PlaceInterface & VehicleRental { +type VehicleRentalStation implements Node & PlaceInterface { """ If true, vehicles can be returned to this station if the station has spaces available or allows overloading. From f14800812752d26d2f26958721535756889e6994 Mon Sep 17 00:00:00 2001 From: sharhio <113033056+sharhio@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:19:22 +0200 Subject: [PATCH 117/169] Update application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/RentalPickupType.java Co-authored-by: Leonard Ehrenfried --- .../vehicle_rental/datasources/params/RentalPickupType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/RentalPickupType.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/RentalPickupType.java index c601b2845de..e117f59d9c1 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/RentalPickupType.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/params/RentalPickupType.java @@ -11,8 +11,8 @@ * Enum to specify the type of rental data that is allowed to be read from the data source. */ public enum RentalPickupType implements DocumentedEnum { - STATION("Only station data is allowed."), - FREE_FLOATING("Only vehicle data is allowed."); + STATION("Stations are imported."), + FREE_FLOATING("Free-floating vehicles are imported."); public static final Set ALL = Collections.unmodifiableSet( EnumSet.allOf(RentalPickupType.class) From 7a89d74aaf80d010b80f13540087e6d3e9792ac1 Mon Sep 17 00:00:00 2001 From: JustCris Date: Wed, 20 Nov 2024 12:21:14 +0100 Subject: [PATCH 118/169] vehicleRentalsByBbox union test --- .../expectations/vehicle-rentals-bybbox.json | 38 ++++++++-------- .../queries/vehicle-rentals-bybbox.graphql | 43 ++++++++++++------- 2 files changed, 47 insertions(+), 34 deletions(-) diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json index c93c6ba5c88..01422dd6580 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json @@ -3,17 +3,8 @@ "vehicleRentalsByBbox": [ { "__typename": "VehicleRentalStation", - "allowPickupNow": false, - "lat": 47.51, - "lon": 18.99, - "operative": false, - "rentalNetwork": { - "networkId": "Network-1", - "url": "https://foo.bar" - }, - "rentalUris": null, - "name": "FooStation", "stationId": "Network-1:FooStation", + "name": "FooStation", "vehiclesAvailable": 10, "availableVehicles": { "byType": [ @@ -57,25 +48,34 @@ "allowDropoff": false, "allowPickup": false, "allowDropoffNow": false, + "allowPickupNow": false, + "lon": 18.99, + "lat": 47.51, "capacity": null, - "allowOverloading": false + "allowOverloading": false, + "rentalUris": null, + "operative": false, + "rentalNetwork": { + "networkId": "Network-1", + "url": "https://foo.bar" + } }, { "__typename": "RentalVehicle", + "vehicleId": "Network-1:free-floating-bicycle", + "name": "free-floating-bicycle", "allowPickupNow": true, - "lat": 47.52, "lon": 19.01, - "operative": true, - "rentalNetwork": { - "networkId": "Network-1", - "url": "https://foo.bar" - }, + "lat": 47.52, "rentalUris": null, - "name": "free-floating-bicycle", - "vehicleId": "Network-1:free-floating-bicycle", + "operative": true, "vehicleType": { "formFactor": "BICYCLE", "propulsionType": "HUMAN" + }, + "rentalNetwork": { + "networkId": "Network-1", + "url": "https://foo.bar" } } ] diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql index db42e991e5f..26209f427f9 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/queries/vehicle-rentals-bybbox.graphql @@ -6,30 +6,30 @@ minimumLongitude: 18.80 ) { __typename - allowPickupNow - lat - lon - operative - rentalNetwork { - networkId - url - } - rentalUris { - android - ios - web - } ... on RentalVehicle { - name vehicleId + name + allowPickupNow + lon + lat + rentalUris { + android + ios + web + } + operative vehicleType { formFactor propulsionType } + rentalNetwork { + networkId + url + } } ... on VehicleRentalStation { - name stationId + name vehiclesAvailable availableVehicles { byType { @@ -55,8 +55,21 @@ allowDropoff allowPickup allowDropoffNow + allowPickupNow + lon + lat capacity allowOverloading + rentalUris { + android + ios + web + } + operative + rentalNetwork { + networkId + url + } } } } From 7735de76fb649f5967f12f7ddd11941646029d87 Mon Sep 17 00:00:00 2001 From: sharhio Date: Wed, 20 Nov 2024 13:35:37 +0200 Subject: [PATCH 119/169] updaterConfig doc updated --- doc/user/UpdaterConfig.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/user/UpdaterConfig.md b/doc/user/UpdaterConfig.md index 8336d6e2f7d..f61cce12f54 100644 --- a/doc/user/UpdaterConfig.md +++ b/doc/user/UpdaterConfig.md @@ -392,8 +392,8 @@ HTTP headers to add to the request. Any header key, value can be inserted. This is temporary and will be removed in a future version of OTP. Use this to specify the type of rental data that is allowed to be read from the data source. - - `station` Only station data is allowed. - - `free-floating` Only vehicle data is allowed. + - `station` Stations are imported. + - `free-floating` Free-floating vehicles are imported. From 50d69e36fa74eff695f1e4dcda3324907a996104 Mon Sep 17 00:00:00 2001 From: JustCris Date: Wed, 20 Nov 2024 12:26:29 +0100 Subject: [PATCH 120/169] generate java classes from graphql schema --- .../apis/gtfs/generated/GraphQLDataFetchers.java | 2 +- .../resources/org/opentripplanner/apis/gtfs/schema.graphqls | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index 8541a16bc25..3a21bc60780 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -844,7 +844,7 @@ public interface GraphQLRealTimeEstimate { public DataFetcher time(); } - /** Rental place union that represents either a VehicleRentalStation or RentalVehicle */ + /** Rental place union that represents either a VehicleRentalStation or a RentalVehicle */ public interface GraphQLRentalPlace extends TypeResolver {} /** Rental vehicle represents a vehicle that belongs to a rental network. */ diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index 5c9395ead71..23b8a73ad35 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -70,12 +70,12 @@ interface PlaceInterface { lon: Float } -"Rental place union that represents either a VehicleRentalStation or a RentalVehicle" -union RentalPlace = VehicleRentalStation | RentalVehicle - "Entity related to an alert" union AlertEntity = Agency | Pattern | Route | RouteType | Stop | StopOnRoute | StopOnTrip | Trip | Unknown +"Rental place union that represents either a VehicleRentalStation or a RentalVehicle" +union RentalPlace = RentalVehicle | VehicleRentalStation + union StopPosition = PositionAtStop | PositionBetweenStops "A public transport agency" From 9ea130679e3e3fcefe39c3950ef69b6794f2b429 Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Wed, 20 Nov 2024 14:24:59 +0100 Subject: [PATCH 121/169] feature: Log BUILD STREET GRAPH, BUILD TRANSIT GRAPH, and RUN PLANNER in OTP startup/shutdown messages." --- .../org/opentripplanner/standalone/OTPMain.java | 2 +- .../standalone/OtpStartupInfo.java | 11 ++++++++--- .../standalone/config/CommandLineParameters.java | 15 +++++++++++++++ .../config/CommandLineParametersTest.java | 10 ++++++++++ .../transit/speed_test/SpeedTest.java | 2 +- 5 files changed, 35 insertions(+), 5 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/standalone/OTPMain.java b/application/src/main/java/org/opentripplanner/standalone/OTPMain.java index a8096d806ba..06b0fcc010c 100644 --- a/application/src/main/java/org/opentripplanner/standalone/OTPMain.java +++ b/application/src/main/java/org/opentripplanner/standalone/OTPMain.java @@ -52,7 +52,7 @@ public static void main(String[] args) { try { Thread.currentThread().setName("main"); CommandLineParameters params = parseAndValidateCmdLine(args); - OtpStartupInfo.logInfo(); + OtpStartupInfo.logInfo(params.logInfo()); startOTPServer(params); } catch (OtpAppException ae) { LOG.error(ae.getMessage(), ae); diff --git a/application/src/main/java/org/opentripplanner/standalone/OtpStartupInfo.java b/application/src/main/java/org/opentripplanner/standalone/OtpStartupInfo.java index c601846d889..beae898d678 100644 --- a/application/src/main/java/org/opentripplanner/standalone/OtpStartupInfo.java +++ b/application/src/main/java/org/opentripplanner/standalone/OtpStartupInfo.java @@ -34,13 +34,18 @@ private static String info() { ); } - public static void logInfo() { + public static void logInfo(String runInfo) { // This is good when aggregating logs across multiple load balanced instances of OTP // Hint: a regexp filter like "^OTP (START|SHUTTING)" will list nodes going up/down - LOG.info("OTP STARTING UP ({}) using Java {}", projectInfo().getVersionString(), javaVersion()); + LOG.info( + "OTP STARTING UP - {} - {} - Java {}", + runInfo, + projectInfo().getVersionString(), + javaVersion() + ); ApplicationShutdownSupport.addShutdownHook( "server-shutdown-info", - () -> LOG.info("OTP SHUTTING DOWN ({})", projectInfo().getVersionString()) + () -> LOG.info("OTP SHUTTING DOWN - {} - {}", runInfo, projectInfo().getVersionString()) ); LOG.info(NEW_LINE + "{}", info()); } diff --git a/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java b/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java index 3513ec252ea..c089ff96a74 100644 --- a/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java +++ b/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java @@ -201,6 +201,21 @@ public boolean doServe() { return load || (serve && doBuildTransit()); } + public String logInfo() { + var mainCommands = new ArrayList(); + if (doBuildStreet() & doBuildTransit()) { + mainCommands.add("BUILD STREET & TRANSIT GRAPH"); + } else if (doBuildStreet()) { + mainCommands.add("BUILD STREET GRAPH"); + } else if (doBuildTransit()) { + mainCommands.add("BUILD TRANSIT GRAPH"); + } + if (doServe()) { + mainCommands.add("RUN PLANNER"); + } + return String.join(", ", mainCommands); + } + /** * @param port a port that we plan to bind to * @throws ParameterException if that port is not available diff --git a/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java b/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java index 82c3589202c..dc30e80e587 100644 --- a/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java +++ b/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java @@ -41,6 +41,8 @@ public void everyThingOffByDefault() { assertFalse(subject.doLoadStreetGraph()); assertFalse(subject.doSaveGraph()); assertFalse(subject.doServe()); + var ex = assertThrows(ParameterException.class, () -> subject.inferAndValidate()); + assertEquals("Nothing to do. Use --help to see available options.", ex.getMessage()); } @Test @@ -50,6 +52,7 @@ public void build() { assertTrue(subject.doBuildTransit()); assertFalse(subject.doSaveGraph()); assertFalse(subject.doServe()); + assertEquals("BUILD STREET & TRANSIT GRAPH", subject.logInfo()); subject.save = true; subject.serve = false; @@ -58,6 +61,7 @@ public void build() { assertTrue(subject.doSaveGraph()); assertFalse(subject.doServe()); subject.inferAndValidate(); + assertEquals("BUILD STREET & TRANSIT GRAPH", subject.logInfo()); subject.save = false; subject.serve = true; @@ -66,6 +70,7 @@ public void build() { assertFalse(subject.doSaveGraph()); assertTrue(subject.doServe()); subject.inferAndValidate(); + assertEquals("BUILD STREET & TRANSIT GRAPH, RUN PLANNER", subject.logInfo()); subject.save = true; subject.serve = true; @@ -74,6 +79,7 @@ public void build() { assertTrue(subject.doSaveGraph()); assertTrue(subject.doServe()); subject.inferAndValidate(); + assertEquals("BUILD STREET & TRANSIT GRAPH, RUN PLANNER", subject.logInfo()); } @Test @@ -83,6 +89,7 @@ public void buildStreet() { assertFalse(subject.doBuildTransit()); assertTrue(subject.doSaveStreetGraph()); assertFalse(subject.doSaveGraph()); + assertEquals("BUILD STREET GRAPH", subject.logInfo()); } @Test @@ -90,6 +97,7 @@ public void doLoadGraph() { subject.load = true; assertTrue(subject.doLoadGraph()); assertTrue(subject.doServe()); + assertEquals("RUN PLANNER", subject.logInfo()); } @Test @@ -99,6 +107,7 @@ public void doLoadStreetGraph() { assertFalse(subject.doBuildStreet()); assertFalse(subject.doSaveStreetGraph()); assertFalse(subject.doSaveGraph()); + assertEquals("BUILD TRANSIT GRAPH", subject.logInfo()); subject.save = true; subject.serve = true; @@ -119,6 +128,7 @@ public void validateLoad() { // Implicit given, but should be ok to set subject.serve = true; + assertEquals("RUN PLANNER", subject.logInfo()); // No exception thrown subject.inferAndValidate(); diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java index f0e87b046c5..e3e77e6d972 100644 --- a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java +++ b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java @@ -144,7 +144,7 @@ public TestStatus status() { public static void main(String[] args) { try { - OtpStartupInfo.logInfo(); + OtpStartupInfo.logInfo("Run SpeedTest"); // Given the following setup SpeedTestCmdLineOpts opts = new SpeedTestCmdLineOpts(args); var config = SpeedTestConfig.config(opts.rootDir()); From 8992e18c52a906e7b7dc88fb01107532eebe9c14 Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Wed, 20 Nov 2024 15:50:07 +0200 Subject: [PATCH 122/169] code formatting fixes --- .../street/model/edge/StreetEdge.java | 8 +++-- .../model/edge/StreetEdgeGeofencingTest.java | 35 +++++++++++++++---- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java index 6ec8df555f5..e4d58965cdd 100644 --- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java +++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java @@ -1036,7 +1036,9 @@ private State[] splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching(St .rentalRestrictions() .noDropOffNetworks() .stream() - .map(network -> makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, network, preferences)) + .map(network -> + makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, network, preferences) + ) .filter(Objects::nonNull) .toList(); var statesStream = states.stream(); @@ -1046,7 +1048,9 @@ private State[] splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching(St // you have to check in the rental edge if this has search has been started in a no-drop off zone statesStream = Stream.concat( - Stream.of(makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, null, preferences)), + Stream.of( + makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, null, preferences) + ), statesStream ); } diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java index 31a6c3bc369..c9adc37b122 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java @@ -297,11 +297,19 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZoneAllNetworksAllowedBy assertEquals(BICYCLE, unknownNetworkState.currentMode()); assertNull(unknownNetworkState.getVehicleRentalNetwork()); - final State tierState = Arrays.stream(states).filter(s -> NETWORK_TIER.equals(s.getVehicleRentalNetwork())).findFirst().get(); + final State tierState = Arrays + .stream(states) + .filter(s -> NETWORK_TIER.equals(s.getVehicleRentalNetwork())) + .findFirst() + .get(); assertEquals(RENTING_FLOATING, tierState.getVehicleRentalState()); assertEquals(BICYCLE, tierState.currentMode()); - final State birdState = Arrays.stream(states).filter(s -> NETWORK_BIRD.equals(s.getVehicleRentalNetwork())).findFirst().get(); + final State birdState = Arrays + .stream(states) + .filter(s -> NETWORK_BIRD.equals(s.getVehicleRentalNetwork())) + .findFirst() + .get(); assertEquals(RENTING_FLOATING, birdState.getVehicleRentalState()); assertEquals(BICYCLE, birdState.currentMode()); } @@ -321,11 +329,19 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZoneAllNetworksAllowed() assertEquals(BICYCLE, unknownNetworkState.currentMode()); assertNull(unknownNetworkState.getVehicleRentalNetwork()); - final State tierState = Arrays.stream(states).filter(s -> NETWORK_TIER.equals(s.getVehicleRentalNetwork())).findFirst().get(); + final State tierState = Arrays + .stream(states) + .filter(s -> NETWORK_TIER.equals(s.getVehicleRentalNetwork())) + .findFirst() + .get(); assertEquals(RENTING_FLOATING, tierState.getVehicleRentalState()); assertEquals(BICYCLE, tierState.currentMode()); - final State birdState = Arrays.stream(states).filter(s -> NETWORK_BIRD.equals(s.getVehicleRentalNetwork())).findFirst().get(); + final State birdState = Arrays + .stream(states) + .filter(s -> NETWORK_BIRD.equals(s.getVehicleRentalNetwork())) + .findFirst() + .get(); assertEquals(RENTING_FLOATING, birdState.getVehicleRentalState()); assertEquals(BICYCLE, birdState.currentMode()); } @@ -421,11 +437,18 @@ private static StreetSearchRequest defaultArriveByRequest() { .build(); } - private static StreetSearchRequest makeArriveByRequest(Set allowedNetworks, Set bannedNetworks) { + private static StreetSearchRequest makeArriveByRequest( + Set allowedNetworks, + Set bannedNetworks + ) { return StreetSearchRequest .of() .withPreferences(p -> - p.withBike(b -> b.withRental(r -> r.withAllowedNetworks(allowedNetworks).withBannedNetworks(bannedNetworks))) + p.withBike(b -> + b.withRental(r -> + r.withAllowedNetworks(allowedNetworks).withBannedNetworks(bannedNetworks) + ) + ) ) .withMode(StreetMode.SCOOTER_RENTAL) .withArriveBy(true) From 43861ef4090a55c741c6c9a9dbdc62e4d0ea99d3 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 20 Nov 2024 15:11:19 +0100 Subject: [PATCH 123/169] Improve visibility of map lines in debug UI --- client/src/components/MapView/LegLines.tsx | 13 ++++++++++++- client/src/util/getColorForLeg.ts | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/client/src/components/MapView/LegLines.tsx b/client/src/components/MapView/LegLines.tsx index 8f6e8405997..2e34596f742 100644 --- a/client/src/components/MapView/LegLines.tsx +++ b/client/src/components/MapView/LegLines.tsx @@ -28,10 +28,21 @@ export function LegLines({ tripPattern }: { tripPattern?: TripPattern }) { 'line-cap': 'round', }} paint={{ - 'line-color': getColorForLeg(leg), + 'line-color': '#000', 'line-width': 5, }} /> + ), )} diff --git a/client/src/util/getColorForLeg.ts b/client/src/util/getColorForLeg.ts index ecb8cbc1676..64b5fc7776f 100644 --- a/client/src/util/getColorForLeg.ts +++ b/client/src/util/getColorForLeg.ts @@ -8,7 +8,7 @@ const getColorForMode = function (mode: Mode) { if (mode === Mode.Rail) return '#86BF8B'; if (mode === Mode.Coach) return '#25642A'; if (mode === Mode.Metro) return '#D9B250'; - if (mode === Mode.Bus) return '#25642A'; + if (mode === Mode.Bus) return '#fe0000'; if (mode === Mode.Tram) return '#D9B250'; if (mode === Mode.Trolleybus) return '#25642A'; if (mode === Mode.Water) return '#81304C'; From dd69e79f429a814d72a39d15e5f52f2693f6a51e Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 20 Nov 2024 17:21:36 +0100 Subject: [PATCH 124/169] Rejection SIRI updates with empty StopPointRefs --- .../siri/SiriTimetableSnapshotSource.java | 12 ++++++ .../updater/spi/UpdateError.java | 1 + .../updater/siri/SiriEtBuilder.java | 6 ++- .../rejection/InvalidStopPointRefTest.java | 39 +++++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 application/src/test/java/org/opentripplanner/updater/siri/moduletests/rejection/InvalidStopPointRefTest.java diff --git a/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java b/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java index 33ca220ca7d..6aa068087bd 100644 --- a/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java +++ b/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java @@ -1,6 +1,7 @@ package org.opentripplanner.updater.siri; import static java.lang.Boolean.TRUE; +import static org.opentripplanner.updater.spi.UpdateError.UpdateErrorType.EMPTY_STOP_POINT_REF; import static org.opentripplanner.updater.spi.UpdateError.UpdateErrorType.NOT_MONITORED; import static org.opentripplanner.updater.spi.UpdateError.UpdateErrorType.NO_FUZZY_TRIP_MATCH; import static org.opentripplanner.updater.spi.UpdateError.UpdateErrorType.NO_START_DATE; @@ -33,6 +34,7 @@ import org.opentripplanner.updater.spi.UpdateSuccess; import org.opentripplanner.updater.trip.TimetableSnapshotManager; import org.opentripplanner.updater.trip.UpdateIncrementality; +import org.opentripplanner.utils.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import uk.org.siri.siri20.EstimatedTimetableDeliveryStructure; @@ -228,6 +230,16 @@ private Result handleModifiedTrip( return UpdateError.result(trip != null ? trip.getId() : null, NOT_MONITORED, dataSource); } + for (var call : CallWrapper.of(estimatedVehicleJourney)) { + if (StringUtils.hasNoValueOrNullAsString(call.getStopPointRef())) { + return UpdateError.result( + trip != null ? trip.getId() : null, + EMPTY_STOP_POINT_REF, + dataSource + ); + } + } + LocalDate serviceDate = entityResolver.resolveServiceDate(estimatedVehicleJourney); if (serviceDate == null) { diff --git a/application/src/main/java/org/opentripplanner/updater/spi/UpdateError.java b/application/src/main/java/org/opentripplanner/updater/spi/UpdateError.java index 4e81cf3c2a7..945139e2457 100644 --- a/application/src/main/java/org/opentripplanner/updater/spi/UpdateError.java +++ b/application/src/main/java/org/opentripplanner/updater/spi/UpdateError.java @@ -41,6 +41,7 @@ public enum UpdateErrorType { TRIP_NOT_FOUND, TRIP_NOT_FOUND_IN_PATTERN, NO_FUZZY_TRIP_MATCH, + EMPTY_STOP_POINT_REF, NO_TRIP_FOR_CANCELLATION_FOUND, TRIP_ALREADY_EXISTS, NO_START_DATE, diff --git a/application/src/test/java/org/opentripplanner/updater/siri/SiriEtBuilder.java b/application/src/test/java/org/opentripplanner/updater/siri/SiriEtBuilder.java index 3656d9da2f0..737fb04917e 100644 --- a/application/src/test/java/org/opentripplanner/updater/siri/SiriEtBuilder.java +++ b/application/src/test/java/org/opentripplanner/updater/siri/SiriEtBuilder.java @@ -238,11 +238,15 @@ public EstimatedCallsBuilder(DateTimeHelper dateTimeHelper, int orderOffset) { } public EstimatedCallsBuilder call(StopLocation stop) { + return call(stop.getId().getId()); + } + + public EstimatedCallsBuilder call(String stopPointRef) { var call = new EstimatedCall(); call.setOrder(BigInteger.valueOf(orderOffset + calls.size())); var ref = new StopPointRef(); - ref.setValue(stop.getId().getId()); + ref.setValue(stopPointRef); call.setStopPointRef(ref); calls.add(call); diff --git a/application/src/test/java/org/opentripplanner/updater/siri/moduletests/rejection/InvalidStopPointRefTest.java b/application/src/test/java/org/opentripplanner/updater/siri/moduletests/rejection/InvalidStopPointRefTest.java new file mode 100644 index 00000000000..93f989b92b4 --- /dev/null +++ b/application/src/test/java/org/opentripplanner/updater/siri/moduletests/rejection/InvalidStopPointRefTest.java @@ -0,0 +1,39 @@ +package org.opentripplanner.updater.siri.moduletests.rejection; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.opentripplanner.updater.spi.UpdateResultAssertions.assertFailure; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; +import org.opentripplanner.updater.siri.SiriEtBuilder; +import org.opentripplanner.updater.spi.UpdateError; +import org.opentripplanner.updater.trip.RealtimeTestConstants; +import org.opentripplanner.updater.trip.RealtimeTestEnvironment; + +public class InvalidStopPointRefTest implements RealtimeTestConstants { + + @ParameterizedTest + @ValueSource(strings = { "", " ", "\n", "null", " " }) + void rejectEmptyStopPointRef(String invalidRef) { + var env = RealtimeTestEnvironment.siri().build(); + + // journey contains empty stop point ref elements + // happens in the South Tyrolian feed: https://github.com/noi-techpark/odh-mentor-otp/issues/213 + var invalidJourney = new SiriEtBuilder(env.getDateTimeHelper()) + .withEstimatedVehicleJourneyCode("invalid-journey") + .withOperatorRef("unknown-operator") + .withLineRef("unknown-line") + .withEstimatedCalls(builder -> + builder + .call(invalidRef) + .departAimedExpected("10:58", "10:48") + .call(invalidRef) + .arriveAimedExpected("10:08", "10:58") + ) + .buildEstimatedTimetableDeliveries(); + + var result = env.applyEstimatedTimetable(invalidJourney); + assertEquals(0, result.successful()); + assertFailure(UpdateError.UpdateErrorType.EMPTY_STOP_POINT_REF, result); + } +} From 73a07d8cedefffb60816631aec63b7cbc5014728 Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Wed, 20 Nov 2024 21:05:04 +0000 Subject: [PATCH 125/169] Add changelog entry for #6248 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index 895044bc3c9..f57895e5e09 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -46,6 +46,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Fix rental searches when destination is in a no-drop-off zone [#6233](https://github.com/opentripplanner/OpenTripPlanner/pull/6233) - Include empty rail stops in transfers [#6208](https://github.com/opentripplanner/OpenTripPlanner/pull/6208) - Relax rejection of GTFS flex trips that also contain continuous stopping [#6231](https://github.com/opentripplanner/OpenTripPlanner/pull/6231) +- Remove legacy bike access mapping [#6248](https://github.com/opentripplanner/OpenTripPlanner/pull/6248) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From 7f267f7cbab2626d516aea2fcc49dd0ba6c81fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rich=C3=A1rd=20K=C5=91szegi?= Date: Thu, 21 Nov 2024 10:34:58 +0100 Subject: [PATCH 126/169] Remove unnecessary comment --- client/src/components/SearchBar/LocationInputField.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/src/components/SearchBar/LocationInputField.tsx b/client/src/components/SearchBar/LocationInputField.tsx index 5f2ae950e52..70584e0e6d8 100644 --- a/client/src/components/SearchBar/LocationInputField.tsx +++ b/client/src/components/SearchBar/LocationInputField.tsx @@ -43,8 +43,6 @@ export function LocationInputField({ id, label, tripQueryVariables, setTripQuery size="sm" placeholder="[Click in map]" className="input-medium" - // Intentionally empty for now, but needed because of - // https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable onChange={(e) => { setValue(e.target.value); }} From 5b5c68af971d6221035311ba911283d65e4b25df Mon Sep 17 00:00:00 2001 From: Teemu Kalvas Date: Thu, 21 Nov 2024 11:54:45 +0200 Subject: [PATCH 127/169] reject streams, use for loop in splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching --- .../street/model/edge/StreetEdge.java | 55 +++++++++---------- .../model/edge/StreetEdgeGeofencingTest.java | 24 +++----- 2 files changed, 35 insertions(+), 44 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java index e4d58965cdd..93b0c27a1b1 100644 --- a/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java +++ b/application/src/main/java/org/opentripplanner/street/model/edge/StreetEdge.java @@ -982,14 +982,14 @@ static int defaultMillimeterLength(LineString geometry) { /** * Helper method for {@link #splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching}. * Create a single new state, exiting a no-drop-off zone, in reverse, and continuing - * on a rental vehicle in the named network, or an unknown network if network is null, - * unless the named network is not accepted by the {@link RoutingPreferences} given. + * on a rental vehicle in the known network, or an unknown network if network is null, + * unless the known network is not accepted by the provided {@link RoutingPreferences}. * @param s0 The parent state (i.e. the following state, as we are in reverse) - * @param network Network name, or null if unknown + * @param network Network id, or null if unknown * @param preferences Active {@link RoutingPreferences} * @return Newly generated {@link State}, or null if the state would have been forbidden. */ - private State makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching( + private State createStateAfterHavingExitedNoDropOffZoneWhenReverseSearching( State s0, String network, RoutingPreferences preferences @@ -1032,28 +1032,7 @@ private State makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching( */ private State[] splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching(State s0) { var preferences = s0.getRequest().preferences(); - var states = tov - .rentalRestrictions() - .noDropOffNetworks() - .stream() - .map(network -> - makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, network, preferences) - ) - .filter(Objects::nonNull) - .toList(); - var statesStream = states.stream(); - - if (!states.isEmpty()) { - // null is a special rental network that speculatively assumes that you can take any vehicle - // you have to check in the rental edge if this has search has been started in a no-drop off zone - statesStream = - Stream.concat( - Stream.of( - makeStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, null, preferences) - ), - statesStream - ); - } + var states = new ArrayList(); // Also include a state which continues walking, because the vehicle rental states are // speculation. It is possible that the rental states don't end up at the target at all @@ -1061,9 +1040,29 @@ private State[] splitStatesAfterHavingExitedNoDropOffZoneWhenReverseSearching(St // the rental possibility is simply more expensive than walking. StateEditor walking = doTraverse(s0, TraverseMode.WALK, false); if (walking != null) { - statesStream = Stream.concat(Stream.of(walking.makeState()), statesStream); + states.add(walking.makeState()); + } + + boolean hasNetworkStates = false; + for (var network : tov.rentalRestrictions().noDropOffNetworks()) { + var state = createStateAfterHavingExitedNoDropOffZoneWhenReverseSearching( + s0, + network, + preferences + ); + if (state != null) { + states.add(state); + hasNetworkStates = true; + } + } + if (hasNetworkStates) { + // null is a special rental network that speculatively assumes that you can take any vehicle + // you have to check in the rental edge if this has search has been started in a no-drop off zone + states.add( + createStateAfterHavingExitedNoDropOffZoneWhenReverseSearching(s0, null, preferences) + ); } - return State.ofStream(statesStream); + return states.toArray(State[]::new); } /** diff --git a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java index c9adc37b122..0a9dfa44440 100644 --- a/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java +++ b/application/src/test/java/org/opentripplanner/street/model/edge/StreetEdgeGeofencingTest.java @@ -255,7 +255,7 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { assertEquals(WALK, walkState.currentMode()); // then the speculative renting case for unknown rental network - final State speculativeRenting = states[1]; + final State speculativeRenting = states[2]; assertEquals(RENTING_FLOATING, speculativeRenting.getVehicleRentalState()); assertEquals(BICYCLE, speculativeRenting.currentMode()); // null means that the vehicle has been rented speculatively and the rest of the backwards search @@ -267,19 +267,11 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZone() { ); // then the speculative renting cases for specific rental networks - final State tierState = states[2]; + final State tierState = states[1]; assertEquals(RENTING_FLOATING, tierState.getVehicleRentalState()); assertEquals(BICYCLE, tierState.currentMode()); assertEquals(NETWORK_TIER, tierState.getVehicleRentalNetwork()); assertEquals(Set.of(), tierState.stateData.noRentalDropOffZonesAtStartOfReverseSearch); - /* - * These rental networks are not allowed in the request so they are no longer returned - final State birdState = states[3]; - assertEquals(RENTING_FLOATING, birdState.getVehicleRentalState()); - assertEquals(BICYCLE, birdState.currentMode()); - assertEquals(NETWORK_BIRD, birdState.getVehicleRentalNetwork()); - assertEquals(Set.of(), birdState.stateData.noRentalDropOffZonesAtStartOfReverseSearch); - */ } @Test @@ -292,7 +284,7 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZoneAllNetworksAllowedBy assertEquals(HAVE_RENTED, walkState.getVehicleRentalState()); assertEquals(WALK, walkState.currentMode()); - final State unknownNetworkState = states[1]; + final State unknownNetworkState = states[3]; assertEquals(RENTING_FLOATING, unknownNetworkState.getVehicleRentalState()); assertEquals(BICYCLE, unknownNetworkState.currentMode()); assertNull(unknownNetworkState.getVehicleRentalNetwork()); @@ -324,7 +316,7 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZoneAllNetworksAllowed() assertEquals(HAVE_RENTED, walkState.getVehicleRentalState()); assertEquals(WALK, walkState.currentMode()); - final State unknownNetworkState = states[1]; + final State unknownNetworkState = states[3]; assertEquals(RENTING_FLOATING, unknownNetworkState.getVehicleRentalState()); assertEquals(BICYCLE, unknownNetworkState.currentMode()); assertNull(unknownNetworkState.getVehicleRentalNetwork()); @@ -356,12 +348,12 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZoneSomeNetworksAllowed( assertEquals(HAVE_RENTED, walkState.getVehicleRentalState()); assertEquals(WALK, walkState.currentMode()); - final State unknownNetworkState = states[1]; + final State unknownNetworkState = states[2]; assertEquals(RENTING_FLOATING, unknownNetworkState.getVehicleRentalState()); assertEquals(BICYCLE, unknownNetworkState.currentMode()); assertNull(unknownNetworkState.getVehicleRentalNetwork()); - final State tierState = states[2]; + final State tierState = states[1]; assertEquals(RENTING_FLOATING, tierState.getVehicleRentalState()); assertEquals(BICYCLE, tierState.currentMode()); assertEquals(NETWORK_TIER, tierState.getVehicleRentalNetwork()); @@ -390,12 +382,12 @@ public void pickupFloatingVehiclesWhenStartedInNoDropOffZoneSomeNetworksBanned() assertEquals(HAVE_RENTED, walkState.getVehicleRentalState()); assertEquals(WALK, walkState.currentMode()); - final State unknownNetworkState = states[1]; + final State unknownNetworkState = states[2]; assertEquals(RENTING_FLOATING, unknownNetworkState.getVehicleRentalState()); assertEquals(BICYCLE, unknownNetworkState.currentMode()); assertNull(unknownNetworkState.getVehicleRentalNetwork()); - final State tierState = states[2]; + final State tierState = states[1]; assertEquals(RENTING_FLOATING, tierState.getVehicleRentalState()); assertEquals(BICYCLE, tierState.currentMode()); assertEquals(NETWORK_TIER, tierState.getVehicleRentalNetwork()); From bc1bca070ae9574f7d557f6681914f1d6cc67a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rich=C3=A1rd=20K=C5=91szegi?= Date: Thu, 21 Nov 2024 11:12:29 +0100 Subject: [PATCH 128/169] debug client: simplify location parser coordinate format --- client/src/util/locationConverter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/util/locationConverter.ts b/client/src/util/locationConverter.ts index bb9c8a5b01d..952a36a1dc4 100644 --- a/client/src/util/locationConverter.ts +++ b/client/src/util/locationConverter.ts @@ -3,7 +3,7 @@ import { Location } from '../gql/graphql.ts'; const DOUBLE_PATTERN = '-{0,1}\\d+(\\.\\d+){0,1}'; -const LAT_LON_PATTERN = '(' + DOUBLE_PATTERN + ')(\\s*,\\s*|\\s+)(' + DOUBLE_PATTERN + ')'; +const LAT_LON_PATTERN = '(' + DOUBLE_PATTERN + ')(\\s+)(' + DOUBLE_PATTERN + ')'; export function parseLocation(value: string): Location | null { const latLonMatch = value.match(LAT_LON_PATTERN); From 48cac2ea33cc823e51c6e3caf38f1ab22914e0ef Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Thu, 21 Nov 2024 13:01:20 +0200 Subject: [PATCH 129/169] Move constant speed test to a dedicated test class --- .../tagmapping/ConstantSpeedMapperTest.java | 23 +++++++++++++++++++ .../osm/tagmapping/FinlandMapperTest.java | 14 ----------- 2 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 application/src/test/java/org/opentripplanner/osm/tagmapping/ConstantSpeedMapperTest.java diff --git a/application/src/test/java/org/opentripplanner/osm/tagmapping/ConstantSpeedMapperTest.java b/application/src/test/java/org/opentripplanner/osm/tagmapping/ConstantSpeedMapperTest.java new file mode 100644 index 00000000000..6256044320d --- /dev/null +++ b/application/src/test/java/org/opentripplanner/osm/tagmapping/ConstantSpeedMapperTest.java @@ -0,0 +1,23 @@ +package org.opentripplanner.osm.tagmapping; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; +import org.opentripplanner.osm.model.OsmWithTags; + +public class ConstantSpeedMapperTest { + + @Test + public void constantSpeedCarRouting() { + OsmTagMapper osmTagMapper = new ConstantSpeedFinlandMapper(20f); + + var slowWay = new OsmWithTags(); + slowWay.addTag("highway", "residential"); + assertEquals(20f, osmTagMapper.getCarSpeedForWay(slowWay, true)); + + var fastWay = new OsmWithTags(); + fastWay.addTag("highway", "motorway"); + fastWay.addTag("maxspeed", "120 kmph"); + assertEquals(20f, osmTagMapper.getCarSpeedForWay(fastWay, true)); + } +} diff --git a/application/src/test/java/org/opentripplanner/osm/tagmapping/FinlandMapperTest.java b/application/src/test/java/org/opentripplanner/osm/tagmapping/FinlandMapperTest.java index 24b46a001d7..f8b07e06bf6 100644 --- a/application/src/test/java/org/opentripplanner/osm/tagmapping/FinlandMapperTest.java +++ b/application/src/test/java/org/opentripplanner/osm/tagmapping/FinlandMapperTest.java @@ -226,20 +226,6 @@ public void testArea() { assertEquals(wayData.getPermission(), PEDESTRIAN_AND_BICYCLE); } - @Test - public void constantSpeedCarRouting() { - OsmTagMapper osmTagMapper = new ConstantSpeedFinlandMapper(20f); - - var slowWay = new OsmWithTags(); - slowWay.addTag("highway", "residential"); - assertEquals(20f, osmTagMapper.getCarSpeedForWay(slowWay, true)); - - var fastWay = new OsmWithTags(); - fastWay.addTag("highway", "motorway"); - fastWay.addTag("maxspeed", "120 kmph"); - assertEquals(20f, osmTagMapper.getCarSpeedForWay(fastWay, true)); - } - @Test public void serviceNoThroughTraffic() { var way = new OsmWay(); From 42afde551114881dec16653fd308e2f79e4519b4 Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Thu, 21 Nov 2024 12:01:38 +0000 Subject: [PATCH 130/169] Add changelog entry for #6240 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index f57895e5e09..393d4af2bc8 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -47,6 +47,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Include empty rail stops in transfers [#6208](https://github.com/opentripplanner/OpenTripPlanner/pull/6208) - Relax rejection of GTFS flex trips that also contain continuous stopping [#6231](https://github.com/opentripplanner/OpenTripPlanner/pull/6231) - Remove legacy bike access mapping [#6248](https://github.com/opentripplanner/OpenTripPlanner/pull/6248) +- Filter import of rental data by pickup type [#6240](https://github.com/opentripplanner/OpenTripPlanner/pull/6240) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From 99bbf5322a90c26a51a326ac066dd664fc844cea Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Thu, 21 Nov 2024 12:46:01 +0000 Subject: [PATCH 131/169] Add changelog entry for #6254 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index 393d4af2bc8..afc319d0fba 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -48,6 +48,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Relax rejection of GTFS flex trips that also contain continuous stopping [#6231](https://github.com/opentripplanner/OpenTripPlanner/pull/6231) - Remove legacy bike access mapping [#6248](https://github.com/opentripplanner/OpenTripPlanner/pull/6248) - Filter import of rental data by pickup type [#6240](https://github.com/opentripplanner/OpenTripPlanner/pull/6240) +- Apply stricter motor vehicle nothrough traffic rules in Finland [#6254](https://github.com/opentripplanner/OpenTripPlanner/pull/6254) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From f28273d65260955b1953b3df8d5da02cadff17ba Mon Sep 17 00:00:00 2001 From: Cristian Scapin <59602675+JustCris654@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:03:19 +0100 Subject: [PATCH 132/169] fix vehicleRentalsByBbox return non null RentalPlace Co-authored-by: Joel Lappalainen --- .../resources/org/opentripplanner/apis/gtfs/schema.graphqls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index 23b8a73ad35..8ac6e41ea78 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -1744,7 +1744,7 @@ type QueryType { minimumLatitude: CoordinateValue!, "Western bound of the bounding box" minimumLongitude: CoordinateValue! - ): [RentalPlace]! + ): [RentalPlace!]! "Needed until https://github.com/facebook/relay/issues/112 is resolved" viewer: QueryType } From 5bf1fc09a35a82e744f2b18e247bc68e5687af08 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Thu, 21 Nov 2024 16:26:26 +0100 Subject: [PATCH 133/169] Apply review feedback --- .../apis/transmodel/model/network/GroupOfLinesType.java | 4 +++- .../apis/transmodel/model/siri/et/EstimatedCallType.java | 2 +- .../apis/transmodel/model/siri/sx/AffectsType.java | 4 ++-- .../model/timetable/DatedServiceJourneyQuery.java | 2 +- .../plan/legreference/ScheduledTransitLegReference.java | 2 +- .../algorithm/mapping/RaptorPathToItineraryMapper.java | 2 +- .../routing/alternativelegs/AlternativeLegs.java | 2 +- .../transit/service/DefaultTransitService.java | 6 +++--- .../org/opentripplanner/transit/service/TransitService.java | 6 +++--- .../org/opentripplanner/updater/siri/EntityResolver.java | 6 +++--- .../updater/siri/SiriTimetableSnapshotSourceTest.java | 4 ++-- .../updater/trip/RealtimeTestEnvironment.java | 4 ++-- 12 files changed, 23 insertions(+), 21 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/GroupOfLinesType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/GroupOfLinesType.java index edd69e20853..6e52c6662a4 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/GroupOfLinesType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/network/GroupOfLinesType.java @@ -70,7 +70,9 @@ public static GraphQLObjectType create() { .name("lines") .description("All lines part of this group of lines") .type(new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(LineType.REF)))) - .dataFetcher(env -> GqlUtil.getTransitService(env).findGroupsOfRoutes(env.getSource())) + .dataFetcher(env -> + GqlUtil.getTransitService(env).findRoutes((GroupOfRoutes) env.getSource()) + ) .build() ) .build(); diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/et/EstimatedCallType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/et/EstimatedCallType.java index 64ceb9dde2d..593782af9d8 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/et/EstimatedCallType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/et/EstimatedCallType.java @@ -295,7 +295,7 @@ public static GraphQLObjectType create( .dataFetcher(environment -> GqlUtil .getTransitService(environment) - .findTripOnServiceDate( + .getTripOnServiceDate( new TripIdAndServiceDate( environment.getSource().getTrip().getId(), environment.getSource().getServiceDay() diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/AffectsType.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/AffectsType.java index 319df8988e3..e8cbec6ade0 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/AffectsType.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/siri/sx/AffectsType.java @@ -109,7 +109,7 @@ public static GraphQLOutputType create( EntitySelector.Trip entitySelector = environment.getSource(); return GqlUtil .getTransitService(environment) - .findTripOnServiceDate( + .getTripOnServiceDate( new TripIdAndServiceDate(entitySelector.tripId(), entitySelector.serviceDate()) ); }) @@ -219,7 +219,7 @@ public static GraphQLOutputType create( EntitySelector.StopAndTrip entitySelector = environment.getSource(); return GqlUtil .getTransitService(environment) - .findTripOnServiceDate( + .getTripOnServiceDate( new TripIdAndServiceDate(entitySelector.tripId(), entitySelector.serviceDate()) ); }) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java index 2d95c1fce17..56267c6992d 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java @@ -34,7 +34,7 @@ public static GraphQLFieldDefinition createGetById(GraphQLOutputType datedServic .dataFetcher(environment -> { FeedScopedId id = TransitIdMapper.mapIDToDomain(environment.getArgument("id")); - return GqlUtil.getTransitService(environment).findTripOnServiceDate(id); + return GqlUtil.getTransitService(environment).getTripOnServiceDate(id); }) .build(); } diff --git a/application/src/main/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReference.java b/application/src/main/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReference.java index 0eb6926055e..5defff73cec 100644 --- a/application/src/main/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReference.java +++ b/application/src/main/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReference.java @@ -69,7 +69,7 @@ public ScheduledTransitLeg getLeg(TransitService transitService) { Trip trip; TripOnServiceDate tripOnServiceDate = null; if (tripOnServiceDateId != null) { - tripOnServiceDate = transitService.findTripOnServiceDate(tripOnServiceDateId); + tripOnServiceDate = transitService.getTripOnServiceDate(tripOnServiceDateId); if (tripOnServiceDate == null) { LOG.info( "Invalid transit leg reference: trip on service date '{}' not found", diff --git a/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java b/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java index c30c7c655f8..014d17a8f48 100644 --- a/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java +++ b/application/src/main/java/org/opentripplanner/routing/algorithm/mapping/RaptorPathToItineraryMapper.java @@ -279,7 +279,7 @@ private TripOnServiceDate getTripOnServiceDate(T tripSchedule) { tripSchedule.getOriginalTripTimes().getTrip().getId(), tripSchedule.getServiceDate() ); - return transitService.findTripOnServiceDate(tripIdAndServiceDate); + return transitService.getTripOnServiceDate(tripIdAndServiceDate); } private boolean isFree(EgressPathLeg egressPathLeg) { diff --git a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java index 98f48786215..f65a045a8e3 100644 --- a/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java +++ b/application/src/main/java/org/opentripplanner/routing/alternativelegs/AlternativeLegs.java @@ -229,7 +229,7 @@ private static ScheduledTransitLeg mapToLeg( tripTimes.getArrivalTime(alightingPosition) ); - TripOnServiceDate tripOnServiceDate = transitService.findTripOnServiceDate( + TripOnServiceDate tripOnServiceDate = transitService.getTripOnServiceDate( new TripIdAndServiceDate(tripTimeOnDate.getTrip().getId(), tripTimeOnDate.getServiceDay()) ); diff --git a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java index 3eb75521fb3..3a775e44731 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java @@ -475,7 +475,7 @@ public Collection listGroupsOfRoutes() { } @Override - public Collection findGroupsOfRoutes(GroupOfRoutes groupOfRoutes) { + public Collection findRoutes(GroupOfRoutes groupOfRoutes) { OTPRequestTimeoutException.checkForTimeout(); return timetableRepositoryIndex.getRoutesForGroupOfRoutes(groupOfRoutes); } @@ -531,7 +531,7 @@ private TimetableSnapshot lazyGetTimeTableSnapShot() { } @Override - public TripOnServiceDate findTripOnServiceDate(FeedScopedId tripOnServiceDateId) { + public TripOnServiceDate getTripOnServiceDate(FeedScopedId tripOnServiceDateId) { TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot != null) { TripOnServiceDate tripOnServiceDate = currentSnapshot.getRealTimeAddedTripOnServiceDateById( @@ -557,7 +557,7 @@ public Collection listTripsOnServiceDate() { } @Override - public TripOnServiceDate findTripOnServiceDate(TripIdAndServiceDate tripIdAndServiceDate) { + public TripOnServiceDate getTripOnServiceDate(TripIdAndServiceDate tripIdAndServiceDate) { TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot != null) { TripOnServiceDate tripOnServiceDate = currentSnapshot.getRealTimeAddedTripOnServiceDateForTripAndDay( diff --git a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java index 5290470973d..3a6a8cfd61d 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java @@ -212,7 +212,7 @@ List findTripTimeOnDate( Collection listGroupsOfRoutes(); - Collection findGroupsOfRoutes(GroupOfRoutes groupOfRoutes); + Collection findRoutes(GroupOfRoutes groupOfRoutes); @Nullable GroupOfRoutes getGroupOfRoutes(FeedScopedId id); @@ -237,12 +237,12 @@ List findTripTimeOnDate( */ boolean hasNewTripPatternsForModifiedTrips(); - TripOnServiceDate findTripOnServiceDate(TripIdAndServiceDate tripIdAndServiceDate); + TripOnServiceDate getTripOnServiceDate(TripIdAndServiceDate tripIdAndServiceDate); /** * Return the TripOnServiceDate for a given id, including real-time updates. */ - TripOnServiceDate findTripOnServiceDate(FeedScopedId datedServiceJourneyId); + TripOnServiceDate getTripOnServiceDate(FeedScopedId datedServiceJourneyId); Collection listTripsOnServiceDate(); diff --git a/application/src/main/java/org/opentripplanner/updater/siri/EntityResolver.java b/application/src/main/java/org/opentripplanner/updater/siri/EntityResolver.java index d3b41588f31..47eb45ad287 100644 --- a/application/src/main/java/org/opentripplanner/updater/siri/EntityResolver.java +++ b/application/src/main/java/org/opentripplanner/updater/siri/EntityResolver.java @@ -54,7 +54,7 @@ public Trip resolveTrip(EstimatedVehicleJourney journey) { if (journey.getDatedVehicleJourneyRef() != null) { String datedServiceJourneyId = journey.getDatedVehicleJourneyRef().getValue(); - TripOnServiceDate tripOnServiceDate = transitService.findTripOnServiceDate( + TripOnServiceDate tripOnServiceDate = transitService.getTripOnServiceDate( resolveId(datedServiceJourneyId) ); @@ -113,13 +113,13 @@ public TripOnServiceDate resolveTripOnServiceDate( return null; } - return transitService.findTripOnServiceDate( + return transitService.getTripOnServiceDate( new TripIdAndServiceDate(resolveId(serviceJourneyId), serviceDate) ); } public TripOnServiceDate resolveTripOnServiceDate(FeedScopedId datedServiceJourneyId) { - return transitService.findTripOnServiceDate(datedServiceJourneyId); + return transitService.getTripOnServiceDate(datedServiceJourneyId); } public FeedScopedId resolveDatedServiceJourneyId( diff --git a/application/src/test/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSourceTest.java b/application/src/test/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSourceTest.java index 5bf700cc04a..fea39f912db 100644 --- a/application/src/test/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSourceTest.java +++ b/application/src/test/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSourceTest.java @@ -74,9 +74,9 @@ void testAddJourneyWithExistingRoute() { Trip trip = transitService.getTrip(tripId); assertNotNull(trip); assertNotNull(transitService.findPattern(trip)); - assertNotNull(transitService.findTripOnServiceDate(tripId)); + assertNotNull(transitService.getTripOnServiceDate(tripId)); assertNotNull( - transitService.findTripOnServiceDate(new TripIdAndServiceDate(tripId, SERVICE_DATE)) + transitService.getTripOnServiceDate(new TripIdAndServiceDate(tripId, SERVICE_DATE)) ); assertEquals( numPatternForRoute + 1, diff --git a/application/src/test/java/org/opentripplanner/updater/trip/RealtimeTestEnvironment.java b/application/src/test/java/org/opentripplanner/updater/trip/RealtimeTestEnvironment.java index f892327eb81..f20e58a7b62 100644 --- a/application/src/test/java/org/opentripplanner/updater/trip/RealtimeTestEnvironment.java +++ b/application/src/test/java/org/opentripplanner/updater/trip/RealtimeTestEnvironment.java @@ -96,7 +96,7 @@ public TransitService getTransitService() { */ public TripTimes getTripTimesForTrip(FeedScopedId tripId, LocalDate serviceDate) { var transitService = getTransitService(); - var trip = transitService.findTripOnServiceDate(tripId).getTrip(); + var trip = transitService.getTripOnServiceDate(tripId).getTrip(); var pattern = transitService.findPattern(trip, serviceDate); var timetable = transitService.findTimetable(pattern, serviceDate); return timetable.getTripTimes(trip); @@ -120,7 +120,7 @@ public TripPattern getPatternForTrip(String id) { public TripPattern getPatternForTrip(FeedScopedId tripId, LocalDate serviceDate) { var transitService = getTransitService(); - var trip = transitService.findTripOnServiceDate(tripId); + var trip = transitService.getTripOnServiceDate(tripId); return transitService.findPattern(trip.getTrip(), serviceDate); } From fb650bac86177dc7032c9a4d39acb14c77b78525 Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Thu, 21 Nov 2024 16:54:14 +0100 Subject: [PATCH 134/169] review: Change the case for the commands logged --- .../standalone/config/CommandLineParameters.java | 8 ++++---- .../config/CommandLineParametersTest.java | 16 ++++++++-------- .../transit/speed_test/SpeedTest.java | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java b/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java index c089ff96a74..00fc7c75250 100644 --- a/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java +++ b/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java @@ -204,14 +204,14 @@ public boolean doServe() { public String logInfo() { var mainCommands = new ArrayList(); if (doBuildStreet() & doBuildTransit()) { - mainCommands.add("BUILD STREET & TRANSIT GRAPH"); + mainCommands.add("Build Street & Transit Graph"); } else if (doBuildStreet()) { - mainCommands.add("BUILD STREET GRAPH"); + mainCommands.add("Build Street Graph"); } else if (doBuildTransit()) { - mainCommands.add("BUILD TRANSIT GRAPH"); + mainCommands.add("Build Transit Graph"); } if (doServe()) { - mainCommands.add("RUN PLANNER"); + mainCommands.add("Run Server"); } return String.join(", ", mainCommands); } diff --git a/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java b/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java index dc30e80e587..fd2cb852444 100644 --- a/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java +++ b/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java @@ -52,7 +52,7 @@ public void build() { assertTrue(subject.doBuildTransit()); assertFalse(subject.doSaveGraph()); assertFalse(subject.doServe()); - assertEquals("BUILD STREET & TRANSIT GRAPH", subject.logInfo()); + assertEquals("Build Street & Transit Graph", subject.logInfo()); subject.save = true; subject.serve = false; @@ -61,7 +61,7 @@ public void build() { assertTrue(subject.doSaveGraph()); assertFalse(subject.doServe()); subject.inferAndValidate(); - assertEquals("BUILD STREET & TRANSIT GRAPH", subject.logInfo()); + assertEquals("Build Street & Transit Graph", subject.logInfo()); subject.save = false; subject.serve = true; @@ -70,7 +70,7 @@ public void build() { assertFalse(subject.doSaveGraph()); assertTrue(subject.doServe()); subject.inferAndValidate(); - assertEquals("BUILD STREET & TRANSIT GRAPH, RUN PLANNER", subject.logInfo()); + assertEquals("Build Street & Transit Graph, Run Server", subject.logInfo()); subject.save = true; subject.serve = true; @@ -79,7 +79,7 @@ public void build() { assertTrue(subject.doSaveGraph()); assertTrue(subject.doServe()); subject.inferAndValidate(); - assertEquals("BUILD STREET & TRANSIT GRAPH, RUN PLANNER", subject.logInfo()); + assertEquals("Build Street & Transit Graph, Run Server", subject.logInfo()); } @Test @@ -89,7 +89,7 @@ public void buildStreet() { assertFalse(subject.doBuildTransit()); assertTrue(subject.doSaveStreetGraph()); assertFalse(subject.doSaveGraph()); - assertEquals("BUILD STREET GRAPH", subject.logInfo()); + assertEquals("Build Street Graph", subject.logInfo()); } @Test @@ -97,7 +97,7 @@ public void doLoadGraph() { subject.load = true; assertTrue(subject.doLoadGraph()); assertTrue(subject.doServe()); - assertEquals("RUN PLANNER", subject.logInfo()); + assertEquals("Run Server", subject.logInfo()); } @Test @@ -107,7 +107,7 @@ public void doLoadStreetGraph() { assertFalse(subject.doBuildStreet()); assertFalse(subject.doSaveStreetGraph()); assertFalse(subject.doSaveGraph()); - assertEquals("BUILD TRANSIT GRAPH", subject.logInfo()); + assertEquals("Build Transit Graph", subject.logInfo()); subject.save = true; subject.serve = true; @@ -128,7 +128,7 @@ public void validateLoad() { // Implicit given, but should be ok to set subject.serve = true; - assertEquals("RUN PLANNER", subject.logInfo()); + assertEquals("Run Server", subject.logInfo()); // No exception thrown subject.inferAndValidate(); diff --git a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java index e3e77e6d972..e5e305d8081 100644 --- a/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java +++ b/application/src/test/java/org/opentripplanner/transit/speed_test/SpeedTest.java @@ -144,7 +144,7 @@ public TestStatus status() { public static void main(String[] args) { try { - OtpStartupInfo.logInfo("Run SpeedTest"); + OtpStartupInfo.logInfo("Run Speed Test"); // Given the following setup SpeedTestCmdLineOpts opts = new SpeedTestCmdLineOpts(args); var config = SpeedTestConfig.config(opts.rootDir()); From 0a8e8722ba4b2678a5ca5805d6bf1884ab46a2f1 Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Thu, 21 Nov 2024 15:57:40 +0000 Subject: [PATCH 135/169] Add changelog entry for #6186 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index afc319d0fba..814d0dfdaf2 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -49,6 +49,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Remove legacy bike access mapping [#6248](https://github.com/opentripplanner/OpenTripPlanner/pull/6248) - Filter import of rental data by pickup type [#6240](https://github.com/opentripplanner/OpenTripPlanner/pull/6240) - Apply stricter motor vehicle nothrough traffic rules in Finland [#6254](https://github.com/opentripplanner/OpenTripPlanner/pull/6254) +- Add `vehicleRentalsByBbox` query to GTFS GraphQL API [#6186](https://github.com/opentripplanner/OpenTripPlanner/pull/6186) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From 1e02e113f6ee107fc2c498dff800049d8835d3c8 Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Thu, 21 Nov 2024 17:07:16 +0100 Subject: [PATCH 136/169] refactor: Improve doc and logged version text. --- .../model/projectinfo/OtpProjectInfo.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/model/projectinfo/OtpProjectInfo.java b/application/src/main/java/org/opentripplanner/model/projectinfo/OtpProjectInfo.java index 37651d4522f..c49fbc1ae4f 100644 --- a/application/src/main/java/org/opentripplanner/model/projectinfo/OtpProjectInfo.java +++ b/application/src/main/java/org/opentripplanner/model/projectinfo/OtpProjectInfo.java @@ -80,7 +80,7 @@ public String toString() { * dev-2.x} */ public String getVersionString() { - String format = "version: %s, ser.ver.id: %s, commit: %s, branch: %s"; + String format = "Version: %s, ser.ver.id: %s, commit: %s, branch: %s"; return String.format( format, version.version, @@ -91,8 +91,8 @@ public String getVersionString() { } /** - * This method compare the maven project version, an return {@code true} if both are the same. Two - * different SNAPSHOT versions are considered the same - work in progress. + * This method compares the maven project version, and return {@code true} if both are the same. + * Two different SNAPSHOT versions are considered the same version - they are work in progress. */ public boolean sameVersion(OtpProjectInfo other) { return this.version.sameVersion(other.version); @@ -100,8 +100,8 @@ public boolean sameVersion(OtpProjectInfo other) { /** * The OTP Serialization version id is used to determine if OTP and a serialized blob(Graph.obj) - * of the otp internal model are compatible. This filed is writen into the Graph.obj file header - * and checked when loading the graph later. + * of the otp internal model are compatible. This field is written into the Graph.obj + * file header and checked when loading the graph later. */ public String getOtpSerializationVersionId() { return graphFileHeaderInfo.otpSerializationVersionId(); From f7f2b93a54358acdcd711303aac9747611ade2bc Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Thu, 21 Nov 2024 17:11:40 +0100 Subject: [PATCH 137/169] refactor: Improve cli task info variable name --- .../org/opentripplanner/standalone/OTPMain.java | 2 +- .../standalone/OtpStartupInfo.java | 6 +++--- .../standalone/config/CommandLineParameters.java | 2 +- .../config/CommandLineParametersTest.java | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/standalone/OTPMain.java b/application/src/main/java/org/opentripplanner/standalone/OTPMain.java index 06b0fcc010c..a10f8f8ef7b 100644 --- a/application/src/main/java/org/opentripplanner/standalone/OTPMain.java +++ b/application/src/main/java/org/opentripplanner/standalone/OTPMain.java @@ -52,7 +52,7 @@ public static void main(String[] args) { try { Thread.currentThread().setName("main"); CommandLineParameters params = parseAndValidateCmdLine(args); - OtpStartupInfo.logInfo(params.logInfo()); + OtpStartupInfo.logInfo(params.logTaskInfo()); startOTPServer(params); } catch (OtpAppException ae) { LOG.error(ae.getMessage(), ae); diff --git a/application/src/main/java/org/opentripplanner/standalone/OtpStartupInfo.java b/application/src/main/java/org/opentripplanner/standalone/OtpStartupInfo.java index beae898d678..ddcc2c60212 100644 --- a/application/src/main/java/org/opentripplanner/standalone/OtpStartupInfo.java +++ b/application/src/main/java/org/opentripplanner/standalone/OtpStartupInfo.java @@ -34,18 +34,18 @@ private static String info() { ); } - public static void logInfo(String runInfo) { + public static void logInfo(String cliTaskInfo) { // This is good when aggregating logs across multiple load balanced instances of OTP // Hint: a regexp filter like "^OTP (START|SHUTTING)" will list nodes going up/down LOG.info( "OTP STARTING UP - {} - {} - Java {}", - runInfo, + cliTaskInfo, projectInfo().getVersionString(), javaVersion() ); ApplicationShutdownSupport.addShutdownHook( "server-shutdown-info", - () -> LOG.info("OTP SHUTTING DOWN - {} - {}", runInfo, projectInfo().getVersionString()) + () -> LOG.info("OTP SHUTTING DOWN - {} - {}", cliTaskInfo, projectInfo().getVersionString()) ); LOG.info(NEW_LINE + "{}", info()); } diff --git a/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java b/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java index 00fc7c75250..2324ce325d9 100644 --- a/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java +++ b/application/src/main/java/org/opentripplanner/standalone/config/CommandLineParameters.java @@ -201,7 +201,7 @@ public boolean doServe() { return load || (serve && doBuildTransit()); } - public String logInfo() { + public String logTaskInfo() { var mainCommands = new ArrayList(); if (doBuildStreet() & doBuildTransit()) { mainCommands.add("Build Street & Transit Graph"); diff --git a/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java b/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java index fd2cb852444..0551d9e7056 100644 --- a/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java +++ b/application/src/test/java/org/opentripplanner/standalone/config/CommandLineParametersTest.java @@ -52,7 +52,7 @@ public void build() { assertTrue(subject.doBuildTransit()); assertFalse(subject.doSaveGraph()); assertFalse(subject.doServe()); - assertEquals("Build Street & Transit Graph", subject.logInfo()); + assertEquals("Build Street & Transit Graph", subject.logTaskInfo()); subject.save = true; subject.serve = false; @@ -61,7 +61,7 @@ public void build() { assertTrue(subject.doSaveGraph()); assertFalse(subject.doServe()); subject.inferAndValidate(); - assertEquals("Build Street & Transit Graph", subject.logInfo()); + assertEquals("Build Street & Transit Graph", subject.logTaskInfo()); subject.save = false; subject.serve = true; @@ -70,7 +70,7 @@ public void build() { assertFalse(subject.doSaveGraph()); assertTrue(subject.doServe()); subject.inferAndValidate(); - assertEquals("Build Street & Transit Graph, Run Server", subject.logInfo()); + assertEquals("Build Street & Transit Graph, Run Server", subject.logTaskInfo()); subject.save = true; subject.serve = true; @@ -79,7 +79,7 @@ public void build() { assertTrue(subject.doSaveGraph()); assertTrue(subject.doServe()); subject.inferAndValidate(); - assertEquals("Build Street & Transit Graph, Run Server", subject.logInfo()); + assertEquals("Build Street & Transit Graph, Run Server", subject.logTaskInfo()); } @Test @@ -89,7 +89,7 @@ public void buildStreet() { assertFalse(subject.doBuildTransit()); assertTrue(subject.doSaveStreetGraph()); assertFalse(subject.doSaveGraph()); - assertEquals("Build Street Graph", subject.logInfo()); + assertEquals("Build Street Graph", subject.logTaskInfo()); } @Test @@ -97,7 +97,7 @@ public void doLoadGraph() { subject.load = true; assertTrue(subject.doLoadGraph()); assertTrue(subject.doServe()); - assertEquals("Run Server", subject.logInfo()); + assertEquals("Run Server", subject.logTaskInfo()); } @Test @@ -107,7 +107,7 @@ public void doLoadStreetGraph() { assertFalse(subject.doBuildStreet()); assertFalse(subject.doSaveStreetGraph()); assertFalse(subject.doSaveGraph()); - assertEquals("Build Transit Graph", subject.logInfo()); + assertEquals("Build Transit Graph", subject.logTaskInfo()); subject.save = true; subject.serve = true; @@ -128,7 +128,7 @@ public void validateLoad() { // Implicit given, but should be ok to set subject.serve = true; - assertEquals("Run Server", subject.logInfo()); + assertEquals("Run Server", subject.logTaskInfo()); // No exception thrown subject.inferAndValidate(); From 8e94bcc49656cf12215efb80d55b64740be81a4a Mon Sep 17 00:00:00 2001 From: OTP Bot Date: Fri, 22 Nov 2024 08:28:38 +0000 Subject: [PATCH 138/169] Upgrade debug client to version 2024/11/2024-11-22T08:28 --- application/src/client/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/client/index.html b/application/src/client/index.html index 7c460db6dd9..7a4de39e593 100644 --- a/application/src/client/index.html +++ b/application/src/client/index.html @@ -5,8 +5,8 @@ OTP Debug Client - - + +
From c75ee9dedcc501275239afe8e7db4d98323c48d5 Mon Sep 17 00:00:00 2001 From: OTP Bot Date: Fri, 22 Nov 2024 08:30:30 +0000 Subject: [PATCH 139/169] Upgrade debug client to version 2024/11/2024-11-22T08:29 --- application/src/client/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/client/index.html b/application/src/client/index.html index 7a4de39e593..e8872ab33cd 100644 --- a/application/src/client/index.html +++ b/application/src/client/index.html @@ -5,8 +5,8 @@ OTP Debug Client - - + +
From 0202d1efb1770a24c19c9bfd9f5cf86e5543fd27 Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Fri, 22 Nov 2024 09:43:24 +0000 Subject: [PATCH 140/169] Add changelog entry for #6260 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index 814d0dfdaf2..3d0f343e657 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -50,6 +50,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Filter import of rental data by pickup type [#6240](https://github.com/opentripplanner/OpenTripPlanner/pull/6240) - Apply stricter motor vehicle nothrough traffic rules in Finland [#6254](https://github.com/opentripplanner/OpenTripPlanner/pull/6254) - Add `vehicleRentalsByBbox` query to GTFS GraphQL API [#6186](https://github.com/opentripplanner/OpenTripPlanner/pull/6186) +- Improve performance of speculative rental vehicle use in reverse search [#6260](https://github.com/opentripplanner/OpenTripPlanner/pull/6260) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From c915598457f0e8596d2ef75678aaf136936e1c9a Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Fri, 22 Nov 2024 13:44:21 +0200 Subject: [PATCH 141/169] Format json files as well --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index b520f3cad63..b42ab78d978 100644 --- a/pom.xml +++ b/pom.xml @@ -285,6 +285,7 @@ src/main/java/**/*.java src/test/java/**/*.java + src/**/*.json src/test/resources/org/opentripplanner/apis/**/*.graphql From c287575df6798810a69fafc54c8c4e1867b71367 Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Fri, 22 Nov 2024 13:53:26 +0200 Subject: [PATCH 142/169] Apply formatting --- .../classic-debug/js/otp/locale/ca_ES.json | 474 +-- .../classic-debug/js/otp/locale/de.json | 474 +-- .../classic-debug/js/otp/locale/en.json | 474 +-- .../classic-debug/js/otp/locale/es.json | 474 +-- .../classic-debug/js/otp/locale/fr.json | 474 +-- .../classic-debug/js/otp/locale/hu.json | 474 +-- .../classic-debug/js/otp/locale/it.json | 474 +-- .../classic-debug/js/otp/locale/no.json | 474 +-- .../classic-debug/js/otp/locale/pl.json | 492 +-- .../classic-debug/js/otp/locale/pt.json | 474 +-- .../classic-debug/js/otp/locale/sl.json | 510 +-- .../ext/vehicleparking/bikeep/bikeep.json | 111 +- .../ext/vehicleparking/bikely/bikely.json | 2 +- .../vehicleparking/hslpark/facilities.json | 209 +- .../ext/vehicleparking/hslpark/hubs.json | 135 +- .../vehicleparking/hslpark/utilizations.json | 36 +- .../vehicleparking/parkapi/herrenberg.json | 2 +- .../parkapi/parkapi-reutlingen.json | 2 +- .../generatedoc/router-config.json | 4 +- .../ridehailing/uber-arrival-estimates.json | 2 +- .../ridehailing/uber-price-estimates.json | 2 +- .../resources/smoovebikerental/smoove.json | 94 +- .../ext/vectortiles/router-config.json | 1 - .../test/resources/gbfs/helsinki/gbfs.json | 2 +- .../gbfs/helsinki/station_information.json | 2 +- .../gbfs/helsinki/station_status.json | 2 +- .../gbfs/helsinki/system_information.json | 2 +- .../station_information.json | 2 +- .../lillestrombysykkel/station_status.json | 2 +- .../system_information.json | 2 +- .../system_pricing_plans.json | 2 +- .../lillestrombysykkel/vehicle_types.json | 2 +- .../test/resources/gbfs/tieroslo/gbfs.json | 2 +- .../gbfs/tieroslo/geofencing_zones.json | 2812 ++++------------- .../gbfs/tieroslo/system_information.json | 2 +- .../resources/netex/nordic/build-config.json | 12 +- .../apis/gtfs/expectations/alerts.json | 2 +- .../apis/gtfs/expectations/feedinfo.json | 18 +- .../apis/gtfs/expectations/nearest.json | 30 +- .../apis/gtfs/expectations/node-alert.json | 2 +- .../apis/gtfs/expectations/patterns.json | 134 +- .../apis/gtfs/expectations/plan.json | 86 +- .../expectations/planConnection-extended.json | 544 ++-- .../expectations/planConnection-fares.json | 228 +- .../planConnection-stop-positions.json | 132 +- .../expectations/planConnection-tutorial.json | 184 +- .../gtfs/expectations/rental-vehicle.json | 22 +- .../gtfs/expectations/routes-extended.json | 286 +- .../gtfs/expectations/routes-tutorial.json | 202 +- .../apis/gtfs/expectations/stops.json | 166 +- .../gtfs/expectations/vehicle-parking.json | 10 +- .../expectations/vehicle-rental-station.json | 82 +- .../expectations/vehicle-rentals-bybbox.json | 2 +- .../apis/gtfs/expectations/walk-steps.json | 36 +- .../apis/vectortiles/style.json | 1208 +++---- .../test/resources/portland/build-config.json | 2 +- .../resources/portland/router-config.json | 3 +- .../speedtest/speed-test-config.json | 6 +- .../standalone/config/build-config.json | 82 +- .../config/netex-tutorial/build-config.json | 2 +- .../config/netex-tutorial/router-config.json | 2 +- .../standalone/config/router-config.json | 21 +- .../sandbox/build-config-data-overlay.json | 4 +- 63 files changed, 4923 insertions(+), 7287 deletions(-) diff --git a/application/src/client/classic-debug/js/otp/locale/ca_ES.json b/application/src/client/classic-debug/js/otp/locale/ca_ES.json index e0bc0c5e3ba..e730a986359 100644 --- a/application/src/client/classic-debug/js/otp/locale/ca_ES.json +++ b/application/src/client/classic-debug/js/otp/locale/ca_ES.json @@ -1,238 +1,238 @@ { - "Transit": "Transport públic", - "Bus Only": "Només bus", - "Rail Only": "Només tren", - "Airplane Only": "", - "Transit, No Airplane": "", - "Bicycle Only": "Bicicleta", - "Bicycle & Transit": "Transport públic i bicicleta", - "Walk Only": "Només a peu", - "Car Only": "", - "Taxi": "", - "Park and Ride": "", - "Ride and Kiss (Car Pickup)": "", - "Kiss and Ride (Car Dropoff)": "", - "Bike and Ride": "", - "Rented Bicycle": "", - "Transit & Rented Bicycle": "", - "Rented Scooter": "", - "Transit & Rented Scooter": "", - "Transit with flex access": "", - "Transit with flex egress": "", - "Transit with flex access and egress": "", - "Direct flex search": "", - "Recenter Map Here": "Centrar mapa aquí", - "Zoom In": "Apropar", - "Zoom Out": "Allunyar", - "Minimize all": "", - "Unminimize all": "", - "Stop Viewer": "", - "Plan Trip": "", - "From Stop": "", - "To Stop": "", - "Routes Serving Stop": "", - "Bike Share Planner": "", - "Trip Options": "", - "PICK UP BIKE": "", - "ALTERNATE PICKUP": "", - "DROP OFF BIKE": "", - "ALTERNATE DROP OFF": "", - "BIKE STATION": "", - "Station:": "", - "%d bike available": "", - "%d bike available_plural": "", - "%d dock available": "", - "%d dock available_plural": "", - "Recommended Pick Up:": "", - "Bicycle rental": "", - "Recommended Drop Off:": "", - "Multimodal Trip Planner": "", - "Itineraries": "", - "This itinerary departs on a different day from the previous one": "", - "%d Itinerary Returned": "", - "%d Itinerary Returned_plural": "", - "Link to search": "", - "Previous Page": "", - "Next Page": "", - "CONTINUES AS": "", - "%d min late": "", - "%d min late_plural": "", - "%d min early": "", - "%d min early_plural": "", - "on time": "", - "This itinerary departs on a different day than the one searched for": "", - "Arrived at destination with a rented bicycle!": "", - "End": "", - "Trip Summary": "", - "Travel": "Hora de sortida", - "Time": "Temps", - "GenCost": "", - "Total Walk": "", - "Total Bike": "", - "Total drive": "", - "Elevation Gained": "", - "Elevation Lost": "", - "Transfers": "transbords", - "Fare": "Tarifa", - "Valid": "Hora actual", - "Link to Itinerary": "", - "Print": "Imprimir", - "Your Trip": "", - "Email": "", - "every %d min": "", - "every %d min_plural": "", - "Board at ": "", - "Stop": "", - "Time in transit": "", - "Route ID": "", - "Trip ID": "", - "Service Date": "", - "Trip Viewer": "", - "late as": "", - "Stay on board": "stay on board", - "Alight": "", - "at": "a", - "%(currency)s %(price)s": "", - "Start: %(location)s at %(time_date)s": "", - "Board": "", - "(%(agency_id)s Stop ID #%(stop_id)s),": "", - "End: %(location)s at %(time_date)s": "", - "(%(agencyId)s Stop ID #%(id)s),": "", - "\nView itinerary online:\n%(itinerary_link)s\n": "", - "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "", - "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", - "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", - "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "", - "The trip planner is taking way too long to process your request. Please try again later.": "", - "The request has errors that the server is not willing or able to process.": "", - "Origin is unknown. Can you be a bit more descriptive?": "", - "Destination is unknown. Can you be a bit more descriptive?": "", - "Both origin and destination are unknown. Can you be a bit more descriptive?": "", - "Both origin and destination are not wheelchair accessible": "", - "Origin is within a trivial distance of the destination.": "", - "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "", - "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "", - "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "", - "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "", - "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "", - "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "", - "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "", - "Set as Start Location": "", - "Set as End Location": "", - "Destination": "", - "Error %(error_id)d": "", - "No Trip Found": "", - "Your %(bike_share_name)s route": "", - "Your bike route": "", - "Walk to the %(bike_share_name)s dock.": "", - "Walk from the %(bike_share_name)s dock to your destination.": "", - "Your walk route": "", - "Your route using the scooter": "", - "Your driving route": "", - "north": "nord", - "northeast": "nord-est", - "east": "est", - "southeast": "sud-est", - "south": "sud", - "southwest": "sud-oest", - "west": "oest", - "northwest": "nord-oest", - "hard left": "gira completament a la esquerra", - "left": "gira a la esquerra", - "slight left": "gira lleugerament a la esquerra", - "continue": "", - "slight right": "gira lleugerament a la dreta", - "right": "gira a la dreta", - "hard right": "gira completament a la dreta", - "elevator": "", - "U-turn left": "", - "U-turn right": "", - "Walk": "A peu", - "Cycle": "Bicicleta", - "Car": "Cotxe", - "Bus": "AUTOBÚS", - "Subway": "METRO", - "Train": "Tren", - "Ferry": "BOT", - "Light Rail": "", - "Cable Car": "PONT PENJANT", - "Funicular": "FUNICULAR", - "Aerial Tram": "", - "Airplane": "", - "Bicycle rental station": "", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", - "Start on": "", - " heading ": "", - "to continue on": "per a continuar a", - "on to": "", - "first": "", - "second": "", - "third": "", - "fourth": "", - "fifth": "", - "sixth": "", - "seventh": "", - "eight": "", - "ninth": "", - "tenth": "", - "%d hr": "", - "%d hr_plural": "", - "%d min": "", - "%d min_plural": "", - "%d sec": "", - "%d sec_plural": "", - "OK": "OK", - "Minimize": "", - "Bring to front": "", - "Send to back": "", - "Route:": "", - "Variant:": "", - "Stop Finder": "", - "Feed": "Agency", - "By ID": "", - "By Name": "", - "Search": "", - "No Stops Found": "", - "Date": "Data", - "Find Stops": "", - "(No Stop Selected)": "", - "Block": "", - "Recenter": "", - "Viewer": "", - "Quick": "", - "Flat": "", - "Bike Friendly": "", - "B": "", - "F": "", - "Q": "", - "All Routes": "", - "Save": "", - "Close": "", - "Travel Options": "", - "Geocoder": "", - "Arrive": "Arribada a", - "Now": "", - "Wheelchair accessible trip:": "Viatge amb accessibilitat:", - "Show Filtered Itineraries:": "", - "Travel by": "Mode de viatge", - "Preferred Routes": "", - "Edit": "Editar", - "None": "", - "Weight": "", - "Banned routes": "", - "Use": "", - "My Own Bike": "", - "A Shared Bike": "", - "Plan Your Trip": "Planificar el viatge", - "Additional parameters": "", - " to _direction": "", - " to _bus_direction": "", - "Start_template": "", - "Depart_itinerary": "Sortida des de", - "depart_itinerary": "Sortida des de", - "Start_popup": "", - "Depart_tripoptions": "Sortida des de" -} \ No newline at end of file + "Transit": "Transport públic", + "Bus Only": "Només bus", + "Rail Only": "Només tren", + "Airplane Only": "", + "Transit, No Airplane": "", + "Bicycle Only": "Bicicleta", + "Bicycle & Transit": "Transport públic i bicicleta", + "Walk Only": "Només a peu", + "Car Only": "", + "Taxi": "", + "Park and Ride": "", + "Ride and Kiss (Car Pickup)": "", + "Kiss and Ride (Car Dropoff)": "", + "Bike and Ride": "", + "Rented Bicycle": "", + "Transit & Rented Bicycle": "", + "Rented Scooter": "", + "Transit & Rented Scooter": "", + "Transit with flex access": "", + "Transit with flex egress": "", + "Transit with flex access and egress": "", + "Direct flex search": "", + "Recenter Map Here": "Centrar mapa aquí", + "Zoom In": "Apropar", + "Zoom Out": "Allunyar", + "Minimize all": "", + "Unminimize all": "", + "Stop Viewer": "", + "Plan Trip": "", + "From Stop": "", + "To Stop": "", + "Routes Serving Stop": "", + "Bike Share Planner": "", + "Trip Options": "", + "PICK UP BIKE": "", + "ALTERNATE PICKUP": "", + "DROP OFF BIKE": "", + "ALTERNATE DROP OFF": "", + "BIKE STATION": "", + "Station:": "", + "%d bike available": "", + "%d bike available_plural": "", + "%d dock available": "", + "%d dock available_plural": "", + "Recommended Pick Up:": "", + "Bicycle rental": "", + "Recommended Drop Off:": "", + "Multimodal Trip Planner": "", + "Itineraries": "", + "This itinerary departs on a different day from the previous one": "", + "%d Itinerary Returned": "", + "%d Itinerary Returned_plural": "", + "Link to search": "", + "Previous Page": "", + "Next Page": "", + "CONTINUES AS": "", + "%d min late": "", + "%d min late_plural": "", + "%d min early": "", + "%d min early_plural": "", + "on time": "", + "This itinerary departs on a different day than the one searched for": "", + "Arrived at destination with a rented bicycle!": "", + "End": "", + "Trip Summary": "", + "Travel": "Hora de sortida", + "Time": "Temps", + "GenCost": "", + "Total Walk": "", + "Total Bike": "", + "Total drive": "", + "Elevation Gained": "", + "Elevation Lost": "", + "Transfers": "transbords", + "Fare": "Tarifa", + "Valid": "Hora actual", + "Link to Itinerary": "", + "Print": "Imprimir", + "Your Trip": "", + "Email": "", + "every %d min": "", + "every %d min_plural": "", + "Board at ": "", + "Stop": "", + "Time in transit": "", + "Route ID": "", + "Trip ID": "", + "Service Date": "", + "Trip Viewer": "", + "late as": "", + "Stay on board": "stay on board", + "Alight": "", + "at": "a", + "%(currency)s %(price)s": "", + "Start: %(location)s at %(time_date)s": "", + "Board": "", + "(%(agency_id)s Stop ID #%(stop_id)s),": "", + "End: %(location)s at %(time_date)s": "", + "(%(agencyId)s Stop ID #%(id)s),": "", + "\nView itinerary online:\n%(itinerary_link)s\n": "", + "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "", + "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", + "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", + "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "", + "The trip planner is taking way too long to process your request. Please try again later.": "", + "The request has errors that the server is not willing or able to process.": "", + "Origin is unknown. Can you be a bit more descriptive?": "", + "Destination is unknown. Can you be a bit more descriptive?": "", + "Both origin and destination are unknown. Can you be a bit more descriptive?": "", + "Both origin and destination are not wheelchair accessible": "", + "Origin is within a trivial distance of the destination.": "", + "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "", + "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "", + "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "", + "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "", + "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "", + "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "", + "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "", + "Set as Start Location": "", + "Set as End Location": "", + "Destination": "", + "Error %(error_id)d": "", + "No Trip Found": "", + "Your %(bike_share_name)s route": "", + "Your bike route": "", + "Walk to the %(bike_share_name)s dock.": "", + "Walk from the %(bike_share_name)s dock to your destination.": "", + "Your walk route": "", + "Your route using the scooter": "", + "Your driving route": "", + "north": "nord", + "northeast": "nord-est", + "east": "est", + "southeast": "sud-est", + "south": "sud", + "southwest": "sud-oest", + "west": "oest", + "northwest": "nord-oest", + "hard left": "gira completament a la esquerra", + "left": "gira a la esquerra", + "slight left": "gira lleugerament a la esquerra", + "continue": "", + "slight right": "gira lleugerament a la dreta", + "right": "gira a la dreta", + "hard right": "gira completament a la dreta", + "elevator": "", + "U-turn left": "", + "U-turn right": "", + "Walk": "A peu", + "Cycle": "Bicicleta", + "Car": "Cotxe", + "Bus": "AUTOBÚS", + "Subway": "METRO", + "Train": "Tren", + "Ferry": "BOT", + "Light Rail": "", + "Cable Car": "PONT PENJANT", + "Funicular": "FUNICULAR", + "Aerial Tram": "", + "Airplane": "", + "Bicycle rental station": "", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", + "Start on": "", + " heading ": "", + "to continue on": "per a continuar a", + "on to": "", + "first": "", + "second": "", + "third": "", + "fourth": "", + "fifth": "", + "sixth": "", + "seventh": "", + "eight": "", + "ninth": "", + "tenth": "", + "%d hr": "", + "%d hr_plural": "", + "%d min": "", + "%d min_plural": "", + "%d sec": "", + "%d sec_plural": "", + "OK": "OK", + "Minimize": "", + "Bring to front": "", + "Send to back": "", + "Route:": "", + "Variant:": "", + "Stop Finder": "", + "Feed": "Agency", + "By ID": "", + "By Name": "", + "Search": "", + "No Stops Found": "", + "Date": "Data", + "Find Stops": "", + "(No Stop Selected)": "", + "Block": "", + "Recenter": "", + "Viewer": "", + "Quick": "", + "Flat": "", + "Bike Friendly": "", + "B": "", + "F": "", + "Q": "", + "All Routes": "", + "Save": "", + "Close": "", + "Travel Options": "", + "Geocoder": "", + "Arrive": "Arribada a", + "Now": "", + "Wheelchair accessible trip:": "Viatge amb accessibilitat:", + "Show Filtered Itineraries:": "", + "Travel by": "Mode de viatge", + "Preferred Routes": "", + "Edit": "Editar", + "None": "", + "Weight": "", + "Banned routes": "", + "Use": "", + "My Own Bike": "", + "A Shared Bike": "", + "Plan Your Trip": "Planificar el viatge", + "Additional parameters": "", + " to _direction": "", + " to _bus_direction": "", + "Start_template": "", + "Depart_itinerary": "Sortida des de", + "depart_itinerary": "Sortida des de", + "Start_popup": "", + "Depart_tripoptions": "Sortida des de" +} diff --git a/application/src/client/classic-debug/js/otp/locale/de.json b/application/src/client/classic-debug/js/otp/locale/de.json index 5a0aa5316f4..56d08ab778a 100644 --- a/application/src/client/classic-debug/js/otp/locale/de.json +++ b/application/src/client/classic-debug/js/otp/locale/de.json @@ -1,238 +1,238 @@ { - "Transit": "ÖPNV", - "Bus Only": "nur Bus", - "Rail Only": "nur Bahn", - "Airplane Only": "", - "Transit, No Airplane": "", - "Bicycle Only": "Fahrrad", - "Bicycle & Transit": "ÖPNV und Fahrrad", - "Walk Only": "zu Fuß", - "Car Only": "", - "Taxi": "", - "Park and Ride": "Parken und Reisen", - "Ride and Kiss (Car Pickup)": "", - "Kiss and Ride (Car Dropoff)": "", - "Bike and Ride": "", - "Rented Bicycle": "Fahrradverleih", - "Transit & Rented Bicycle": "ÖPNV und Fahrradverleih", - "Rented Scooter": "", - "Transit & Rented Scooter": "ÖPNV und Fahrradverleih", - "Transit with flex access": "", - "Transit with flex egress": "", - "Transit with flex access and egress": "", - "Direct flex search": "", - "Recenter Map Here": "Karte hier zentrieren", - "Zoom In": "hineinzoomen", - "Zoom Out": "herauszoomen", - "Minimize all": "Alle Dialoge minimieren", - "Unminimize all": "Dialoge wiederanzeigen", - "Stop Viewer": "", - "Plan Trip": "", - "From Stop": "", - "To Stop": "", - "Routes Serving Stop": "", - "Bike Share Planner": "", - "Trip Options": "Einstellungen für Routensuche", - "PICK UP BIKE": "", - "ALTERNATE PICKUP": "", - "DROP OFF BIKE": "", - "ALTERNATE DROP OFF": "", - "BIKE STATION": "", - "Station:": "", - "%d bike available": "", - "%d bike available_plural": "", - "%d dock available": "", - "%d dock available_plural": "", - "Recommended Pick Up:": "", - "Bicycle rental": "Fahrradverleih", - "Recommended Drop Off:": "", - "Multimodal Trip Planner": "Multimodaler Routenplaner", - "Itineraries": "Routenvorschläge", - "This itinerary departs on a different day from the previous one": "", - "%d Itinerary Returned": "", - "%d Itinerary Returned_plural": "", - "Link to search": "Link für diese Suche erstellen", - "Previous Page": "Vorheriger", - "Next Page": "", - "CONTINUES AS": "Weiterfahren", - "%d min late": "%d min Verspätung", - "%d min late_plural": "%d min Verspätung", - "%d min early": "%d min zu früh", - "%d min early_plural": "%d min zu früh", - "on time": "pünktlich", - "This itinerary departs on a different day than the one searched for": "", - "Arrived at destination with a rented bicycle!": "", - "End": "Ankunft", - "Trip Summary": "", - "Travel": "Reise", - "Time": "Dauer", - "GenCost": "", - "Total Walk": "", - "Total Bike": "", - "Total drive": "", - "Elevation Gained": "", - "Elevation Lost": "", - "Transfers": "Umsteigepunkt", - "Fare": "Tarif", - "Valid": "Gültig bis", - "Link to Itinerary": "", - "Print": "drucken", - "Your Trip": "", - "Email": "", - "every %d min": "", - "every %d min_plural": "", - "Board at ": "", - "Stop": "", - "Time in transit": "", - "Route ID": "", - "Trip ID": "", - "Service Date": "", - "Trip Viewer": "", - "late as": "", - "Stay on board": "an Bord bleiben", - "Alight": "", - "at": "um", - "%(currency)s %(price)s": "", - "Start: %(location)s at %(time_date)s": "", - "Board": "", - "(%(agency_id)s Stop ID #%(stop_id)s),": "", - "End: %(location)s at %(time_date)s": "", - "(%(agencyId)s Stop ID #%(id)s),": "", - "\nView itinerary online:\n%(itinerary_link)s\n": "", - "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "", - "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", - "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", - "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "", - "The trip planner is taking way too long to process your request. Please try again later.": "", - "The request has errors that the server is not willing or able to process.": "", - "Origin is unknown. Can you be a bit more descriptive?": "", - "Destination is unknown. Can you be a bit more descriptive?": "", - "Both origin and destination are unknown. Can you be a bit more descriptive?": "", - "Both origin and destination are not wheelchair accessible": "", - "Origin is within a trivial distance of the destination.": "", - "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "", - "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "", - "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "", - "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "", - "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "", - "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "", - "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "", - "Set as Start Location": "", - "Set as End Location": "", - "Destination": "", - "Error %(error_id)d": "", - "No Trip Found": "", - "Your %(bike_share_name)s route": "", - "Your bike route": "", - "Walk to the %(bike_share_name)s dock.": "", - "Walk from the %(bike_share_name)s dock to your destination.": "", - "Your walk route": "", - "Your route using the scooter": "", - "Your driving route": "", - "north": "nord", - "northeast": "nordost", - "east": "ost", - "southeast": "südost", - "south": "süd", - "southwest": "südwest", - "west": "west", - "northwest": "nordwest", - "hard left": "scharf links", - "left": "links", - "slight left": "links halten", - "continue": "", - "slight right": "rechts halten", - "right": "rechts", - "hard right": "scharf rechts", - "elevator": "", - "U-turn left": "", - "U-turn right": "", - "Walk": "zu Fuß gehen", - "Cycle": "Fahrrad", - "Car": "Auto", - "Bus": "Bus", - "Subway": "U-Bahn", - "Train": "Bahn", - "Ferry": "Fähre", - "Light Rail": "", - "Cable Car": "Standseilbahn", - "Funicular": "Seilbahn", - "Aerial Tram": "", - "Airplane": "", - "Bicycle rental station": "Fahrradverleihstation", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", - "Start on": "", - " heading ": "", - "to continue on": "weiter auf", - "on to": "", - "first": "Erster", - "second": "", - "third": "", - "fourth": "", - "fifth": "", - "sixth": "", - "seventh": "", - "eight": "", - "ninth": "", - "tenth": "", - "%d hr": "", - "%d hr_plural": "", - "%d min": "", - "%d min_plural": "", - "%d sec": "", - "%d sec_plural": "", - "OK": "OK", - "Minimize": "Minimieren", - "Bring to front": "in den Vordergrund", - "Send to back": "in den Hintergrund", - "Route:": "", - "Variant:": "", - "Stop Finder": "", - "Feed": "Agency", - "By ID": "", - "By Name": "", - "Search": "", - "No Stops Found": "", - "Date": "Datum", - "Find Stops": "", - "(No Stop Selected)": "", - "Block": "", - "Recenter": "", - "Viewer": "", - "Quick": "Schnellste", - "Flat": "Flach", - "Bike Friendly": "Fahrradgeeignet", - "B": "F", - "F": "Fl", - "Q": "S", - "All Routes": "alle Routen", - "Save": "Speichern", - "Close": "Schließen", - "Travel Options": "Routeneinstellungen", - "Geocoder": "Geocoder", - "Arrive": "Ankunft", - "Now": "Jetzt", - "Wheelchair accessible trip:": "barrierefreie Route:", - "Show Filtered Itineraries:": "", - "Travel by": "Fortbewegungsart/Verkehrsmittel", - "Preferred Routes": "bevorzugte Routen", - "Edit": "anpassen", - "None": "keine", - "Weight": "Gewichtung", - "Banned routes": "ausgeschlossene Routen", - "Use": "", - "My Own Bike": "", - "A Shared Bike": "", - "Plan Your Trip": "Route berechnen", - "Additional parameters": "", - " to _direction": "", - " to _bus_direction": "", - "Start_template": "Abfahrt", - "Depart_itinerary": "Abfahrt", - "depart_itinerary": "Abfahrt", - "Start_popup": "Abfahrt", - "Depart_tripoptions": "Abfahrt" -} \ No newline at end of file + "Transit": "ÖPNV", + "Bus Only": "nur Bus", + "Rail Only": "nur Bahn", + "Airplane Only": "", + "Transit, No Airplane": "", + "Bicycle Only": "Fahrrad", + "Bicycle & Transit": "ÖPNV und Fahrrad", + "Walk Only": "zu Fuß", + "Car Only": "", + "Taxi": "", + "Park and Ride": "Parken und Reisen", + "Ride and Kiss (Car Pickup)": "", + "Kiss and Ride (Car Dropoff)": "", + "Bike and Ride": "", + "Rented Bicycle": "Fahrradverleih", + "Transit & Rented Bicycle": "ÖPNV und Fahrradverleih", + "Rented Scooter": "", + "Transit & Rented Scooter": "ÖPNV und Fahrradverleih", + "Transit with flex access": "", + "Transit with flex egress": "", + "Transit with flex access and egress": "", + "Direct flex search": "", + "Recenter Map Here": "Karte hier zentrieren", + "Zoom In": "hineinzoomen", + "Zoom Out": "herauszoomen", + "Minimize all": "Alle Dialoge minimieren", + "Unminimize all": "Dialoge wiederanzeigen", + "Stop Viewer": "", + "Plan Trip": "", + "From Stop": "", + "To Stop": "", + "Routes Serving Stop": "", + "Bike Share Planner": "", + "Trip Options": "Einstellungen für Routensuche", + "PICK UP BIKE": "", + "ALTERNATE PICKUP": "", + "DROP OFF BIKE": "", + "ALTERNATE DROP OFF": "", + "BIKE STATION": "", + "Station:": "", + "%d bike available": "", + "%d bike available_plural": "", + "%d dock available": "", + "%d dock available_plural": "", + "Recommended Pick Up:": "", + "Bicycle rental": "Fahrradverleih", + "Recommended Drop Off:": "", + "Multimodal Trip Planner": "Multimodaler Routenplaner", + "Itineraries": "Routenvorschläge", + "This itinerary departs on a different day from the previous one": "", + "%d Itinerary Returned": "", + "%d Itinerary Returned_plural": "", + "Link to search": "Link für diese Suche erstellen", + "Previous Page": "Vorheriger", + "Next Page": "", + "CONTINUES AS": "Weiterfahren", + "%d min late": "%d min Verspätung", + "%d min late_plural": "%d min Verspätung", + "%d min early": "%d min zu früh", + "%d min early_plural": "%d min zu früh", + "on time": "pünktlich", + "This itinerary departs on a different day than the one searched for": "", + "Arrived at destination with a rented bicycle!": "", + "End": "Ankunft", + "Trip Summary": "", + "Travel": "Reise", + "Time": "Dauer", + "GenCost": "", + "Total Walk": "", + "Total Bike": "", + "Total drive": "", + "Elevation Gained": "", + "Elevation Lost": "", + "Transfers": "Umsteigepunkt", + "Fare": "Tarif", + "Valid": "Gültig bis", + "Link to Itinerary": "", + "Print": "drucken", + "Your Trip": "", + "Email": "", + "every %d min": "", + "every %d min_plural": "", + "Board at ": "", + "Stop": "", + "Time in transit": "", + "Route ID": "", + "Trip ID": "", + "Service Date": "", + "Trip Viewer": "", + "late as": "", + "Stay on board": "an Bord bleiben", + "Alight": "", + "at": "um", + "%(currency)s %(price)s": "", + "Start: %(location)s at %(time_date)s": "", + "Board": "", + "(%(agency_id)s Stop ID #%(stop_id)s),": "", + "End: %(location)s at %(time_date)s": "", + "(%(agencyId)s Stop ID #%(id)s),": "", + "\nView itinerary online:\n%(itinerary_link)s\n": "", + "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "", + "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", + "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", + "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "", + "The trip planner is taking way too long to process your request. Please try again later.": "", + "The request has errors that the server is not willing or able to process.": "", + "Origin is unknown. Can you be a bit more descriptive?": "", + "Destination is unknown. Can you be a bit more descriptive?": "", + "Both origin and destination are unknown. Can you be a bit more descriptive?": "", + "Both origin and destination are not wheelchair accessible": "", + "Origin is within a trivial distance of the destination.": "", + "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "", + "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "", + "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "", + "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "", + "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "", + "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "", + "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "", + "Set as Start Location": "", + "Set as End Location": "", + "Destination": "", + "Error %(error_id)d": "", + "No Trip Found": "", + "Your %(bike_share_name)s route": "", + "Your bike route": "", + "Walk to the %(bike_share_name)s dock.": "", + "Walk from the %(bike_share_name)s dock to your destination.": "", + "Your walk route": "", + "Your route using the scooter": "", + "Your driving route": "", + "north": "nord", + "northeast": "nordost", + "east": "ost", + "southeast": "südost", + "south": "süd", + "southwest": "südwest", + "west": "west", + "northwest": "nordwest", + "hard left": "scharf links", + "left": "links", + "slight left": "links halten", + "continue": "", + "slight right": "rechts halten", + "right": "rechts", + "hard right": "scharf rechts", + "elevator": "", + "U-turn left": "", + "U-turn right": "", + "Walk": "zu Fuß gehen", + "Cycle": "Fahrrad", + "Car": "Auto", + "Bus": "Bus", + "Subway": "U-Bahn", + "Train": "Bahn", + "Ferry": "Fähre", + "Light Rail": "", + "Cable Car": "Standseilbahn", + "Funicular": "Seilbahn", + "Aerial Tram": "", + "Airplane": "", + "Bicycle rental station": "Fahrradverleihstation", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "", + "Start on": "", + " heading ": "", + "to continue on": "weiter auf", + "on to": "", + "first": "Erster", + "second": "", + "third": "", + "fourth": "", + "fifth": "", + "sixth": "", + "seventh": "", + "eight": "", + "ninth": "", + "tenth": "", + "%d hr": "", + "%d hr_plural": "", + "%d min": "", + "%d min_plural": "", + "%d sec": "", + "%d sec_plural": "", + "OK": "OK", + "Minimize": "Minimieren", + "Bring to front": "in den Vordergrund", + "Send to back": "in den Hintergrund", + "Route:": "", + "Variant:": "", + "Stop Finder": "", + "Feed": "Agency", + "By ID": "", + "By Name": "", + "Search": "", + "No Stops Found": "", + "Date": "Datum", + "Find Stops": "", + "(No Stop Selected)": "", + "Block": "", + "Recenter": "", + "Viewer": "", + "Quick": "Schnellste", + "Flat": "Flach", + "Bike Friendly": "Fahrradgeeignet", + "B": "F", + "F": "Fl", + "Q": "S", + "All Routes": "alle Routen", + "Save": "Speichern", + "Close": "Schließen", + "Travel Options": "Routeneinstellungen", + "Geocoder": "Geocoder", + "Arrive": "Ankunft", + "Now": "Jetzt", + "Wheelchair accessible trip:": "barrierefreie Route:", + "Show Filtered Itineraries:": "", + "Travel by": "Fortbewegungsart/Verkehrsmittel", + "Preferred Routes": "bevorzugte Routen", + "Edit": "anpassen", + "None": "keine", + "Weight": "Gewichtung", + "Banned routes": "ausgeschlossene Routen", + "Use": "", + "My Own Bike": "", + "A Shared Bike": "", + "Plan Your Trip": "Route berechnen", + "Additional parameters": "", + " to _direction": "", + " to _bus_direction": "", + "Start_template": "Abfahrt", + "Depart_itinerary": "Abfahrt", + "depart_itinerary": "Abfahrt", + "Start_popup": "Abfahrt", + "Depart_tripoptions": "Abfahrt" +} diff --git a/application/src/client/classic-debug/js/otp/locale/en.json b/application/src/client/classic-debug/js/otp/locale/en.json index 51e5565997c..a4d3f1efa9d 100644 --- a/application/src/client/classic-debug/js/otp/locale/en.json +++ b/application/src/client/classic-debug/js/otp/locale/en.json @@ -1,238 +1,238 @@ { - "Transit": "Transit", - "Bus Only": "Bus Only", - "Rail Only": "Rail Only", - "Airplane Only": "Airplane Only", - "Transit, No Airplane": "", - "Bicycle Only": "Bicycle Only", - "Bicycle & Transit": "Bicycle & Transit", - "Walk Only": "Walk Only", - "Car Only": "Car Only", - "Taxi": "", - "Park and Ride": "Park and Ride", - "Ride and Kiss (Car Pickup)": "", - "Kiss and Ride (Car Dropoff)": "", - "Bike and Ride": "Bike and Ride", - "Rented Bicycle": "Rented Bicycle", - "Transit & Rented Bicycle": "Transit & Rented Bicycle", - "Rented Scooter": "", - "Transit & Rented Scooter": "Transit & Rented Bicycle", - "Transit with flex access": "", - "Transit with flex egress": "", - "Transit with flex access and egress": "", - "Direct flex search": "", - "Recenter Map Here": "Recenter Map Here", - "Zoom In": "Zoom In", - "Zoom Out": "Zoom Out", - "Minimize all": "Minimize all", - "Unminimize all": "Unminimize all", - "Stop Viewer": "Stop Viewer", - "Plan Trip": "Plan Trip", - "From Stop": "From Stop", - "To Stop": "To Stop", - "Routes Serving Stop": "Routes Serving Stop", - "Bike Share Planner": "Bike Share Planner", - "Trip Options": "Trip Options", - "PICK UP BIKE": "PICK UP BIKE", - "ALTERNATE PICKUP": "ALTERNATE PICKUP", - "DROP OFF BIKE": "DROP OFF BIKE", - "ALTERNATE DROP OFF": "ALTERNATE DROP OFF", - "BIKE STATION": "BIKE STATION", - "Station:": "Station:", - "%d bike available": "%d bike available", - "%d bike available_plural": "%d bikes available", - "%d dock available": "%d dock available", - "%d dock available_plural": "%d docks available", - "Recommended Pick Up:": "Recommended Pick Up:", - "Bicycle rental": "Bicycle rental", - "Recommended Drop Off:": "Recommended Drop Off:", - "Multimodal Trip Planner": "Multimodal Trip Planner", - "Itineraries": "Itineraries", - "This itinerary departs on a different day from the previous one": "", - "%d Itinerary Returned": "%d Itinerary Returned", - "%d Itinerary Returned_plural": "%d Itineraries Returned", - "Link to search": "Link to search", - "Previous Page": "Previous", - "Next Page": "", - "CONTINUES AS": "CONTINUES AS", - "%d min late": "%d min late", - "%d min late_plural": "%d mins late", - "%d min early": "%d min early", - "%d min early_plural": "%d mins early", - "on time": "on time", - "This itinerary departs on a different day than the one searched for": "", - "Arrived at destination with a rented bicycle!": "", - "End": "End", - "Trip Summary": "Trip Summary", - "Travel": "Travel", - "Time": "Time", - "GenCost": "Weight/Cost", - "Total Walk": "Total Walk", - "Total Bike": "Total Bike", - "Total drive": "Total drive", - "Elevation Gained": "", - "Elevation Lost": "Elevation Lost", - "Transfers": "Transfers", - "Fare": "Fare", - "Valid": "Valid", - "Link to Itinerary": "Link to Itinerary", - "Print": "Print", - "Your Trip": "Your Trip", - "Email": "Email", - "every %d min": "every %d min", - "every %d min_plural": "every %d mins", - "Board at ": "Board at ", - "Stop": "Stop", - "Time in transit": "Time in transit", - "Route ID": "", - "Trip ID": "", - "Service Date": "", - "Trip Viewer": "Trip Viewer", - "late as": "late as", - "Stay on board": "Stay on board", - "Alight": "Alight", - "at": "at", - "%(currency)s %(price)s": "%(currency)s %(price)s", - "Start: %(location)s at %(time_date)s": "Start: %(location)s at %(time_date)s", - "Board": "Board", - "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s Stop ID #%(stop_id)s),", - "End: %(location)s at %(time_date)s": "End: %(location)s at %(time_date)s", - "(%(agencyId)s Stop ID #%(id)s),": "", - "\nView itinerary online:\n%(itinerary_link)s\n": "\nView itinerary online:\n%(itinerary_link)s\n", - "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "We're sorry. The trip planner is temporarily unavailable. Please try again later.", - "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "Trip is not possible. You might be trying to plan a trip outside the map data boundary.", - "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", - "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.", - "The trip planner is taking way too long to process your request. Please try again later.": "The trip planner is taking way too long to process your request. Please try again later.", - "The request has errors that the server is not willing or able to process.": "The request has errors that the server is not willing or able to process.", - "Origin is unknown. Can you be a bit more descriptive?": "Origin is unknown. Can you be a bit more descriptive?", - "Destination is unknown. Can you be a bit more descriptive?": "Destination is unknown. Can you be a bit more descriptive?", - "Both origin and destination are unknown. Can you be a bit more descriptive?": "Both origin and destination are unknown. Can you be a bit more descriptive?", - "Both origin and destination are not wheelchair accessible": "Both origin and destination are not wheelchair accessible", - "Origin is within a trivial distance of the destination.": "Origin is within a trivial distance of the destination.", - "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.", - "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.", - "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Both origin and destination are ambiguous. Please select from the following options, or be more specific.", - "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are", - "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1", - "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE", - "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set", - "Set as Start Location": "Set as Start Location", - "Set as End Location": "Set as End Location", - "Destination": "Destination", - "Error %(error_id)d": "Error %(error_id)d", - "No Trip Found": "No Trip Found", - "Your %(bike_share_name)s route": "Your %(bike_share_name)s route", - "Your bike route": "Your bike route", - "Walk to the %(bike_share_name)s dock.": "Walk to the %(bike_share_name)s dock.", - "Walk from the %(bike_share_name)s dock to your destination.": "Walk from the %(bike_share_name)s dock to your destination.", - "Your walk route": "Your walk route", - "Your route using the scooter": "", - "Your driving route": "Your bike route", - "north": "north", - "northeast": "northeast", - "east": "east", - "southeast": "southeast", - "south": "south", - "southwest": "southwest", - "west": "west", - "northwest": "northwest", - "hard left": "hard left", - "left": "left", - "slight left": "slight left", - "continue": "continue", - "slight right": "slight right", - "right": "right", - "hard right": "hard right", - "elevator": "elevator", - "U-turn left": "U-turn left", - "U-turn right": "U-turn right", - "Walk": "Walk", - "Cycle": "Cycle", - "Car": "Car", - "Bus": "Bus", - "Subway": "Subway", - "Train": "Train", - "Ferry": "Ferry", - "Light Rail": "Light Rail", - "Cable Car": "Cable Car", - "Funicular": "Funicular", - "Aerial Tram": "Aerial Tram", - "Airplane": "", - "Bicycle rental station": "Bicycle rental station", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s", - "Start on": "Start on", - " heading ": " heading ", - "to continue on": "to continue on", - "on to": "on to", - "first": "first", - "second": "second", - "third": "third", - "fourth": "fourth", - "fifth": "fifth", - "sixth": "sixth", - "seventh": "seventh", - "eight": "eight", - "ninth": "ninth", - "tenth": "tenth", - "%d hr": "%d hr", - "%d hr_plural": "%d hrs", - "%d min": "%d min", - "%d min_plural": "%d mins", - "%d sec": "%d sec", - "%d sec_plural": "%d secs", - "OK": "OK", - "Minimize": "Minimize", - "Bring to front": "Bring to front", - "Send to back": "Send to back", - "Route:": "Route:", - "Variant:": "Variant:", - "Stop Finder": "Stop Finder", - "Feed": "Agency", - "By ID": "By ID", - "By Name": "By Name", - "Search": "Search", - "No Stops Found": "No Stops Found", - "Date": "Date", - "Find Stops": "Find Stops", - "(No Stop Selected)": "(No Stop Selected)", - "Block": "Block", - "Recenter": "Recenter", - "Viewer": "Viewer", - "Quick": "Quick", - "Flat": "Flat", - "Bike Friendly": "Bike Friendly", - "B": "B", - "F": "F", - "Q": "Q", - "All Routes": "All Routes", - "Save": "Save", - "Close": "Close", - "Travel Options": "Travel Options", - "Geocoder": "Geocoder", - "Arrive": "Arrive", - "Now": "Now", - "Wheelchair accessible trip:": "Wheelchair accessible trip:", - "Show Filtered Itineraries:": "", - "Travel by": "Travel by", - "Preferred Routes": "Preferred Routes", - "Edit": "Edit", - "None": "None", - "Weight": "Weight", - "Banned routes": "Banned routes", - "Use": "Use", - "My Own Bike": "My Own Bike", - "A Shared Bike": "A Shared Bike", - "Plan Your Trip": "Plan Your Trip", - "Additional parameters": "", - " to _direction": " to ", - " to _bus_direction": " to ", - "Start_template": "Start", - "Depart_itinerary": "Depart", - "depart_itinerary": "depart", - "Start_popup": "Start", - "Depart_tripoptions": "Depart" -} \ No newline at end of file + "Transit": "Transit", + "Bus Only": "Bus Only", + "Rail Only": "Rail Only", + "Airplane Only": "Airplane Only", + "Transit, No Airplane": "", + "Bicycle Only": "Bicycle Only", + "Bicycle & Transit": "Bicycle & Transit", + "Walk Only": "Walk Only", + "Car Only": "Car Only", + "Taxi": "", + "Park and Ride": "Park and Ride", + "Ride and Kiss (Car Pickup)": "", + "Kiss and Ride (Car Dropoff)": "", + "Bike and Ride": "Bike and Ride", + "Rented Bicycle": "Rented Bicycle", + "Transit & Rented Bicycle": "Transit & Rented Bicycle", + "Rented Scooter": "", + "Transit & Rented Scooter": "Transit & Rented Bicycle", + "Transit with flex access": "", + "Transit with flex egress": "", + "Transit with flex access and egress": "", + "Direct flex search": "", + "Recenter Map Here": "Recenter Map Here", + "Zoom In": "Zoom In", + "Zoom Out": "Zoom Out", + "Minimize all": "Minimize all", + "Unminimize all": "Unminimize all", + "Stop Viewer": "Stop Viewer", + "Plan Trip": "Plan Trip", + "From Stop": "From Stop", + "To Stop": "To Stop", + "Routes Serving Stop": "Routes Serving Stop", + "Bike Share Planner": "Bike Share Planner", + "Trip Options": "Trip Options", + "PICK UP BIKE": "PICK UP BIKE", + "ALTERNATE PICKUP": "ALTERNATE PICKUP", + "DROP OFF BIKE": "DROP OFF BIKE", + "ALTERNATE DROP OFF": "ALTERNATE DROP OFF", + "BIKE STATION": "BIKE STATION", + "Station:": "Station:", + "%d bike available": "%d bike available", + "%d bike available_plural": "%d bikes available", + "%d dock available": "%d dock available", + "%d dock available_plural": "%d docks available", + "Recommended Pick Up:": "Recommended Pick Up:", + "Bicycle rental": "Bicycle rental", + "Recommended Drop Off:": "Recommended Drop Off:", + "Multimodal Trip Planner": "Multimodal Trip Planner", + "Itineraries": "Itineraries", + "This itinerary departs on a different day from the previous one": "", + "%d Itinerary Returned": "%d Itinerary Returned", + "%d Itinerary Returned_plural": "%d Itineraries Returned", + "Link to search": "Link to search", + "Previous Page": "Previous", + "Next Page": "", + "CONTINUES AS": "CONTINUES AS", + "%d min late": "%d min late", + "%d min late_plural": "%d mins late", + "%d min early": "%d min early", + "%d min early_plural": "%d mins early", + "on time": "on time", + "This itinerary departs on a different day than the one searched for": "", + "Arrived at destination with a rented bicycle!": "", + "End": "End", + "Trip Summary": "Trip Summary", + "Travel": "Travel", + "Time": "Time", + "GenCost": "Weight/Cost", + "Total Walk": "Total Walk", + "Total Bike": "Total Bike", + "Total drive": "Total drive", + "Elevation Gained": "", + "Elevation Lost": "Elevation Lost", + "Transfers": "Transfers", + "Fare": "Fare", + "Valid": "Valid", + "Link to Itinerary": "Link to Itinerary", + "Print": "Print", + "Your Trip": "Your Trip", + "Email": "Email", + "every %d min": "every %d min", + "every %d min_plural": "every %d mins", + "Board at ": "Board at ", + "Stop": "Stop", + "Time in transit": "Time in transit", + "Route ID": "", + "Trip ID": "", + "Service Date": "", + "Trip Viewer": "Trip Viewer", + "late as": "late as", + "Stay on board": "Stay on board", + "Alight": "Alight", + "at": "at", + "%(currency)s %(price)s": "%(currency)s %(price)s", + "Start: %(location)s at %(time_date)s": "Start: %(location)s at %(time_date)s", + "Board": "Board", + "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s Stop ID #%(stop_id)s),", + "End: %(location)s at %(time_date)s": "End: %(location)s at %(time_date)s", + "(%(agencyId)s Stop ID #%(id)s),": "", + "\nView itinerary online:\n%(itinerary_link)s\n": "\nView itinerary online:\n%(itinerary_link)s\n", + "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "We're sorry. The trip planner is temporarily unavailable. Please try again later.", + "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "Trip is not possible. You might be trying to plan a trip outside the map data boundary.", + "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", + "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.", + "The trip planner is taking way too long to process your request. Please try again later.": "The trip planner is taking way too long to process your request. Please try again later.", + "The request has errors that the server is not willing or able to process.": "The request has errors that the server is not willing or able to process.", + "Origin is unknown. Can you be a bit more descriptive?": "Origin is unknown. Can you be a bit more descriptive?", + "Destination is unknown. Can you be a bit more descriptive?": "Destination is unknown. Can you be a bit more descriptive?", + "Both origin and destination are unknown. Can you be a bit more descriptive?": "Both origin and destination are unknown. Can you be a bit more descriptive?", + "Both origin and destination are not wheelchair accessible": "Both origin and destination are not wheelchair accessible", + "Origin is within a trivial distance of the destination.": "Origin is within a trivial distance of the destination.", + "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.", + "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.", + "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Both origin and destination are ambiguous. Please select from the following options, or be more specific.", + "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are", + "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1", + "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE", + "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set", + "Set as Start Location": "Set as Start Location", + "Set as End Location": "Set as End Location", + "Destination": "Destination", + "Error %(error_id)d": "Error %(error_id)d", + "No Trip Found": "No Trip Found", + "Your %(bike_share_name)s route": "Your %(bike_share_name)s route", + "Your bike route": "Your bike route", + "Walk to the %(bike_share_name)s dock.": "Walk to the %(bike_share_name)s dock.", + "Walk from the %(bike_share_name)s dock to your destination.": "Walk from the %(bike_share_name)s dock to your destination.", + "Your walk route": "Your walk route", + "Your route using the scooter": "", + "Your driving route": "Your bike route", + "north": "north", + "northeast": "northeast", + "east": "east", + "southeast": "southeast", + "south": "south", + "southwest": "southwest", + "west": "west", + "northwest": "northwest", + "hard left": "hard left", + "left": "left", + "slight left": "slight left", + "continue": "continue", + "slight right": "slight right", + "right": "right", + "hard right": "hard right", + "elevator": "elevator", + "U-turn left": "U-turn left", + "U-turn right": "U-turn right", + "Walk": "Walk", + "Cycle": "Cycle", + "Car": "Car", + "Bus": "Bus", + "Subway": "Subway", + "Train": "Train", + "Ferry": "Ferry", + "Light Rail": "Light Rail", + "Cable Car": "Cable Car", + "Funicular": "Funicular", + "Aerial Tram": "Aerial Tram", + "Airplane": "", + "Bicycle rental station": "Bicycle rental station", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s", + "Start on": "Start on", + " heading ": " heading ", + "to continue on": "to continue on", + "on to": "on to", + "first": "first", + "second": "second", + "third": "third", + "fourth": "fourth", + "fifth": "fifth", + "sixth": "sixth", + "seventh": "seventh", + "eight": "eight", + "ninth": "ninth", + "tenth": "tenth", + "%d hr": "%d hr", + "%d hr_plural": "%d hrs", + "%d min": "%d min", + "%d min_plural": "%d mins", + "%d sec": "%d sec", + "%d sec_plural": "%d secs", + "OK": "OK", + "Minimize": "Minimize", + "Bring to front": "Bring to front", + "Send to back": "Send to back", + "Route:": "Route:", + "Variant:": "Variant:", + "Stop Finder": "Stop Finder", + "Feed": "Agency", + "By ID": "By ID", + "By Name": "By Name", + "Search": "Search", + "No Stops Found": "No Stops Found", + "Date": "Date", + "Find Stops": "Find Stops", + "(No Stop Selected)": "(No Stop Selected)", + "Block": "Block", + "Recenter": "Recenter", + "Viewer": "Viewer", + "Quick": "Quick", + "Flat": "Flat", + "Bike Friendly": "Bike Friendly", + "B": "B", + "F": "F", + "Q": "Q", + "All Routes": "All Routes", + "Save": "Save", + "Close": "Close", + "Travel Options": "Travel Options", + "Geocoder": "Geocoder", + "Arrive": "Arrive", + "Now": "Now", + "Wheelchair accessible trip:": "Wheelchair accessible trip:", + "Show Filtered Itineraries:": "", + "Travel by": "Travel by", + "Preferred Routes": "Preferred Routes", + "Edit": "Edit", + "None": "None", + "Weight": "Weight", + "Banned routes": "Banned routes", + "Use": "Use", + "My Own Bike": "My Own Bike", + "A Shared Bike": "A Shared Bike", + "Plan Your Trip": "Plan Your Trip", + "Additional parameters": "", + " to _direction": " to ", + " to _bus_direction": " to ", + "Start_template": "Start", + "Depart_itinerary": "Depart", + "depart_itinerary": "depart", + "Start_popup": "Start", + "Depart_tripoptions": "Depart" +} diff --git a/application/src/client/classic-debug/js/otp/locale/es.json b/application/src/client/classic-debug/js/otp/locale/es.json index fca9c112411..7909780d938 100644 --- a/application/src/client/classic-debug/js/otp/locale/es.json +++ b/application/src/client/classic-debug/js/otp/locale/es.json @@ -1,238 +1,238 @@ { - "Transit": "Transporte Público", - "Bus Only": "Sólo autobús", - "Rail Only": "Sólo tren", - "Airplane Only": "", - "Transit, No Airplane": "", - "Bicycle Only": "Sólo bicicletas", - "Bicycle & Transit": "Bicicleta y Transporte Público", - "Walk Only": "Sólo a pie", - "Car Only": "Comienza en", - "Taxi": "", - "Park and Ride": "Aparcar y Transporte Público", - "Ride and Kiss (Car Pickup)": "", - "Kiss and Ride (Car Dropoff)": "", - "Bike and Ride": "Bicicleta y Transporte Público", - "Rented Bicycle": "Alquiler bicicleta", - "Transit & Rented Bicycle": "Transporte Público y Alquiler de bicicleta", - "Rented Scooter": "", - "Transit & Rented Scooter": "Transporte Público y Alquiler de bicicleta", - "Transit with flex access": "", - "Transit with flex egress": "", - "Transit with flex access and egress": "", - "Direct flex search": "", - "Recenter Map Here": "Centrar Mapa Aquí", - "Zoom In": "Acercar", - "Zoom Out": "Alejar", - "Minimize all": "Minimizar todo", - "Unminimize all": "Ampliar todo", - "Stop Viewer": "Visor de parada", - "Plan Trip": "Calcular viaje", - "From Stop": "Desde parada", - "To Stop": "Hasta parada", - "Routes Serving Stop": "Rutas por la parada", - "Bike Share Planner": "Planificador de Bicicleta Compartida", - "Trip Options": "Opciones de viaje", - "PICK UP BIKE": "Recogida de bicicleta", - "ALTERNATE PICKUP": "Recogida alternativa", - "DROP OFF BIKE": "DEVOLUCIÓN DE BICICLETA", - "ALTERNATE DROP OFF": "DEVOLUCIÓN DE BICICLETA ALTERNATIVA", - "BIKE STATION": "Estación de bicicleta", - "Station:": "Estación:", - "%d bike available": "%d bike available", - "%d bike available_plural": "%d bikes available", - "%d dock available": "%d dock available", - "%d dock available_plural": "%d docks available", - "Recommended Pick Up:": "Recogida recomendada:", - "Bicycle rental": "alquiler de bicicleta", - "Recommended Drop Off:": "Devolución recomendada:", - "Multimodal Trip Planner": "Planificador multimodo", - "Itineraries": "Rutas", - "This itinerary departs on a different day from the previous one": "", - "%d Itinerary Returned": "%d Ruta encontrada", - "%d Itinerary Returned_plural": "%d Rutas encontradas", - "Link to search": "Enlace a búsqueda", - "Previous Page": "Anterior", - "Next Page": "", - "CONTINUES AS": "CONTINÚA COMO", - "%d min late": "%d min tarde", - "%d min late_plural": "%d mins tarde", - "%d min early": "%d min early", - "%d min early_plural": "%d mins early", - "on time": "puntual", - "This itinerary departs on a different day than the one searched for": "", - "Arrived at destination with a rented bicycle!": "", - "End": "Fin", - "Trip Summary": "Resumen de la ruta", - "Travel": "Viaje", - "Time": "Duración", - "GenCost": "", - "Total Walk": "Total a pie", - "Total Bike": "Total en bicicleta", - "Total drive": "", - "Elevation Gained": "", - "Elevation Lost": "", - "Transfers": "Transbordos", - "Fare": "Ticket", - "Valid": "Válido", - "Link to Itinerary": "Enlace a ruta", - "Print": "Imprimir", - "Your Trip": "Tu Viaje", - "Email": "Email", - "every %d min": "cada %d min", - "every %d min_plural": "cada %d mins", - "Board at ": "Desde ", - "Stop": "Parada", - "Time in transit": "Durante", - "Route ID": "", - "Trip ID": "", - "Service Date": "", - "Trip Viewer": "Visor de ruta", - "late as": "no más tarde que", - "Stay on board": "mantente montado", - "Alight": "hasta ", - "at": "en", - "%(currency)s %(price)s": "%(currency)s %(price)s", - "Start: %(location)s at %(time_date)s": "Comienza: %(location)s a las %(time_date)s", - "Board": "Toma", - "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s ID Parada #%(stop_id)s),", - "End: %(location)s at %(time_date)s": "Finaliza: %(location)s a las %(time_date)s", - "(%(agencyId)s Stop ID #%(id)s),": "", - "\nView itinerary online:\n%(itinerary_link)s\n": "\nVer ruta online:\n%(itinerary_link)s\n", - "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Lo sentimos. El planificador de ruta está fuera de servicio temporalmente. Inténtelo más tarde.", - "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", - "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", - "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Tiempos no disponibles. La información disponible podría no ser válida para la fecha actual o no hay rutas disponibles para tu viaje.", - "The trip planner is taking way too long to process your request. Please try again later.": "El planificador de rutas está tardando demasiado. Por favor, inténtalo más tarde.", - "The request has errors that the server is not willing or able to process.": "Error en la petición, el server no puede procesar la información.", - "Origin is unknown. Can you be a bit more descriptive?": "Origen desconocido. ¿Puedes ser un poco más descriptivo?", - "Destination is unknown. Can you be a bit more descriptive?": "Destino desconocido. ¿Puedes ser un poco más descriptivo?", - "Both origin and destination are unknown. Can you be a bit more descriptive?": "Origen y destino desconocidos ¿Puedes ser un poco más descriptivo?", - "Both origin and destination are not wheelchair accessible": "Origen y destino no son accesibles a silla de ruedas.", - "Origin is within a trivial distance of the destination.": "Origen y destino están demasiado cerca.", - "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "El planificador de rutas no está seguro de tu origen. Por favor, seleccione una de las siguientes opciones o introduzca un origen más exacto.", - "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "El planificador de rutas no está seguro de tu destino. Por favor, seleccione una de las siguientes opciones o introduzca un destino más exacto.", - "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Origen y destino son ambiguos. Por favor, seleccione una de las siguientes opciones o introduzca un destino más exacto.", - "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "El triángulo de Seguridad, Llano y Tiempo debe ser seleccionado si está disponible.", - "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "El valor del triángulo de Seguridad, Llano y Tiempo debe sumar 1.", - "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Si el triángulo de Seguridad, Llano y Tiempo está disponible, debe ser un TRIÁNGULO.", - "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Si el tipo de optimización es triángulo, los factores de Seguridad, Llano y Tiempo tienen que estar seleccionados.", - "Set as Start Location": "Ruta desde aquí", - "Set as End Location": "Ruta hacia aquí", - "Destination": "Fin", - "Error %(error_id)d": "Error %(error_id)d", - "No Trip Found": "Viaje no encontrado", - "Your %(bike_share_name)s route": "Tu ruta %(bike_share_name)s", - "Your bike route": "Tu ruta en bicicleta", - "Walk to the %(bike_share_name)s dock.": "Camina hacia la estación %(bike_share_name)s.", - "Walk from the %(bike_share_name)s dock to your destination.": "Camina desde la estación %(bike_share_name)s hacia tu destino.", - "Your walk route": "Tu ruta a pie", - "Your route using the scooter": "", - "Your driving route": "Tu ruta en bicicleta", - "north": "Norte", - "northeast": "Nordeste", - "east": "Este", - "southeast": "Sureste", - "south": "Sur", - "southwest": "Suroeste", - "west": "Oeste", - "northwest": "Noroeste", - "hard left": "Izquierda fuerte", - "left": "izquierda", - "slight left": "Izquierda suave", - "continue": "continúa", - "slight right": "Derecha suave", - "right": "derecha", - "hard right": "Derecha fuerte", - "elevator": "ascensor", - "U-turn left": "Gira a la izquierda", - "U-turn right": "Gira a la derecha", - "Walk": "Camina", - "Cycle": "Bicicleta", - "Car": "Coche", - "Bus": "Autobús", - "Subway": "Metro", - "Train": "Tren", - "Ferry": "Barco", - "Light Rail": "Tranvía", - "Cable Car": "Bus Tranvía", - "Funicular": "Funicular", - "Aerial Tram": "Funicular", - "Airplane": "", - "Bicycle rental station": "estación de alquiler de bicicleta", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Toma la rotonda sentido contrario a las agujas del reloj hasta la %(ordinal_exit_number)s salida dirección %(street_name)s", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Toma la rotonda sentido contrario a las agujas del reloj hasta la %(ordinal_exit_number)s salida hacia %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Toma la rotonda sentido a las agujas del reloj hasta la %(ordinal_exit_number)s salida dirección %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Toma la rotonda sentido a las agujas del reloj hasta la %(ordinal_exit_number)s salida hacia %(street_name)s", - "Start on": "Comienza en", - " heading ": " dirección ", - "to continue on": "hacia", - "on to": "dirección", - "first": "primera", - "second": "segunda", - "third": "tercera", - "fourth": "cuarta", - "fifth": "quinta", - "sixth": "sexta", - "seventh": "séptima", - "eight": "octava", - "ninth": "novena", - "tenth": "décima", - "%d hr": "%d hr", - "%d hr_plural": "%d hrs", - "%d min": "%d min", - "%d min_plural": "%d mins", - "%d sec": "%d seg", - "%d sec_plural": "%d segs", - "OK": "Vale", - "Minimize": "Minimizar", - "Bring to front": "Traer al frente", - "Send to back": "Mandar al fondo", - "Route:": "Línea:", - "Variant:": "Variante:", - "Stop Finder": "Buscador de paradas", - "Feed": "Compañía", - "By ID": "Número:", - "By Name": "Nombre:", - "Search": "Buscar", - "No Stops Found": "Paradas no encontradas", - "Date": "Fecha", - "Find Stops": "Buscar paradas", - "(No Stop Selected)": "(Sin parada seleccionada)", - "Block": "Transbordo sin cambio de vehículo", - "Recenter": "Centrar", - "Viewer": "Visor", - "Quick": "Rápido", - "Flat": "Sin cuestas", - "Bike Friendly": "Adaptado a bicicleta", - "B": "B", - "F": "P", - "Q": "R", - "All Routes": "Todas las líneas", - "Save": "Guardar", - "Close": "Cerrar", - "Travel Options": "Opciones de viaje", - "Geocoder": "Geocoder", - "Arrive": "Llegar a las", - "Now": "Ahora", - "Wheelchair accessible trip:": "Ruta accesible a silla de ruedas:", - "Show Filtered Itineraries:": "", - "Travel by": "Viajar en", - "Preferred Routes": "Líneas favoritas", - "Edit": "Editar", - "None": "Niguna", - "Weight": "Prioridad", - "Banned routes": "Líneas prohibidas", - "Use": "Usar", - "My Own Bike": "Mi propia bicileta", - "A Shared Bike": "Una bicicleta compartida", - "Plan Your Trip": "Calcular Viaje", - "Additional parameters": "", - " to _direction": " dirección ", - " to _bus_direction": " dirección ", - "Start_template": "Inicio", - "Depart_itinerary": "Comienza", - "depart_itinerary": "Comienza", - "Start_popup": "Inicio", - "Depart_tripoptions": "Salir a las" -} \ No newline at end of file + "Transit": "Transporte Público", + "Bus Only": "Sólo autobús", + "Rail Only": "Sólo tren", + "Airplane Only": "", + "Transit, No Airplane": "", + "Bicycle Only": "Sólo bicicletas", + "Bicycle & Transit": "Bicicleta y Transporte Público", + "Walk Only": "Sólo a pie", + "Car Only": "Comienza en", + "Taxi": "", + "Park and Ride": "Aparcar y Transporte Público", + "Ride and Kiss (Car Pickup)": "", + "Kiss and Ride (Car Dropoff)": "", + "Bike and Ride": "Bicicleta y Transporte Público", + "Rented Bicycle": "Alquiler bicicleta", + "Transit & Rented Bicycle": "Transporte Público y Alquiler de bicicleta", + "Rented Scooter": "", + "Transit & Rented Scooter": "Transporte Público y Alquiler de bicicleta", + "Transit with flex access": "", + "Transit with flex egress": "", + "Transit with flex access and egress": "", + "Direct flex search": "", + "Recenter Map Here": "Centrar Mapa Aquí", + "Zoom In": "Acercar", + "Zoom Out": "Alejar", + "Minimize all": "Minimizar todo", + "Unminimize all": "Ampliar todo", + "Stop Viewer": "Visor de parada", + "Plan Trip": "Calcular viaje", + "From Stop": "Desde parada", + "To Stop": "Hasta parada", + "Routes Serving Stop": "Rutas por la parada", + "Bike Share Planner": "Planificador de Bicicleta Compartida", + "Trip Options": "Opciones de viaje", + "PICK UP BIKE": "Recogida de bicicleta", + "ALTERNATE PICKUP": "Recogida alternativa", + "DROP OFF BIKE": "DEVOLUCIÓN DE BICICLETA", + "ALTERNATE DROP OFF": "DEVOLUCIÓN DE BICICLETA ALTERNATIVA", + "BIKE STATION": "Estación de bicicleta", + "Station:": "Estación:", + "%d bike available": "%d bike available", + "%d bike available_plural": "%d bikes available", + "%d dock available": "%d dock available", + "%d dock available_plural": "%d docks available", + "Recommended Pick Up:": "Recogida recomendada:", + "Bicycle rental": "alquiler de bicicleta", + "Recommended Drop Off:": "Devolución recomendada:", + "Multimodal Trip Planner": "Planificador multimodo", + "Itineraries": "Rutas", + "This itinerary departs on a different day from the previous one": "", + "%d Itinerary Returned": "%d Ruta encontrada", + "%d Itinerary Returned_plural": "%d Rutas encontradas", + "Link to search": "Enlace a búsqueda", + "Previous Page": "Anterior", + "Next Page": "", + "CONTINUES AS": "CONTINÚA COMO", + "%d min late": "%d min tarde", + "%d min late_plural": "%d mins tarde", + "%d min early": "%d min early", + "%d min early_plural": "%d mins early", + "on time": "puntual", + "This itinerary departs on a different day than the one searched for": "", + "Arrived at destination with a rented bicycle!": "", + "End": "Fin", + "Trip Summary": "Resumen de la ruta", + "Travel": "Viaje", + "Time": "Duración", + "GenCost": "", + "Total Walk": "Total a pie", + "Total Bike": "Total en bicicleta", + "Total drive": "", + "Elevation Gained": "", + "Elevation Lost": "", + "Transfers": "Transbordos", + "Fare": "Ticket", + "Valid": "Válido", + "Link to Itinerary": "Enlace a ruta", + "Print": "Imprimir", + "Your Trip": "Tu Viaje", + "Email": "Email", + "every %d min": "cada %d min", + "every %d min_plural": "cada %d mins", + "Board at ": "Desde ", + "Stop": "Parada", + "Time in transit": "Durante", + "Route ID": "", + "Trip ID": "", + "Service Date": "", + "Trip Viewer": "Visor de ruta", + "late as": "no más tarde que", + "Stay on board": "mantente montado", + "Alight": "hasta ", + "at": "en", + "%(currency)s %(price)s": "%(currency)s %(price)s", + "Start: %(location)s at %(time_date)s": "Comienza: %(location)s a las %(time_date)s", + "Board": "Toma", + "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s ID Parada #%(stop_id)s),", + "End: %(location)s at %(time_date)s": "Finaliza: %(location)s a las %(time_date)s", + "(%(agencyId)s Stop ID #%(id)s),": "", + "\nView itinerary online:\n%(itinerary_link)s\n": "\nVer ruta online:\n%(itinerary_link)s\n", + "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Lo sentimos. El planificador de ruta está fuera de servicio temporalmente. Inténtelo más tarde.", + "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", + "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", + "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Tiempos no disponibles. La información disponible podría no ser válida para la fecha actual o no hay rutas disponibles para tu viaje.", + "The trip planner is taking way too long to process your request. Please try again later.": "El planificador de rutas está tardando demasiado. Por favor, inténtalo más tarde.", + "The request has errors that the server is not willing or able to process.": "Error en la petición, el server no puede procesar la información.", + "Origin is unknown. Can you be a bit more descriptive?": "Origen desconocido. ¿Puedes ser un poco más descriptivo?", + "Destination is unknown. Can you be a bit more descriptive?": "Destino desconocido. ¿Puedes ser un poco más descriptivo?", + "Both origin and destination are unknown. Can you be a bit more descriptive?": "Origen y destino desconocidos ¿Puedes ser un poco más descriptivo?", + "Both origin and destination are not wheelchair accessible": "Origen y destino no son accesibles a silla de ruedas.", + "Origin is within a trivial distance of the destination.": "Origen y destino están demasiado cerca.", + "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "El planificador de rutas no está seguro de tu origen. Por favor, seleccione una de las siguientes opciones o introduzca un origen más exacto.", + "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "El planificador de rutas no está seguro de tu destino. Por favor, seleccione una de las siguientes opciones o introduzca un destino más exacto.", + "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Origen y destino son ambiguos. Por favor, seleccione una de las siguientes opciones o introduzca un destino más exacto.", + "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "El triángulo de Seguridad, Llano y Tiempo debe ser seleccionado si está disponible.", + "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "El valor del triángulo de Seguridad, Llano y Tiempo debe sumar 1.", + "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Si el triángulo de Seguridad, Llano y Tiempo está disponible, debe ser un TRIÁNGULO.", + "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Si el tipo de optimización es triángulo, los factores de Seguridad, Llano y Tiempo tienen que estar seleccionados.", + "Set as Start Location": "Ruta desde aquí", + "Set as End Location": "Ruta hacia aquí", + "Destination": "Fin", + "Error %(error_id)d": "Error %(error_id)d", + "No Trip Found": "Viaje no encontrado", + "Your %(bike_share_name)s route": "Tu ruta %(bike_share_name)s", + "Your bike route": "Tu ruta en bicicleta", + "Walk to the %(bike_share_name)s dock.": "Camina hacia la estación %(bike_share_name)s.", + "Walk from the %(bike_share_name)s dock to your destination.": "Camina desde la estación %(bike_share_name)s hacia tu destino.", + "Your walk route": "Tu ruta a pie", + "Your route using the scooter": "", + "Your driving route": "Tu ruta en bicicleta", + "north": "Norte", + "northeast": "Nordeste", + "east": "Este", + "southeast": "Sureste", + "south": "Sur", + "southwest": "Suroeste", + "west": "Oeste", + "northwest": "Noroeste", + "hard left": "Izquierda fuerte", + "left": "izquierda", + "slight left": "Izquierda suave", + "continue": "continúa", + "slight right": "Derecha suave", + "right": "derecha", + "hard right": "Derecha fuerte", + "elevator": "ascensor", + "U-turn left": "Gira a la izquierda", + "U-turn right": "Gira a la derecha", + "Walk": "Camina", + "Cycle": "Bicicleta", + "Car": "Coche", + "Bus": "Autobús", + "Subway": "Metro", + "Train": "Tren", + "Ferry": "Barco", + "Light Rail": "Tranvía", + "Cable Car": "Bus Tranvía", + "Funicular": "Funicular", + "Aerial Tram": "Funicular", + "Airplane": "", + "Bicycle rental station": "estación de alquiler de bicicleta", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Toma la rotonda sentido contrario a las agujas del reloj hasta la %(ordinal_exit_number)s salida dirección %(street_name)s", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Toma la rotonda sentido contrario a las agujas del reloj hasta la %(ordinal_exit_number)s salida hacia %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Toma la rotonda sentido a las agujas del reloj hasta la %(ordinal_exit_number)s salida dirección %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Toma la rotonda sentido a las agujas del reloj hasta la %(ordinal_exit_number)s salida hacia %(street_name)s", + "Start on": "Comienza en", + " heading ": " dirección ", + "to continue on": "hacia", + "on to": "dirección", + "first": "primera", + "second": "segunda", + "third": "tercera", + "fourth": "cuarta", + "fifth": "quinta", + "sixth": "sexta", + "seventh": "séptima", + "eight": "octava", + "ninth": "novena", + "tenth": "décima", + "%d hr": "%d hr", + "%d hr_plural": "%d hrs", + "%d min": "%d min", + "%d min_plural": "%d mins", + "%d sec": "%d seg", + "%d sec_plural": "%d segs", + "OK": "Vale", + "Minimize": "Minimizar", + "Bring to front": "Traer al frente", + "Send to back": "Mandar al fondo", + "Route:": "Línea:", + "Variant:": "Variante:", + "Stop Finder": "Buscador de paradas", + "Feed": "Compañía", + "By ID": "Número:", + "By Name": "Nombre:", + "Search": "Buscar", + "No Stops Found": "Paradas no encontradas", + "Date": "Fecha", + "Find Stops": "Buscar paradas", + "(No Stop Selected)": "(Sin parada seleccionada)", + "Block": "Transbordo sin cambio de vehículo", + "Recenter": "Centrar", + "Viewer": "Visor", + "Quick": "Rápido", + "Flat": "Sin cuestas", + "Bike Friendly": "Adaptado a bicicleta", + "B": "B", + "F": "P", + "Q": "R", + "All Routes": "Todas las líneas", + "Save": "Guardar", + "Close": "Cerrar", + "Travel Options": "Opciones de viaje", + "Geocoder": "Geocoder", + "Arrive": "Llegar a las", + "Now": "Ahora", + "Wheelchair accessible trip:": "Ruta accesible a silla de ruedas:", + "Show Filtered Itineraries:": "", + "Travel by": "Viajar en", + "Preferred Routes": "Líneas favoritas", + "Edit": "Editar", + "None": "Niguna", + "Weight": "Prioridad", + "Banned routes": "Líneas prohibidas", + "Use": "Usar", + "My Own Bike": "Mi propia bicileta", + "A Shared Bike": "Una bicicleta compartida", + "Plan Your Trip": "Calcular Viaje", + "Additional parameters": "", + " to _direction": " dirección ", + " to _bus_direction": " dirección ", + "Start_template": "Inicio", + "Depart_itinerary": "Comienza", + "depart_itinerary": "Comienza", + "Start_popup": "Inicio", + "Depart_tripoptions": "Salir a las" +} diff --git a/application/src/client/classic-debug/js/otp/locale/fr.json b/application/src/client/classic-debug/js/otp/locale/fr.json index 53b4d78be17..ced9f30440d 100644 --- a/application/src/client/classic-debug/js/otp/locale/fr.json +++ b/application/src/client/classic-debug/js/otp/locale/fr.json @@ -1,238 +1,238 @@ { - "Transit": "Transports en commun", - "Bus Only": "Bus uniquement", - "Rail Only": "Ferré uniquement", - "Airplane Only": "", - "Transit, No Airplane": "", - "Bicycle Only": "Vélo uniquement", - "Bicycle & Transit": "Transports en commun + Vélo", - "Walk Only": "Marche seulement", - "Car Only": "Partir de", - "Taxi": "", - "Park and Ride": "Parc Relais", - "Ride and Kiss (Car Pickup)": "", - "Kiss and Ride (Car Dropoff)": "", - "Bike and Ride": "Parc Relais Vélo", - "Rented Bicycle": "Vélo Libre Service", - "Transit & Rented Bicycle": "Transports en commun et Vélo Libre Service", - "Rented Scooter": "", - "Transit & Rented Scooter": "Transports en commun et Vélo Libre Service", - "Transit with flex access": "", - "Transit with flex egress": "", - "Transit with flex access and egress": "", - "Direct flex search": "", - "Recenter Map Here": "Centrer la carte ici", - "Zoom In": "Zoomer", - "Zoom Out": "Dézoomer", - "Minimize all": "Tout minimiser", - "Unminimize all": "Tout restaurer", - "Stop Viewer": "Visualisateur d'arrêt", - "Plan Trip": "Organiser un voyage", - "From Stop": "De l'arrêt", - "To Stop": "À l'arrêt", - "Routes Serving Stop": "Lignes desservant l'arrêt", - "Bike Share Planner": "Organisation en Vélo Libre Service", - "Trip Options": "Paramètres de l'itinéraire", - "PICK UP BIKE": "Récupérer un vélo", - "ALTERNATE PICKUP": "Alternative de récupération de vélo", - "DROP OFF BIKE": "Déposer le vélo", - "ALTERNATE DROP OFF": "Alternative de dépôt de vélo", - "BIKE STATION": "Station de vélos", - "Station:": "Station :", - "%d bike available": "%d vélo disponible", - "%d bike available_plural": "%d vélos disponibles", - "%d dock available": "%d emplacements disponibles", - "%d dock available_plural": "%d emplacements disponibles", - "Recommended Pick Up:": "Station de récupération de vélo recommandée :", - "Bicycle rental": "Station de vélo libre service", - "Recommended Drop Off:": "Station de dépôt de vélo recommandée", - "Multimodal Trip Planner": "Planificateur d'itinéraires multimodal", - "Itineraries": "Itinéraires", - "This itinerary departs on a different day from the previous one": "", - "%d Itinerary Returned": "%d itinéraire trouvé", - "%d Itinerary Returned_plural": "%d itinéraires trouvés", - "Link to search": "Lien vers cette recherche", - "Previous Page": "Précédent", - "Next Page": "", - "CONTINUES AS": "Continue comme", - "%d min late": "en retard de %d min", - "%d min late_plural": "en retard de %d mins", - "%d min early": "en avance de %d min", - "%d min early_plural": "en avance de %d mins", - "on time": "à l'heure", - "This itinerary departs on a different day than the one searched for": "", - "Arrived at destination with a rented bicycle!": "", - "End": "Arrivée", - "Trip Summary": "Résumé du voyage", - "Travel": "Voyage", - "Time": "Durée", - "GenCost": "", - "Total Walk": "Total de marche", - "Total Bike": "Total de vélo", - "Total drive": "", - "Elevation Gained": "", - "Elevation Lost": "", - "Transfers": "correspondances", - "Fare": "Tarif", - "Valid": "Valide le", - "Link to Itinerary": "Lien vers l'itinéraire", - "Print": "Imprimer", - "Your Trip": "Votre voyage", - "Email": "Courriel", - "every %d min": "toutes les %d min", - "every %d min_plural": "toutes les %d mins", - "Board at ": "Montez à ", - "Stop": "Arrêt", - "Time in transit": "Temps de correspondance", - "Route ID": "", - "Trip ID": "", - "Service Date": "", - "Trip Viewer": "Visualisateur de voyage", - "late as": "en retard à", - "Stay on board": "rester à bord", - "Alight": "Descendre", - "at": "à", - "%(currency)s %(price)s": "%(price)s %(currency)s", - "Start: %(location)s at %(time_date)s": "Départ : %(location)s à %(time_date)s", - "Board": "Monter", - "(%(agency_id)s Stop ID #%(stop_id)s),": "arrêt #%(stop_id)s) de (%(agency_id)s,", - "End: %(location)s at %(time_date)s": "Arrivée : %(location)s à %(time_date)s", - "(%(agencyId)s Stop ID #%(id)s),": "", - "\nView itinerary online:\n%(itinerary_link)s\n": "\nVoir l'itinéraire en ligne :\n%(itinerary_link)s\n", - "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Nous sommes désolé. Le planificateur de voyage est temporairement indisponible. Merci de réessayer plus tard.", - "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", - "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", - "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Aucune durée de voyage disponible. La date est peut être passée ou trop loin dans le futur, ou il n'y a peut être pas de transports en service pour votre trajet à l'heure choisie.", - "The trip planner is taking way too long to process your request. Please try again later.": "Le planificateur de voyage prend largement trop de temps à étudier votre demande. Merci de réessayer plus tard.", - "The request has errors that the server is not willing or able to process.": "La requête renvoie des erreurs que le serveur ne souhaite ou ne peut pas traiter.", - "Origin is unknown. Can you be a bit more descriptive?": "L'origine est inconnue. Pouvez-vous être plus précis ?", - "Destination is unknown. Can you be a bit more descriptive?": "La destination est inconnue. Pouvez-vous être plus précis ?", - "Both origin and destination are unknown. Can you be a bit more descriptive?": "L'origine et la destination sont toutes deux inconnues. Pouvez-vous être plus précis ?", - "Both origin and destination are not wheelchair accessible": "Ni l'origine ni la destination ne sont accessibles en fauteuil roulant", - "Origin is within a trivial distance of the destination.": "L'origine est à une distance trop courte de la destination.", - "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "Le planificateur de voyage n'est pas sûr du lieu d'où vous voulez partir. Merci de le sélectionner parmi les options suivantes, ou d'être plus précis.", - "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "Le planificateur de voyage n'est pas sûr du lieu où vous désirez vous rendre. Merci de le sélectionner parmi les options suivantes, ou d'être plus précis.", - "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "L'origine et la destination sont toutes deux ambigües. Merci de les sélectionner parmi les options suivantes, ou d'être plus précis.", - "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "Toutes les options triangleSafetyFactor, triangleSlopeFactor, et triangleTimeFactor doivent être paramétrées si l'une d'elles l'est", - "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "Les valeurs de triangleSafetyFactor, triangleSlopeFactor, et triangleTimeFactor doivent avoir pour addition 1", - "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Si triangleSafetyFactor, triangleSlopeFactor, et triangleTimeFactor sont fournis, OptimizeType doit être TRIANGLE", - "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Si OptimizeType est TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, et triangleTimeFactor doivent être paramétrées", - "Set as Start Location": "Définir comme point de départ", - "Set as End Location": "Définir comme point d'arrivée", - "Destination": "Destination", - "Error %(error_id)d": "Erreur %(error_id)d", - "No Trip Found": "Aucun voyage trouvé", - "Your %(bike_share_name)s route": "Votre itinéraire en %(bike_share_name)s", - "Your bike route": "Votre itinéraire en vélo", - "Walk to the %(bike_share_name)s dock.": "Marcher jusqu'à l'emplacement %(bike_share_name)s.", - "Walk from the %(bike_share_name)s dock to your destination.": "Marcher de l'emplacement %(bike_share_name)s jusqu'à votre destination", - "Your walk route": "Votre itinéraire à pieds", - "Your route using the scooter": "", - "Your driving route": "Votre itinéraire en vélo", - "north": "nord", - "northeast": "nord-est", - "east": "est", - "southeast": "sud-est", - "south": "sud", - "southwest": "sud-ouest", - "west": "ouest", - "northwest": "nord-ouest", - "hard left": "complètement à gauche", - "left": "à gauche", - "slight left": "légèrement à gauche", - "continue": "continuer", - "slight right": "légèrement à droite", - "right": "à droite", - "hard right": "complètement à droite", - "elevator": "ascenseur", - "U-turn left": "virage en U à gauche", - "U-turn right": "virage en U à droite", - "Walk": "Marche à pied", - "Cycle": "Vélo", - "Car": "Voiture", - "Bus": "Bus", - "Subway": "Métro", - "Train": "Train", - "Ferry": "Ferry", - "Light Rail": "Tram ou Trolley", - "Cable Car": "Tramway funiculaire", - "Funicular": "Funiculaire", - "Aerial Tram": "Téléphérique", - "Airplane": "", - "Bicycle rental station": "Station de vélo libre service", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendre le rond-point dans le sens contraire des aiguilles d'une montre jusqu'à la %(ordinal_exit_number)s sortie sur %(street_name)s", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendre le rond-point dans le sens contraire des aiguilles d'une montre jusqu'à la %(ordinal_exit_number)s sortie sur %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendre le rond-point dans le sens des aiguilles d'une montre jusqu'à la %(ordinal_exit_number)s sortie sur %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendre le rond-point dans le sens des aiguilles d'une montre jusqu'à la %(ordinal_exit_number)s sortie sur %(street_name)s", - "Start on": "Partir de", - " heading ": " vers le ", - "to continue on": "pour continuer sur", - "on to": "sur", - "first": "première", - "second": "seconde", - "third": "troisième", - "fourth": "quatrième", - "fifth": "cinquième", - "sixth": "sixième", - "seventh": "septième", - "eight": "huitième", - "ninth": "neuvième", - "tenth": "dixième", - "%d hr": "%d h", - "%d hr_plural": "%d h", - "%d min": "%d min", - "%d min_plural": "%d mins", - "%d sec": "%d s", - "%d sec_plural": "%d s", - "OK": "OK", - "Minimize": "Minimiser", - "Bring to front": "Placer au dessus", - "Send to back": "Placer en dessous", - "Route:": "Ligne :", - "Variant:": "Variante :", - "Stop Finder": "Recherche d'arrêt", - "Feed": "Transporteur", - "By ID": "Par identifiant", - "By Name": "Par nom", - "Search": "Recherche", - "No Stops Found": "Aucun arrêt trouvé", - "Date": "Date", - "Find Stops": "Trouver les arrêts", - "(No Stop Selected)": "(Aucun arrêt sélectionné)", - "Block": "Bloc", - "Recenter": "Recentrer", - "Viewer": "Visualisateur", - "Quick": "Le plus Rapide", - "Flat": "Le plus Plat", - "Bike Friendly": "Adapté au vélo", - "B": "A", - "F": "P", - "Q": "R", - "All Routes": "Tous les itinéraires", - "Save": "Sauvegarder", - "Close": "Fermer", - "Travel Options": "Paramètres de voyage", - "Geocoder": "Géocodeur", - "Arrive": "Arrivée", - "Now": "Maintenant", - "Wheelchair accessible trip:": "Accessible aux fauteuils roulants:", - "Show Filtered Itineraries:": "", - "Travel by": "Voyager par", - "Preferred Routes": "Itinéraires préférés", - "Edit": "Modifier", - "None": "Aucune", - "Weight": "Pondération", - "Banned routes": "Itinéraires à éviter", - "Use": "Utiliser", - "My Own Bike": "mon propre vélo", - "A Shared Bike": "un Vélo Libre Service", - "Plan Your Trip": "Calculer votre itinéraire", - "Additional parameters": "", - " to _direction": " jusqu'à ", - " to _bus_direction": " vers ", - "Start_template": "Départ", - "Depart_itinerary": "Départ", - "depart_itinerary": "Départ", - "Start_popup": "Départ", - "Depart_tripoptions": "Départ" -} \ No newline at end of file + "Transit": "Transports en commun", + "Bus Only": "Bus uniquement", + "Rail Only": "Ferré uniquement", + "Airplane Only": "", + "Transit, No Airplane": "", + "Bicycle Only": "Vélo uniquement", + "Bicycle & Transit": "Transports en commun + Vélo", + "Walk Only": "Marche seulement", + "Car Only": "Partir de", + "Taxi": "", + "Park and Ride": "Parc Relais", + "Ride and Kiss (Car Pickup)": "", + "Kiss and Ride (Car Dropoff)": "", + "Bike and Ride": "Parc Relais Vélo", + "Rented Bicycle": "Vélo Libre Service", + "Transit & Rented Bicycle": "Transports en commun et Vélo Libre Service", + "Rented Scooter": "", + "Transit & Rented Scooter": "Transports en commun et Vélo Libre Service", + "Transit with flex access": "", + "Transit with flex egress": "", + "Transit with flex access and egress": "", + "Direct flex search": "", + "Recenter Map Here": "Centrer la carte ici", + "Zoom In": "Zoomer", + "Zoom Out": "Dézoomer", + "Minimize all": "Tout minimiser", + "Unminimize all": "Tout restaurer", + "Stop Viewer": "Visualisateur d'arrêt", + "Plan Trip": "Organiser un voyage", + "From Stop": "De l'arrêt", + "To Stop": "À l'arrêt", + "Routes Serving Stop": "Lignes desservant l'arrêt", + "Bike Share Planner": "Organisation en Vélo Libre Service", + "Trip Options": "Paramètres de l'itinéraire", + "PICK UP BIKE": "Récupérer un vélo", + "ALTERNATE PICKUP": "Alternative de récupération de vélo", + "DROP OFF BIKE": "Déposer le vélo", + "ALTERNATE DROP OFF": "Alternative de dépôt de vélo", + "BIKE STATION": "Station de vélos", + "Station:": "Station :", + "%d bike available": "%d vélo disponible", + "%d bike available_plural": "%d vélos disponibles", + "%d dock available": "%d emplacements disponibles", + "%d dock available_plural": "%d emplacements disponibles", + "Recommended Pick Up:": "Station de récupération de vélo recommandée :", + "Bicycle rental": "Station de vélo libre service", + "Recommended Drop Off:": "Station de dépôt de vélo recommandée", + "Multimodal Trip Planner": "Planificateur d'itinéraires multimodal", + "Itineraries": "Itinéraires", + "This itinerary departs on a different day from the previous one": "", + "%d Itinerary Returned": "%d itinéraire trouvé", + "%d Itinerary Returned_plural": "%d itinéraires trouvés", + "Link to search": "Lien vers cette recherche", + "Previous Page": "Précédent", + "Next Page": "", + "CONTINUES AS": "Continue comme", + "%d min late": "en retard de %d min", + "%d min late_plural": "en retard de %d mins", + "%d min early": "en avance de %d min", + "%d min early_plural": "en avance de %d mins", + "on time": "à l'heure", + "This itinerary departs on a different day than the one searched for": "", + "Arrived at destination with a rented bicycle!": "", + "End": "Arrivée", + "Trip Summary": "Résumé du voyage", + "Travel": "Voyage", + "Time": "Durée", + "GenCost": "", + "Total Walk": "Total de marche", + "Total Bike": "Total de vélo", + "Total drive": "", + "Elevation Gained": "", + "Elevation Lost": "", + "Transfers": "correspondances", + "Fare": "Tarif", + "Valid": "Valide le", + "Link to Itinerary": "Lien vers l'itinéraire", + "Print": "Imprimer", + "Your Trip": "Votre voyage", + "Email": "Courriel", + "every %d min": "toutes les %d min", + "every %d min_plural": "toutes les %d mins", + "Board at ": "Montez à ", + "Stop": "Arrêt", + "Time in transit": "Temps de correspondance", + "Route ID": "", + "Trip ID": "", + "Service Date": "", + "Trip Viewer": "Visualisateur de voyage", + "late as": "en retard à", + "Stay on board": "rester à bord", + "Alight": "Descendre", + "at": "à", + "%(currency)s %(price)s": "%(price)s %(currency)s", + "Start: %(location)s at %(time_date)s": "Départ : %(location)s à %(time_date)s", + "Board": "Monter", + "(%(agency_id)s Stop ID #%(stop_id)s),": "arrêt #%(stop_id)s) de (%(agency_id)s,", + "End: %(location)s at %(time_date)s": "Arrivée : %(location)s à %(time_date)s", + "(%(agencyId)s Stop ID #%(id)s),": "", + "\nView itinerary online:\n%(itinerary_link)s\n": "\nVoir l'itinéraire en ligne :\n%(itinerary_link)s\n", + "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Nous sommes désolé. Le planificateur de voyage est temporairement indisponible. Merci de réessayer plus tard.", + "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", + "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", + "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Aucune durée de voyage disponible. La date est peut être passée ou trop loin dans le futur, ou il n'y a peut être pas de transports en service pour votre trajet à l'heure choisie.", + "The trip planner is taking way too long to process your request. Please try again later.": "Le planificateur de voyage prend largement trop de temps à étudier votre demande. Merci de réessayer plus tard.", + "The request has errors that the server is not willing or able to process.": "La requête renvoie des erreurs que le serveur ne souhaite ou ne peut pas traiter.", + "Origin is unknown. Can you be a bit more descriptive?": "L'origine est inconnue. Pouvez-vous être plus précis ?", + "Destination is unknown. Can you be a bit more descriptive?": "La destination est inconnue. Pouvez-vous être plus précis ?", + "Both origin and destination are unknown. Can you be a bit more descriptive?": "L'origine et la destination sont toutes deux inconnues. Pouvez-vous être plus précis ?", + "Both origin and destination are not wheelchair accessible": "Ni l'origine ni la destination ne sont accessibles en fauteuil roulant", + "Origin is within a trivial distance of the destination.": "L'origine est à une distance trop courte de la destination.", + "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "Le planificateur de voyage n'est pas sûr du lieu d'où vous voulez partir. Merci de le sélectionner parmi les options suivantes, ou d'être plus précis.", + "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "Le planificateur de voyage n'est pas sûr du lieu où vous désirez vous rendre. Merci de le sélectionner parmi les options suivantes, ou d'être plus précis.", + "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "L'origine et la destination sont toutes deux ambigües. Merci de les sélectionner parmi les options suivantes, ou d'être plus précis.", + "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "Toutes les options triangleSafetyFactor, triangleSlopeFactor, et triangleTimeFactor doivent être paramétrées si l'une d'elles l'est", + "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "Les valeurs de triangleSafetyFactor, triangleSlopeFactor, et triangleTimeFactor doivent avoir pour addition 1", + "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Si triangleSafetyFactor, triangleSlopeFactor, et triangleTimeFactor sont fournis, OptimizeType doit être TRIANGLE", + "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Si OptimizeType est TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, et triangleTimeFactor doivent être paramétrées", + "Set as Start Location": "Définir comme point de départ", + "Set as End Location": "Définir comme point d'arrivée", + "Destination": "Destination", + "Error %(error_id)d": "Erreur %(error_id)d", + "No Trip Found": "Aucun voyage trouvé", + "Your %(bike_share_name)s route": "Votre itinéraire en %(bike_share_name)s", + "Your bike route": "Votre itinéraire en vélo", + "Walk to the %(bike_share_name)s dock.": "Marcher jusqu'à l'emplacement %(bike_share_name)s.", + "Walk from the %(bike_share_name)s dock to your destination.": "Marcher de l'emplacement %(bike_share_name)s jusqu'à votre destination", + "Your walk route": "Votre itinéraire à pieds", + "Your route using the scooter": "", + "Your driving route": "Votre itinéraire en vélo", + "north": "nord", + "northeast": "nord-est", + "east": "est", + "southeast": "sud-est", + "south": "sud", + "southwest": "sud-ouest", + "west": "ouest", + "northwest": "nord-ouest", + "hard left": "complètement à gauche", + "left": "à gauche", + "slight left": "légèrement à gauche", + "continue": "continuer", + "slight right": "légèrement à droite", + "right": "à droite", + "hard right": "complètement à droite", + "elevator": "ascenseur", + "U-turn left": "virage en U à gauche", + "U-turn right": "virage en U à droite", + "Walk": "Marche à pied", + "Cycle": "Vélo", + "Car": "Voiture", + "Bus": "Bus", + "Subway": "Métro", + "Train": "Train", + "Ferry": "Ferry", + "Light Rail": "Tram ou Trolley", + "Cable Car": "Tramway funiculaire", + "Funicular": "Funiculaire", + "Aerial Tram": "Téléphérique", + "Airplane": "", + "Bicycle rental station": "Station de vélo libre service", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendre le rond-point dans le sens contraire des aiguilles d'une montre jusqu'à la %(ordinal_exit_number)s sortie sur %(street_name)s", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendre le rond-point dans le sens contraire des aiguilles d'une montre jusqu'à la %(ordinal_exit_number)s sortie sur %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendre le rond-point dans le sens des aiguilles d'une montre jusqu'à la %(ordinal_exit_number)s sortie sur %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendre le rond-point dans le sens des aiguilles d'une montre jusqu'à la %(ordinal_exit_number)s sortie sur %(street_name)s", + "Start on": "Partir de", + " heading ": " vers le ", + "to continue on": "pour continuer sur", + "on to": "sur", + "first": "première", + "second": "seconde", + "third": "troisième", + "fourth": "quatrième", + "fifth": "cinquième", + "sixth": "sixième", + "seventh": "septième", + "eight": "huitième", + "ninth": "neuvième", + "tenth": "dixième", + "%d hr": "%d h", + "%d hr_plural": "%d h", + "%d min": "%d min", + "%d min_plural": "%d mins", + "%d sec": "%d s", + "%d sec_plural": "%d s", + "OK": "OK", + "Minimize": "Minimiser", + "Bring to front": "Placer au dessus", + "Send to back": "Placer en dessous", + "Route:": "Ligne :", + "Variant:": "Variante :", + "Stop Finder": "Recherche d'arrêt", + "Feed": "Transporteur", + "By ID": "Par identifiant", + "By Name": "Par nom", + "Search": "Recherche", + "No Stops Found": "Aucun arrêt trouvé", + "Date": "Date", + "Find Stops": "Trouver les arrêts", + "(No Stop Selected)": "(Aucun arrêt sélectionné)", + "Block": "Bloc", + "Recenter": "Recentrer", + "Viewer": "Visualisateur", + "Quick": "Le plus Rapide", + "Flat": "Le plus Plat", + "Bike Friendly": "Adapté au vélo", + "B": "A", + "F": "P", + "Q": "R", + "All Routes": "Tous les itinéraires", + "Save": "Sauvegarder", + "Close": "Fermer", + "Travel Options": "Paramètres de voyage", + "Geocoder": "Géocodeur", + "Arrive": "Arrivée", + "Now": "Maintenant", + "Wheelchair accessible trip:": "Accessible aux fauteuils roulants:", + "Show Filtered Itineraries:": "", + "Travel by": "Voyager par", + "Preferred Routes": "Itinéraires préférés", + "Edit": "Modifier", + "None": "Aucune", + "Weight": "Pondération", + "Banned routes": "Itinéraires à éviter", + "Use": "Utiliser", + "My Own Bike": "mon propre vélo", + "A Shared Bike": "un Vélo Libre Service", + "Plan Your Trip": "Calculer votre itinéraire", + "Additional parameters": "", + " to _direction": " jusqu'à ", + " to _bus_direction": " vers ", + "Start_template": "Départ", + "Depart_itinerary": "Départ", + "depart_itinerary": "Départ", + "Start_popup": "Départ", + "Depart_tripoptions": "Départ" +} diff --git a/application/src/client/classic-debug/js/otp/locale/hu.json b/application/src/client/classic-debug/js/otp/locale/hu.json index 1e1e666e19e..518dc407bc2 100644 --- a/application/src/client/classic-debug/js/otp/locale/hu.json +++ b/application/src/client/classic-debug/js/otp/locale/hu.json @@ -1,238 +1,238 @@ { - "Transit": "Tömegközlekedés", - "Bus Only": "Csak busz", - "Rail Only": "Csak vasút", - "Airplane Only": "Csak repülőgép", - "Transit, No Airplane": "Tömegközlekedés, repülés nélkül", - "Bicycle Only": "Csak kerékpár", - "Bicycle & Transit": "Kerékpár & tömegközlekedés", - "Walk Only": "Csak séta", - "Car Only": "Csak autó", - "Taxi": "Taxi", - "Park and Ride": "P+R (Park & Ride)", - "Ride and Kiss (Car Pickup)": "", - "Kiss and Ride (Car Dropoff)": "", - "Bike and Ride": "B+R (Bike & Ride)", - "Rented Bicycle": "Bérelt kerékpár", - "Transit & Rented Bicycle": "Tömegközlekedés és bérelt kerékpár", - "Rented Scooter": "", - "Transit & Rented Scooter": "Tömegközlekedés és bérelt kerékpár", - "Transit with flex access": "Tömegközlekedés rugalmas indulással", - "Transit with flex egress": "Tömegközlekedés rugalmas érkezéssel", - "Transit with flex access and egress": "Tömegközlekedés rugalmas indulással és érkezéssel", - "Direct flex search": "Közvetlen rugalmas keresés", - "Recenter Map Here": "Legyen itt a térkép középpontja", - "Zoom In": "Közelítés", - "Zoom Out": "Távolítás", - "Minimize all": "Minden kis méretűvé tétele", - "Unminimize all": "Minden kis méretűvé tételének megszüntetése", - "Stop Viewer": "Megállómegjelenítő", - "Plan Trip": "Utazás tervezése", - "From Stop": "Ettől a megállótól", - "To Stop": "Eddig a megállóig", - "Routes Serving Stop": "A megállót érintő járatok", - "Bike Share Planner": "Kerékpármegosztó-tervező", - "Trip Options": "Utazási beállítások", - "PICK UP BIKE": "KERÉKPÁR FELVÉTELE", - "ALTERNATE PICKUP": "MÁSIK FELVÉTELI HELY", - "DROP OFF BIKE": "KERÉKPÁR LEADÁSA", - "ALTERNATE DROP OFF": "MÁSIK LEADÁSI HELY", - "BIKE STATION": "KERÉKPÁRÁLLOMÁS", - "Station:": "Gyűjtőállomás:", - "%d bike available": "%d kerékpár elérhető", - "%d bike available_plural": "%d kerékpár elérhető", - "%d dock available": "%d dokkolóállás", - "%d dock available_plural": "%d dokkolállás", - "Recommended Pick Up:": "Ajánlott felvétel:", - "Bicycle rental": "Kerékpárbérlési hely", - "Recommended Drop Off:": "Ajánlott leadás:", - "Multimodal Trip Planner": "Multimodális utazástervező", - "Itineraries": "Útvonaltervek", - "This itinerary departs on a different day from the previous one": "Ez a útvonalterv az előző naptól eltérő napon kezdődik", - "%d Itinerary Returned": "%d útvonalatervet találtunk", - "%d Itinerary Returned_plural": "%d útvonaltervet találtunk", - "Link to search": "Link a kereséshez", - "Previous Page": "Előző", - "Next Page": "Következő", - "CONTINUES AS": "FOLYTATÁS MINT", - "%d min late": "%d perc késés", - "%d min late_plural": "%d perc késés", - "%d min early": "%d perccel korábban", - "%d min early_plural": "%d perccel korábban", - "on time": "pontos", - "This itinerary departs on a different day than the one searched for": "Ez az útvonalterv a tervezési naptól eltérő napon kezdődik", - "Arrived at destination with a rented bicycle!": "Bérelt kerékpárral való érkezés a célba!", - "End": "Érkezés", - "Trip Summary": "Utazás összefoglalója", - "Travel": "Utazás", - "Time": "Idő", - "GenCost": "Súly/Költség", - "Total Walk": "Séta összesen", - "Total Bike": "Kerékpárral összesen", - "Total drive": "Autóval összesen", - "Elevation Gained": "", - "Elevation Lost": "", - "Transfers": "Átszállások", - "Fare": "Viteldíj", - "Valid": "Érvényesség", - "Link to Itinerary": "Link az útvonaltervhez", - "Print": "Nyomtatás", - "Your Trip": "Az Ön utazása", - "Email": "E-mail", - "every %d min": "%d percenként", - "every %d min_plural": "%d percenként", - "Board at ": "Felszállás: ", - "Stop": "Megálló", - "Time in transit": "Közlekedési idő", - "Route ID": "", - "Trip ID": "", - "Service Date": "", - "Trip Viewer": "Utazásmegjelenítő", - "late as": "", - "Stay on board": "Maradjon a járművön", - "Alight": "Leszállás", - "at": "itt:", - "%(currency)s %(price)s": "%(currency)s %(price)s", - "Start: %(location)s at %(time_date)s": "Indulás: %(location)s (%(time_date)s)", - "Board": "Felszállás", - "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s megállóazonosító: #%(stop_id)s),", - "End: %(location)s at %(time_date)s": "Érkezés: %(location)s (%(time_date)s)", - "(%(agencyId)s Stop ID #%(id)s),": "(%(agencyId)s megállóazonosító: #%(id)s),", - "\nView itinerary online:\n%(itinerary_link)s\n": "\nOnline útvonalterv megtekintése:\n%(itinerary_link)s\n", - "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Sajnáljuk, az útvonaltervező átmenetileg nem elérhető. Kérjük, próbálja újra később.", - "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "Az utazás nem lehetséges. Lehet, hogy a térképadatok határain kívüli utat próbál tervezni.", - "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "Nem található ilyen utazás. Előfordulhat, hogy nincs tömegközlekedési szolgáltatás a megadott legnagyobb távolságon belül vagy a megadott időpontban, vagy a kezdő- vagy végpont nem érhető el biztonságosan.", - "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Nem áll rendelkezésre közlekedési idő. Előfordulhat, hogy a dátum elmúlt vagy túl messze van a jövőben, vagy az Ön által választott időpontban nincs tömegközlekedési szolgáltatás.", - "The trip planner is taking way too long to process your request. Please try again later.": "Az utazástervezőnek túl sokáig tart a kérés feldolgozása. Kérjük, próbálja újra később.", - "The request has errors that the server is not willing or able to process.": "A kérés olyan hibát tartalmaz, amelyet a szerver nem hajlandó vagy nem képes feldolgozni.", - "Origin is unknown. Can you be a bit more descriptive?": "A kiindulás pont ismeretlen. Le tudná írni egy kicsit gondosabban?", - "Destination is unknown. Can you be a bit more descriptive?": "Az úti cél ismeretlen. Le tudná írni egy kicsit gondosabban?", - "Both origin and destination are unknown. Can you be a bit more descriptive?": "A kiindulási és a célpont egyaránt ismeretlen. Le tudná-e írni egy kicsit gondosabban?", - "Both origin and destination are not wheelchair accessible": "Sem a kiindulási, sem a célpont nem akadálymentes", - "Origin is within a trivial distance of the destination.": "A kiindulási hely túl közel van a célponthoz.", - "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "Az útvonaltervező bizonytalan abban, hogy honnan szeretne indulni. Kérjük, válasszon az alábbi lehetőségek közül, vagy legyen pontosabb.", - "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "Az útvonaltervező bizonytalan abban, hogy hová szeretne érkezni. Kérjük, válasszon az alábbi lehetőségek közül, vagy legyen pontosabb.", - "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Sem a kiindulási, sem a célpont nem egyértelmű. Kérjük, válasszon az alábbi lehetőségek közül, vagy legyen pontosabb.", - "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "A triangleSafetyFactor, a triangleSlopeFactor és a triangleTimeFactor értékeit egyaránt be kell állítani, ha vannak ilyenek", - "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "A triangleSafetyFactor, triangleSlopeFactor és triangleTimeFactor értékei összegének 1-nek kell lennie", - "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Ha a triangleSafetyFactor, a triangleSlopeFactor és a triangleTimeFactor meg van adva, akkor az OptimizeType értékének TRIANGLE-nek kell lennie", - "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Ha az OptimizeType értéke TRIANGLE, akkor be kell állítani a triangleSafetyFactor, a triangleSlopeFactor és a triangleTimeFactor értékeit", - "Set as Start Location": "Beállítás kiindulási helyként", - "Set as End Location": "Beállítás érkezési helyként", - "Destination": "Célpont", - "Error %(error_id)d": "Hiba: %(error_id)d", - "No Trip Found": "Nem található utazás", - "Your %(bike_share_name)s route": "Az Ön %(bike_share_name)s-útvonala", - "Your bike route": "Az Ön kerékpáros útvonala", - "Walk to the %(bike_share_name)s dock.": "Séta a dokkolóálláshoz (%(bike_share_name)s)", - "Walk from the %(bike_share_name)s dock to your destination.": "Séta a dokkolóállástól (%(bike_share_name)s) a célponthoz.", - "Your walk route": "Az Ön gyalogos útvonala", - "Your route using the scooter": "", - "Your driving route": "Az Ön kerékpáros útvonala", - "north": "észak", - "northeast": "északkelet", - "east": "kelet", - "southeast": "délkelet", - "south": "dél", - "southwest": "délnyugat", - "west": "nyugat", - "northwest": "északnyugat", - "hard left": "élesen balra", - "left": "balra", - "slight left": "enyhén balra", - "continue": "tovább", - "slight right": "enyhén jobbra", - "right": "jobbra", - "hard right": "élesen jobbra", - "elevator": "lift", - "U-turn left": "megfordulás balra", - "U-turn right": "megfordulás jobbra", - "Walk": "Séta", - "Cycle": "Kerékpározás", - "Car": "Autós útvonal", - "Bus": "Busz", - "Subway": "Metró", - "Train": "Vonat", - "Ferry": "Komp", - "Light Rail": "Villamos, könnyűvasút", - "Cable Car": "", - "Funicular": "Sikló", - "Aerial Tram": "Libegő", - "Airplane": "Repülőgép", - "Bicycle rental station": "Kerékpárkölcsönző állomás", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Hajtson be a körforgalomba az óramutató járásával ellentétesen, majd hajtson ki a(z) %(ordinal_exit_number)s kijáraton erre: %(street_name)s", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Hajtson be a körforgalomba az óramutató járásával ellentétesen, majd hajtson ki a(z) %(ordinal_exit_number)s kijáraton erre: %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Hajtson be a körforgalomba az óramutató járása szerinti irányba, majd hajtson ki a(z) %(ordinal_exit_number)s kijáraton erre: %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Hajtson be a körforgalomba az óramutató járása szerinti irányba, majd hajtson ki a(z) %(ordinal_exit_number)s kijáraton erre: %(street_name)s", - "Start on": "Induljon ezen:", - " heading ": " erre: ", - "to continue on": "menjen tovább ezen:", - "on to": "ezen:", - "first": "első", - "second": "második", - "third": "harmadik", - "fourth": "negyedik", - "fifth": "ötödik", - "sixth": "hatodik", - "seventh": "hetedik", - "eight": "nyolcadik", - "ninth": "kilencedik", - "tenth": "tizedik", - "%d hr": "%d óra", - "%d hr_plural": "%d óra", - "%d min": "%d perc", - "%d min_plural": "%d perc", - "%d sec": "%d másodperc", - "%d sec_plural": "%d másodperc", - "OK": "OK", - "Minimize": "Kis méretűvé tétel", - "Bring to front": "Előrehozás", - "Send to back": "Hátraküldés", - "Route:": "Útvonal:", - "Variant:": "Változat:", - "Stop Finder": "Megállókereső", - "Feed": "Feed", - "By ID": "Azonosító alapján", - "By Name": "Név alapján", - "Search": "Keresés", - "No Stops Found": "Nem található megálló", - "Date": "Dátum", - "Find Stops": "Megállóhelyek keresése", - "(No Stop Selected)": "(Nincs megálló kijelölve)", - "Block": "Blokk", - "Recenter": "Legyen ez a térkép középpontja", - "Viewer": "Megállómegtekintő", - "Quick": "Gyors", - "Flat": "Lapos", - "Bike Friendly": "Kerékpárosbarát", - "B": "K", - "F": "L", - "Q": "G", - "All Routes": "Minden útvonal", - "Save": "Mentés", - "Close": "Bezárás", - "Travel Options": "Utazás beállításai", - "Geocoder": "Geokóder", - "Arrive": "Érkezés", - "Now": "Most", - "Wheelchair accessible trip:": "Akadálymentes utazás:", - "Show Filtered Itineraries:": "Szűrt útvonaltervek megjelenítése:", - "Travel by": "Közlekedési eszköz:", - "Preferred Routes": "Előnyben részesített útvonalak", - "Edit": "Szerkesztés", - "None": "Nincs", - "Weight": "Súly", - "Banned routes": "Kerülendő útvonalak", - "Use": "Használt kerékpár:", - "My Own Bike": "saját", - "A Shared Bike": "bérelt", - "Plan Your Trip": "Tervezze meg utazását", - "Additional parameters": "További beállítások", - " to _direction": " eddig: ", - " to _bus_direction": " ide: ", - "Start_template": "Indulás", - "Depart_itinerary": "Indulás", - "depart_itinerary": "indulás", - "Start_popup": "Indulás", - "Depart_tripoptions": "Indulás" -} \ No newline at end of file + "Transit": "Tömegközlekedés", + "Bus Only": "Csak busz", + "Rail Only": "Csak vasút", + "Airplane Only": "Csak repülőgép", + "Transit, No Airplane": "Tömegközlekedés, repülés nélkül", + "Bicycle Only": "Csak kerékpár", + "Bicycle & Transit": "Kerékpár & tömegközlekedés", + "Walk Only": "Csak séta", + "Car Only": "Csak autó", + "Taxi": "Taxi", + "Park and Ride": "P+R (Park & Ride)", + "Ride and Kiss (Car Pickup)": "", + "Kiss and Ride (Car Dropoff)": "", + "Bike and Ride": "B+R (Bike & Ride)", + "Rented Bicycle": "Bérelt kerékpár", + "Transit & Rented Bicycle": "Tömegközlekedés és bérelt kerékpár", + "Rented Scooter": "", + "Transit & Rented Scooter": "Tömegközlekedés és bérelt kerékpár", + "Transit with flex access": "Tömegközlekedés rugalmas indulással", + "Transit with flex egress": "Tömegközlekedés rugalmas érkezéssel", + "Transit with flex access and egress": "Tömegközlekedés rugalmas indulással és érkezéssel", + "Direct flex search": "Közvetlen rugalmas keresés", + "Recenter Map Here": "Legyen itt a térkép középpontja", + "Zoom In": "Közelítés", + "Zoom Out": "Távolítás", + "Minimize all": "Minden kis méretűvé tétele", + "Unminimize all": "Minden kis méretűvé tételének megszüntetése", + "Stop Viewer": "Megállómegjelenítő", + "Plan Trip": "Utazás tervezése", + "From Stop": "Ettől a megállótól", + "To Stop": "Eddig a megállóig", + "Routes Serving Stop": "A megállót érintő járatok", + "Bike Share Planner": "Kerékpármegosztó-tervező", + "Trip Options": "Utazási beállítások", + "PICK UP BIKE": "KERÉKPÁR FELVÉTELE", + "ALTERNATE PICKUP": "MÁSIK FELVÉTELI HELY", + "DROP OFF BIKE": "KERÉKPÁR LEADÁSA", + "ALTERNATE DROP OFF": "MÁSIK LEADÁSI HELY", + "BIKE STATION": "KERÉKPÁRÁLLOMÁS", + "Station:": "Gyűjtőállomás:", + "%d bike available": "%d kerékpár elérhető", + "%d bike available_plural": "%d kerékpár elérhető", + "%d dock available": "%d dokkolóállás", + "%d dock available_plural": "%d dokkolállás", + "Recommended Pick Up:": "Ajánlott felvétel:", + "Bicycle rental": "Kerékpárbérlési hely", + "Recommended Drop Off:": "Ajánlott leadás:", + "Multimodal Trip Planner": "Multimodális utazástervező", + "Itineraries": "Útvonaltervek", + "This itinerary departs on a different day from the previous one": "Ez a útvonalterv az előző naptól eltérő napon kezdődik", + "%d Itinerary Returned": "%d útvonalatervet találtunk", + "%d Itinerary Returned_plural": "%d útvonaltervet találtunk", + "Link to search": "Link a kereséshez", + "Previous Page": "Előző", + "Next Page": "Következő", + "CONTINUES AS": "FOLYTATÁS MINT", + "%d min late": "%d perc késés", + "%d min late_plural": "%d perc késés", + "%d min early": "%d perccel korábban", + "%d min early_plural": "%d perccel korábban", + "on time": "pontos", + "This itinerary departs on a different day than the one searched for": "Ez az útvonalterv a tervezési naptól eltérő napon kezdődik", + "Arrived at destination with a rented bicycle!": "Bérelt kerékpárral való érkezés a célba!", + "End": "Érkezés", + "Trip Summary": "Utazás összefoglalója", + "Travel": "Utazás", + "Time": "Idő", + "GenCost": "Súly/Költség", + "Total Walk": "Séta összesen", + "Total Bike": "Kerékpárral összesen", + "Total drive": "Autóval összesen", + "Elevation Gained": "", + "Elevation Lost": "", + "Transfers": "Átszállások", + "Fare": "Viteldíj", + "Valid": "Érvényesség", + "Link to Itinerary": "Link az útvonaltervhez", + "Print": "Nyomtatás", + "Your Trip": "Az Ön utazása", + "Email": "E-mail", + "every %d min": "%d percenként", + "every %d min_plural": "%d percenként", + "Board at ": "Felszállás: ", + "Stop": "Megálló", + "Time in transit": "Közlekedési idő", + "Route ID": "", + "Trip ID": "", + "Service Date": "", + "Trip Viewer": "Utazásmegjelenítő", + "late as": "", + "Stay on board": "Maradjon a járművön", + "Alight": "Leszállás", + "at": "itt:", + "%(currency)s %(price)s": "%(currency)s %(price)s", + "Start: %(location)s at %(time_date)s": "Indulás: %(location)s (%(time_date)s)", + "Board": "Felszállás", + "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s megállóazonosító: #%(stop_id)s),", + "End: %(location)s at %(time_date)s": "Érkezés: %(location)s (%(time_date)s)", + "(%(agencyId)s Stop ID #%(id)s),": "(%(agencyId)s megállóazonosító: #%(id)s),", + "\nView itinerary online:\n%(itinerary_link)s\n": "\nOnline útvonalterv megtekintése:\n%(itinerary_link)s\n", + "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Sajnáljuk, az útvonaltervező átmenetileg nem elérhető. Kérjük, próbálja újra később.", + "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "Az utazás nem lehetséges. Lehet, hogy a térképadatok határain kívüli utat próbál tervezni.", + "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "Nem található ilyen utazás. Előfordulhat, hogy nincs tömegközlekedési szolgáltatás a megadott legnagyobb távolságon belül vagy a megadott időpontban, vagy a kezdő- vagy végpont nem érhető el biztonságosan.", + "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Nem áll rendelkezésre közlekedési idő. Előfordulhat, hogy a dátum elmúlt vagy túl messze van a jövőben, vagy az Ön által választott időpontban nincs tömegközlekedési szolgáltatás.", + "The trip planner is taking way too long to process your request. Please try again later.": "Az utazástervezőnek túl sokáig tart a kérés feldolgozása. Kérjük, próbálja újra később.", + "The request has errors that the server is not willing or able to process.": "A kérés olyan hibát tartalmaz, amelyet a szerver nem hajlandó vagy nem képes feldolgozni.", + "Origin is unknown. Can you be a bit more descriptive?": "A kiindulás pont ismeretlen. Le tudná írni egy kicsit gondosabban?", + "Destination is unknown. Can you be a bit more descriptive?": "Az úti cél ismeretlen. Le tudná írni egy kicsit gondosabban?", + "Both origin and destination are unknown. Can you be a bit more descriptive?": "A kiindulási és a célpont egyaránt ismeretlen. Le tudná-e írni egy kicsit gondosabban?", + "Both origin and destination are not wheelchair accessible": "Sem a kiindulási, sem a célpont nem akadálymentes", + "Origin is within a trivial distance of the destination.": "A kiindulási hely túl közel van a célponthoz.", + "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "Az útvonaltervező bizonytalan abban, hogy honnan szeretne indulni. Kérjük, válasszon az alábbi lehetőségek közül, vagy legyen pontosabb.", + "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "Az útvonaltervező bizonytalan abban, hogy hová szeretne érkezni. Kérjük, válasszon az alábbi lehetőségek közül, vagy legyen pontosabb.", + "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Sem a kiindulási, sem a célpont nem egyértelmű. Kérjük, válasszon az alábbi lehetőségek közül, vagy legyen pontosabb.", + "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "A triangleSafetyFactor, a triangleSlopeFactor és a triangleTimeFactor értékeit egyaránt be kell állítani, ha vannak ilyenek", + "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "A triangleSafetyFactor, triangleSlopeFactor és triangleTimeFactor értékei összegének 1-nek kell lennie", + "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Ha a triangleSafetyFactor, a triangleSlopeFactor és a triangleTimeFactor meg van adva, akkor az OptimizeType értékének TRIANGLE-nek kell lennie", + "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Ha az OptimizeType értéke TRIANGLE, akkor be kell állítani a triangleSafetyFactor, a triangleSlopeFactor és a triangleTimeFactor értékeit", + "Set as Start Location": "Beállítás kiindulási helyként", + "Set as End Location": "Beállítás érkezési helyként", + "Destination": "Célpont", + "Error %(error_id)d": "Hiba: %(error_id)d", + "No Trip Found": "Nem található utazás", + "Your %(bike_share_name)s route": "Az Ön %(bike_share_name)s-útvonala", + "Your bike route": "Az Ön kerékpáros útvonala", + "Walk to the %(bike_share_name)s dock.": "Séta a dokkolóálláshoz (%(bike_share_name)s)", + "Walk from the %(bike_share_name)s dock to your destination.": "Séta a dokkolóállástól (%(bike_share_name)s) a célponthoz.", + "Your walk route": "Az Ön gyalogos útvonala", + "Your route using the scooter": "", + "Your driving route": "Az Ön kerékpáros útvonala", + "north": "észak", + "northeast": "északkelet", + "east": "kelet", + "southeast": "délkelet", + "south": "dél", + "southwest": "délnyugat", + "west": "nyugat", + "northwest": "északnyugat", + "hard left": "élesen balra", + "left": "balra", + "slight left": "enyhén balra", + "continue": "tovább", + "slight right": "enyhén jobbra", + "right": "jobbra", + "hard right": "élesen jobbra", + "elevator": "lift", + "U-turn left": "megfordulás balra", + "U-turn right": "megfordulás jobbra", + "Walk": "Séta", + "Cycle": "Kerékpározás", + "Car": "Autós útvonal", + "Bus": "Busz", + "Subway": "Metró", + "Train": "Vonat", + "Ferry": "Komp", + "Light Rail": "Villamos, könnyűvasút", + "Cable Car": "", + "Funicular": "Sikló", + "Aerial Tram": "Libegő", + "Airplane": "Repülőgép", + "Bicycle rental station": "Kerékpárkölcsönző állomás", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Hajtson be a körforgalomba az óramutató járásával ellentétesen, majd hajtson ki a(z) %(ordinal_exit_number)s kijáraton erre: %(street_name)s", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Hajtson be a körforgalomba az óramutató járásával ellentétesen, majd hajtson ki a(z) %(ordinal_exit_number)s kijáraton erre: %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Hajtson be a körforgalomba az óramutató járása szerinti irányba, majd hajtson ki a(z) %(ordinal_exit_number)s kijáraton erre: %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Hajtson be a körforgalomba az óramutató járása szerinti irányba, majd hajtson ki a(z) %(ordinal_exit_number)s kijáraton erre: %(street_name)s", + "Start on": "Induljon ezen:", + " heading ": " erre: ", + "to continue on": "menjen tovább ezen:", + "on to": "ezen:", + "first": "első", + "second": "második", + "third": "harmadik", + "fourth": "negyedik", + "fifth": "ötödik", + "sixth": "hatodik", + "seventh": "hetedik", + "eight": "nyolcadik", + "ninth": "kilencedik", + "tenth": "tizedik", + "%d hr": "%d óra", + "%d hr_plural": "%d óra", + "%d min": "%d perc", + "%d min_plural": "%d perc", + "%d sec": "%d másodperc", + "%d sec_plural": "%d másodperc", + "OK": "OK", + "Minimize": "Kis méretűvé tétel", + "Bring to front": "Előrehozás", + "Send to back": "Hátraküldés", + "Route:": "Útvonal:", + "Variant:": "Változat:", + "Stop Finder": "Megállókereső", + "Feed": "Feed", + "By ID": "Azonosító alapján", + "By Name": "Név alapján", + "Search": "Keresés", + "No Stops Found": "Nem található megálló", + "Date": "Dátum", + "Find Stops": "Megállóhelyek keresése", + "(No Stop Selected)": "(Nincs megálló kijelölve)", + "Block": "Blokk", + "Recenter": "Legyen ez a térkép középpontja", + "Viewer": "Megállómegtekintő", + "Quick": "Gyors", + "Flat": "Lapos", + "Bike Friendly": "Kerékpárosbarát", + "B": "K", + "F": "L", + "Q": "G", + "All Routes": "Minden útvonal", + "Save": "Mentés", + "Close": "Bezárás", + "Travel Options": "Utazás beállításai", + "Geocoder": "Geokóder", + "Arrive": "Érkezés", + "Now": "Most", + "Wheelchair accessible trip:": "Akadálymentes utazás:", + "Show Filtered Itineraries:": "Szűrt útvonaltervek megjelenítése:", + "Travel by": "Közlekedési eszköz:", + "Preferred Routes": "Előnyben részesített útvonalak", + "Edit": "Szerkesztés", + "None": "Nincs", + "Weight": "Súly", + "Banned routes": "Kerülendő útvonalak", + "Use": "Használt kerékpár:", + "My Own Bike": "saját", + "A Shared Bike": "bérelt", + "Plan Your Trip": "Tervezze meg utazását", + "Additional parameters": "További beállítások", + " to _direction": " eddig: ", + " to _bus_direction": " ide: ", + "Start_template": "Indulás", + "Depart_itinerary": "Indulás", + "depart_itinerary": "indulás", + "Start_popup": "Indulás", + "Depart_tripoptions": "Indulás" +} diff --git a/application/src/client/classic-debug/js/otp/locale/it.json b/application/src/client/classic-debug/js/otp/locale/it.json index 0876aba1ef8..81489b8d82c 100644 --- a/application/src/client/classic-debug/js/otp/locale/it.json +++ b/application/src/client/classic-debug/js/otp/locale/it.json @@ -1,238 +1,238 @@ { - "Transit": "Mezzi pubblici", - "Bus Only": "Solo Bus", - "Rail Only": "Solo Treno", - "Airplane Only": "", - "Transit, No Airplane": "", - "Bicycle Only": "In bici", - "Bicycle & Transit": "Bici & mezzi pubblici", - "Walk Only": "A piedi", - "Car Only": "Partenza su", - "Taxi": "", - "Park and Ride": "Park & Ride", - "Ride and Kiss (Car Pickup)": "", - "Kiss and Ride (Car Dropoff)": "", - "Bike and Ride": "Bike & Ride", - "Rented Bicycle": "Bike sharing", - "Transit & Rented Bicycle": "Bike sharing & Ride", - "Rented Scooter": "", - "Transit & Rented Scooter": "Bike sharing & Ride", - "Transit with flex access": "", - "Transit with flex egress": "", - "Transit with flex access and egress": "", - "Direct flex search": "", - "Recenter Map Here": "Centra", - "Zoom In": "Zoom in", - "Zoom Out": "Zoom out", - "Minimize all": "Minimizza tutto", - "Unminimize all": "Ripristina tutto", - "Stop Viewer": "Orari", - "Plan Trip": "Calcola percorso", - "From Stop": "Da questa fermata", - "To Stop": "A questa fermata", - "Routes Serving Stop": "Linee", - "Bike Share Planner": "Bike Sharing", - "Trip Options": "Opzioni di viaggio", - "PICK UP BIKE": "Prendi la bici qui", - "ALTERNATE PICKUP": "Puoi prendere la bici anche qui", - "DROP OFF BIKE": "Lascia la bici qui", - "ALTERNATE DROP OFF": "Puoi lasciare la bici anche qui", - "BIKE STATION": "Stazione di Bike Sharing", - "Station:": "Stazione:", - "%d bike available": "%d bici disponibile", - "%d bike available_plural": "%d bici disponibili", - "%d dock available": "%d posto disponibile", - "%d dock available_plural": "%d posti disponibili", - "Recommended Pick Up:": "Prendi la bici:", - "Bicycle rental": "", - "Recommended Drop Off:": "Lascia la bici:", - "Multimodal Trip Planner": "Calcolo percorso multimodale", - "Itineraries": "Percorsi", - "This itinerary departs on a different day from the previous one": "", - "%d Itinerary Returned": "%d percorso trovato", - "%d Itinerary Returned_plural": "%d percorsi trovati", - "Link to search": "Link a questa ricerca", - "Previous Page": "Precedente", - "Next Page": "", - "CONTINUES AS": "Rimani a bordo", - "%d min late": "%d minuto di ritardo", - "%d min late_plural": "%d minuti di ritardo", - "%d min early": "%d minuto in anticipo", - "%d min early_plural": "%d minuti in anticipo", - "on time": "in orario", - "This itinerary departs on a different day than the one searched for": "", - "Arrived at destination with a rented bicycle!": "", - "End": "Arrivo", - "Trip Summary": "Riepilogo", - "Travel": "Partenza", - "Time": "Durata", - "GenCost": "", - "Total Walk": "A piedi", - "Total Bike": "In bici", - "Total drive": "", - "Elevation Gained": "", - "Elevation Lost": "", - "Transfers": "Cambi", - "Fare": "Costo", - "Valid": "Calcolato il ", - "Link to Itinerary": "Link a questo percorso", - "Print": "Stampa", - "Your Trip": "Il tuo percorso", - "Email": "Invia mail", - "every %d min": "ogni minuto", - "every %d min_plural": "ogni %d minuti", - "Board at ": "Parti da ", - "Stop": "Fermata", - "Time in transit": "Tempo a bordo", - "Route ID": "", - "Trip ID": "", - "Service Date": "", - "Trip Viewer": "Percorso", - "late as": "al più", - "Stay on board": "Rimani a bordo", - "Alight": "Scendi", - "at": "a", - "%(currency)s %(price)s": "%(currency)s %(price)s", - "Start: %(location)s at %(time_date)s": "Partenza: %(location)s alle %(time_date)s", - "Board": "Sali a bordo", - "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s fermata n.%(stop_id)s),", - "End: %(location)s at %(time_date)s": "Arrivo: %(location)s alle %(time_date)s", - "(%(agencyId)s Stop ID #%(id)s),": "", - "\nView itinerary online:\n%(itinerary_link)s\n": "\nConsulta il percorso online:\n%(itinerary_link)s\n", - "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Siamo spiacenti. Il servizio è momentaneamente indisponibile.Riprova più tardi.", - "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", - "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", - "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Nessun servizio di Trasporto Pubblico trovato. La data indicata potrebbe essere al di fuori del periodo preso in considerazione dal Calcolo Percorso.", - "The trip planner is taking way too long to process your request. Please try again later.": "Il servizio di Calcolo percorsi sta impiegando troppo tempo per processare la tua richiesta. Riprova più tardi.", - "The request has errors that the server is not willing or able to process.": "La richiesta contiene errori che il server non è in grado di trattare.", - "Origin is unknown. Can you be a bit more descriptive?": "Origine non riconosciuta. Puoi essere più esplicito?", - "Destination is unknown. Can you be a bit more descriptive?": "Destinazione non riconosciuta. Puoi essere più esplicito?", - "Both origin and destination are unknown. Can you be a bit more descriptive?": "Origine e destinazione non riconosciute. Puoi essere più esplicito?", - "Both origin and destination are not wheelchair accessible": "Origine e destinazione non accessibili in carrozzina", - "Origin is within a trivial distance of the destination.": "Origine troppo vicina alla destinazione.", - "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "Origine non riconosciuta. Seleziona fra le seguenti opzioni o specifica meglio l'origine.", - "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "Destinazione non riconosciuta. Seleziona fra le seguenti opzioni o specifica meglio la destinazione.", - "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Origine e destinazione non riconosciute. Seleziona fra le seguenti opzioni o specifica meglio l'origine e la destinazione.", - "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "Specificare tutti e 3 i fattori: triangleSafetyFactor, triangleSlopeFactor e triangleTimeFactor", - "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "La somma dai fattori triangleSafetyFactor, triangleSlopeFactor e triangleTimeFactor dev'essere pari a 1", - "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Se si forniscono i fattori triangleSafetyFactor, triangleSlopeFactor e triangleTimeFactor il parametro OptimizeType dev'essere settato a TRIANGLE", - "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Se il parametro OptimizeType è settato a TRIANGLE, si devono fornire i fattori triangleSafetyFactor, triangleSlopeFactor e triangleTimeFactor ", - "Set as Start Location": "Imposta Partenza", - "Set as End Location": "Imposta Arrivo", - "Destination": "Destinazione", - "Error %(error_id)d": "Errore %(error_id)d", - "No Trip Found": "nessun percoro trovato", - "Your %(bike_share_name)s route": "Percorso con %(bike_share_name)s ", - "Your bike route": "Percorso in bici", - "Walk to the %(bike_share_name)s dock.": "A piedi verso la stazione %(bike_share_name)s", - "Walk from the %(bike_share_name)s dock to your destination.": "A piedi dalla stazione %(bike_share_name)s a destinazione", - "Your walk route": "Percorso a piedi", - "Your route using the scooter": "", - "Your driving route": "Percorso in bici", - "north": "nord", - "northeast": "nord-est", - "east": "est", - "southeast": "sud-est", - "south": "sud", - "southwest": "sud-ovest", - "west": "ovest", - "northwest": "nod-ovest", - "hard left": "a sinistra", - "left": "a sinistra", - "slight left": "tenere la sinistra", - "continue": "continuare", - "slight right": "tenere la destra", - "right": "a destra", - "hard right": "a destra", - "elevator": "ascensore", - "U-turn left": "inversione di marcia", - "U-turn right": "inversione di marcia", - "Walk": "A piedi", - "Cycle": "bici", - "Car": "auto", - "Bus": "bus", - "Subway": "metro", - "Train": "treno", - "Ferry": "Ferry", - "Light Rail": "tram", - "Cable Car": "tram", - "Funicular": "funivia", - "Aerial Tram": "tram", - "Airplane": "", - "Bicycle rental station": "", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendere la rotonda in senso antiorario, %(ordinal_exit_number)s uscita, %(street_name)s", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendere la rotonda in senso antiorario, %(ordinal_exit_number)s uscita, %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendere la rotonda in senso orario, %(ordinal_exit_number)s uscita, %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendere la rotonda in senso orario, %(ordinal_exit_number)s uscita, %(street_name)s", - "Start on": "Partenza su", - " heading ": " in direzione ", - "to continue on": "continua su", - "on to": "su", - "first": "prima", - "second": "seconda", - "third": "terza", - "fourth": "quarta", - "fifth": "quinta", - "sixth": "sesta", - "seventh": "settima", - "eight": "ottava", - "ninth": "nona", - "tenth": "decima", - "%d hr": "%d h", - "%d hr_plural": "%d h", - "%d min": "%d m", - "%d min_plural": "%d m", - "%d sec": "%d s", - "%d sec_plural": "%d s", - "OK": "OK", - "Minimize": "Riduci a icona", - "Bring to front": "Porta in primo piano", - "Send to back": "Porta in secondo piano", - "Route:": "Linea:", - "Variant:": "Percorso:", - "Stop Finder": "Ricerca Fermata", - "Feed": "Azienda TPL", - "By ID": "Numero", - "By Name": "Nome", - "Search": "Cerca", - "No Stops Found": "Nessuna fermata trovata", - "Date": "Data", - "Find Stops": "Cerca fermata", - "(No Stop Selected)": "(nessuna fermata selezionata)", - "Block": "Turno", - "Recenter": "Centra", - "Viewer": "Passaggi", - "Quick": "Veloce", - "Flat": "Pianeggiante", - "Bike Friendly": "Sicuro", - "B": "S", - "F": "P", - "Q": "V", - "All Routes": "Linee", - "Save": "Salva", - "Close": "Chiudi", - "Travel Options": "Opzioni di viaggio", - "Geocoder": "Geocoder", - "Arrive": "Arrivo", - "Now": "Ora", - "Wheelchair accessible trip:": "Percorso accessibile:", - "Show Filtered Itineraries:": "", - "Travel by": "Modalità", - "Preferred Routes": "Linee preferite", - "Edit": "Modifica", - "None": "Nessuna", - "Weight": "Peso", - "Banned routes": "Linee da evitare", - "Use": "Usa", - "My Own Bike": "bici propria", - "A Shared Bike": "bike sharing", - "Plan Your Trip": "Calcola", - "Additional parameters": "", - " to _direction": " fino a ", - " to _bus_direction": " in direzione ", - "Start_template": "Partenza", - "Depart_itinerary": "Parti da", - "depart_itinerary": "Partenza", - "Start_popup": "Partenza", - "Depart_tripoptions": "Partenza" -} \ No newline at end of file + "Transit": "Mezzi pubblici", + "Bus Only": "Solo Bus", + "Rail Only": "Solo Treno", + "Airplane Only": "", + "Transit, No Airplane": "", + "Bicycle Only": "In bici", + "Bicycle & Transit": "Bici & mezzi pubblici", + "Walk Only": "A piedi", + "Car Only": "Partenza su", + "Taxi": "", + "Park and Ride": "Park & Ride", + "Ride and Kiss (Car Pickup)": "", + "Kiss and Ride (Car Dropoff)": "", + "Bike and Ride": "Bike & Ride", + "Rented Bicycle": "Bike sharing", + "Transit & Rented Bicycle": "Bike sharing & Ride", + "Rented Scooter": "", + "Transit & Rented Scooter": "Bike sharing & Ride", + "Transit with flex access": "", + "Transit with flex egress": "", + "Transit with flex access and egress": "", + "Direct flex search": "", + "Recenter Map Here": "Centra", + "Zoom In": "Zoom in", + "Zoom Out": "Zoom out", + "Minimize all": "Minimizza tutto", + "Unminimize all": "Ripristina tutto", + "Stop Viewer": "Orari", + "Plan Trip": "Calcola percorso", + "From Stop": "Da questa fermata", + "To Stop": "A questa fermata", + "Routes Serving Stop": "Linee", + "Bike Share Planner": "Bike Sharing", + "Trip Options": "Opzioni di viaggio", + "PICK UP BIKE": "Prendi la bici qui", + "ALTERNATE PICKUP": "Puoi prendere la bici anche qui", + "DROP OFF BIKE": "Lascia la bici qui", + "ALTERNATE DROP OFF": "Puoi lasciare la bici anche qui", + "BIKE STATION": "Stazione di Bike Sharing", + "Station:": "Stazione:", + "%d bike available": "%d bici disponibile", + "%d bike available_plural": "%d bici disponibili", + "%d dock available": "%d posto disponibile", + "%d dock available_plural": "%d posti disponibili", + "Recommended Pick Up:": "Prendi la bici:", + "Bicycle rental": "", + "Recommended Drop Off:": "Lascia la bici:", + "Multimodal Trip Planner": "Calcolo percorso multimodale", + "Itineraries": "Percorsi", + "This itinerary departs on a different day from the previous one": "", + "%d Itinerary Returned": "%d percorso trovato", + "%d Itinerary Returned_plural": "%d percorsi trovati", + "Link to search": "Link a questa ricerca", + "Previous Page": "Precedente", + "Next Page": "", + "CONTINUES AS": "Rimani a bordo", + "%d min late": "%d minuto di ritardo", + "%d min late_plural": "%d minuti di ritardo", + "%d min early": "%d minuto in anticipo", + "%d min early_plural": "%d minuti in anticipo", + "on time": "in orario", + "This itinerary departs on a different day than the one searched for": "", + "Arrived at destination with a rented bicycle!": "", + "End": "Arrivo", + "Trip Summary": "Riepilogo", + "Travel": "Partenza", + "Time": "Durata", + "GenCost": "", + "Total Walk": "A piedi", + "Total Bike": "In bici", + "Total drive": "", + "Elevation Gained": "", + "Elevation Lost": "", + "Transfers": "Cambi", + "Fare": "Costo", + "Valid": "Calcolato il ", + "Link to Itinerary": "Link a questo percorso", + "Print": "Stampa", + "Your Trip": "Il tuo percorso", + "Email": "Invia mail", + "every %d min": "ogni minuto", + "every %d min_plural": "ogni %d minuti", + "Board at ": "Parti da ", + "Stop": "Fermata", + "Time in transit": "Tempo a bordo", + "Route ID": "", + "Trip ID": "", + "Service Date": "", + "Trip Viewer": "Percorso", + "late as": "al più", + "Stay on board": "Rimani a bordo", + "Alight": "Scendi", + "at": "a", + "%(currency)s %(price)s": "%(currency)s %(price)s", + "Start: %(location)s at %(time_date)s": "Partenza: %(location)s alle %(time_date)s", + "Board": "Sali a bordo", + "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s fermata n.%(stop_id)s),", + "End: %(location)s at %(time_date)s": "Arrivo: %(location)s alle %(time_date)s", + "(%(agencyId)s Stop ID #%(id)s),": "", + "\nView itinerary online:\n%(itinerary_link)s\n": "\nConsulta il percorso online:\n%(itinerary_link)s\n", + "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Siamo spiacenti. Il servizio è momentaneamente indisponibile.Riprova più tardi.", + "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", + "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", + "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Nessun servizio di Trasporto Pubblico trovato. La data indicata potrebbe essere al di fuori del periodo preso in considerazione dal Calcolo Percorso.", + "The trip planner is taking way too long to process your request. Please try again later.": "Il servizio di Calcolo percorsi sta impiegando troppo tempo per processare la tua richiesta. Riprova più tardi.", + "The request has errors that the server is not willing or able to process.": "La richiesta contiene errori che il server non è in grado di trattare.", + "Origin is unknown. Can you be a bit more descriptive?": "Origine non riconosciuta. Puoi essere più esplicito?", + "Destination is unknown. Can you be a bit more descriptive?": "Destinazione non riconosciuta. Puoi essere più esplicito?", + "Both origin and destination are unknown. Can you be a bit more descriptive?": "Origine e destinazione non riconosciute. Puoi essere più esplicito?", + "Both origin and destination are not wheelchair accessible": "Origine e destinazione non accessibili in carrozzina", + "Origin is within a trivial distance of the destination.": "Origine troppo vicina alla destinazione.", + "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "Origine non riconosciuta. Seleziona fra le seguenti opzioni o specifica meglio l'origine.", + "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "Destinazione non riconosciuta. Seleziona fra le seguenti opzioni o specifica meglio la destinazione.", + "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Origine e destinazione non riconosciute. Seleziona fra le seguenti opzioni o specifica meglio l'origine e la destinazione.", + "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "Specificare tutti e 3 i fattori: triangleSafetyFactor, triangleSlopeFactor e triangleTimeFactor", + "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "La somma dai fattori triangleSafetyFactor, triangleSlopeFactor e triangleTimeFactor dev'essere pari a 1", + "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Se si forniscono i fattori triangleSafetyFactor, triangleSlopeFactor e triangleTimeFactor il parametro OptimizeType dev'essere settato a TRIANGLE", + "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Se il parametro OptimizeType è settato a TRIANGLE, si devono fornire i fattori triangleSafetyFactor, triangleSlopeFactor e triangleTimeFactor ", + "Set as Start Location": "Imposta Partenza", + "Set as End Location": "Imposta Arrivo", + "Destination": "Destinazione", + "Error %(error_id)d": "Errore %(error_id)d", + "No Trip Found": "nessun percoro trovato", + "Your %(bike_share_name)s route": "Percorso con %(bike_share_name)s ", + "Your bike route": "Percorso in bici", + "Walk to the %(bike_share_name)s dock.": "A piedi verso la stazione %(bike_share_name)s", + "Walk from the %(bike_share_name)s dock to your destination.": "A piedi dalla stazione %(bike_share_name)s a destinazione", + "Your walk route": "Percorso a piedi", + "Your route using the scooter": "", + "Your driving route": "Percorso in bici", + "north": "nord", + "northeast": "nord-est", + "east": "est", + "southeast": "sud-est", + "south": "sud", + "southwest": "sud-ovest", + "west": "ovest", + "northwest": "nod-ovest", + "hard left": "a sinistra", + "left": "a sinistra", + "slight left": "tenere la sinistra", + "continue": "continuare", + "slight right": "tenere la destra", + "right": "a destra", + "hard right": "a destra", + "elevator": "ascensore", + "U-turn left": "inversione di marcia", + "U-turn right": "inversione di marcia", + "Walk": "A piedi", + "Cycle": "bici", + "Car": "auto", + "Bus": "bus", + "Subway": "metro", + "Train": "treno", + "Ferry": "Ferry", + "Light Rail": "tram", + "Cable Car": "tram", + "Funicular": "funivia", + "Aerial Tram": "tram", + "Airplane": "", + "Bicycle rental station": "", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendere la rotonda in senso antiorario, %(ordinal_exit_number)s uscita, %(street_name)s", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendere la rotonda in senso antiorario, %(ordinal_exit_number)s uscita, %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendere la rotonda in senso orario, %(ordinal_exit_number)s uscita, %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Prendere la rotonda in senso orario, %(ordinal_exit_number)s uscita, %(street_name)s", + "Start on": "Partenza su", + " heading ": " in direzione ", + "to continue on": "continua su", + "on to": "su", + "first": "prima", + "second": "seconda", + "third": "terza", + "fourth": "quarta", + "fifth": "quinta", + "sixth": "sesta", + "seventh": "settima", + "eight": "ottava", + "ninth": "nona", + "tenth": "decima", + "%d hr": "%d h", + "%d hr_plural": "%d h", + "%d min": "%d m", + "%d min_plural": "%d m", + "%d sec": "%d s", + "%d sec_plural": "%d s", + "OK": "OK", + "Minimize": "Riduci a icona", + "Bring to front": "Porta in primo piano", + "Send to back": "Porta in secondo piano", + "Route:": "Linea:", + "Variant:": "Percorso:", + "Stop Finder": "Ricerca Fermata", + "Feed": "Azienda TPL", + "By ID": "Numero", + "By Name": "Nome", + "Search": "Cerca", + "No Stops Found": "Nessuna fermata trovata", + "Date": "Data", + "Find Stops": "Cerca fermata", + "(No Stop Selected)": "(nessuna fermata selezionata)", + "Block": "Turno", + "Recenter": "Centra", + "Viewer": "Passaggi", + "Quick": "Veloce", + "Flat": "Pianeggiante", + "Bike Friendly": "Sicuro", + "B": "S", + "F": "P", + "Q": "V", + "All Routes": "Linee", + "Save": "Salva", + "Close": "Chiudi", + "Travel Options": "Opzioni di viaggio", + "Geocoder": "Geocoder", + "Arrive": "Arrivo", + "Now": "Ora", + "Wheelchair accessible trip:": "Percorso accessibile:", + "Show Filtered Itineraries:": "", + "Travel by": "Modalità", + "Preferred Routes": "Linee preferite", + "Edit": "Modifica", + "None": "Nessuna", + "Weight": "Peso", + "Banned routes": "Linee da evitare", + "Use": "Usa", + "My Own Bike": "bici propria", + "A Shared Bike": "bike sharing", + "Plan Your Trip": "Calcola", + "Additional parameters": "", + " to _direction": " fino a ", + " to _bus_direction": " in direzione ", + "Start_template": "Partenza", + "Depart_itinerary": "Parti da", + "depart_itinerary": "Partenza", + "Start_popup": "Partenza", + "Depart_tripoptions": "Partenza" +} diff --git a/application/src/client/classic-debug/js/otp/locale/no.json b/application/src/client/classic-debug/js/otp/locale/no.json index 5a64e60d2a6..e26b87d5e22 100644 --- a/application/src/client/classic-debug/js/otp/locale/no.json +++ b/application/src/client/classic-debug/js/otp/locale/no.json @@ -1,238 +1,238 @@ { - "Transit": "Kollektivtransport", - "Bus Only": "Buss", - "Rail Only": "Tog", - "Airplane Only": "Fly", - "Transit, No Airplane": "", - "Bicycle Only": "Sykkel", - "Bicycle & Transit": "Sykkel & Kollektivtransport", - "Walk Only": "Gå", - "Car Only": "Start fra", - "Taxi": "", - "Park and Ride": "Park and Ride", - "Ride and Kiss (Car Pickup)": "", - "Kiss and Ride (Car Dropoff)": "", - "Bike and Ride": "Bike and Ride", - "Rented Bicycle": "Bysykkel", - "Transit & Rented Bicycle": "Kollektivtransport & Bysykkel", - "Rented Scooter": "", - "Transit & Rented Scooter": "Kollektivtransport & Bysykkel", - "Transit with flex access": "", - "Transit with flex egress": "", - "Transit with flex access and egress": "", - "Direct flex search": "", - "Recenter Map Here": "Sentrer kart her", - "Zoom In": "Zoom inn", - "Zoom Out": "Zoom ut", - "Minimize all": "Minimer vinduer", - "Unminimize all": "Vis vinduer", - "Stop Viewer": "Vis Stoppested", - "Plan Trip": "Reiseplanlegger", - "From Stop": "Fra stoppested", - "To Stop": "Til stoppested", - "Routes Serving Stop": "Ruter fra stoppested", - "Bike Share Planner": "Bike Share Planner", - "Trip Options": "Reise søk", - "PICK UP BIKE": "PICK UP BIKE", - "ALTERNATE PICKUP": "ALTERNATE PICKUP", - "DROP OFF BIKE": "DROP OFF BIKE", - "ALTERNATE DROP OFF": "ALTERNATE DROP OFF", - "BIKE STATION": "BIKE STATION", - "Station:": "Stasjon:", - "%d bike available": "%d sykkel tilgjengelig", - "%d bike available_plural": "%d sykler tilgjengelig", - "%d dock available": "%d plass ledig", - "%d dock available_plural": "%d plasser ledig", - "Recommended Pick Up:": "Anbefalt Pick Up:", - "Bicycle rental": "Bysykkel", - "Recommended Drop Off:": "Anbefalt Drop Off:", - "Multimodal Trip Planner": "Reiseplanlegger", - "Itineraries": "Vis Reiseplaner", - "This itinerary departs on a different day from the previous one": "", - "%d Itinerary Returned": "%d Reise alternativ", - "%d Itinerary Returned_plural": "%d Reise alternativer", - "Link to search": "Link til søk", - "Previous Page": "Forrige", - "Next Page": "", - "CONTINUES AS": "FORTSETTER SOM", - "%d min late": "%d minutt forsinket", - "%d min late_plural": "%d minutter forsinket", - "%d min early": "%d minutt fortidlig", - "%d min early_plural": "%d minutter fortidlig", - "on time": "i rute", - "This itinerary departs on a different day than the one searched for": "", - "Arrived at destination with a rented bicycle!": "", - "End": "Til", - "Trip Summary": "Reise oversikt", - "Travel": "Start", - "Time": "Reisetid", - "GenCost": "Kost", - "Total Walk": "Gangeavstand", - "Total Bike": "Sykkel distanse", - "Total drive": "Bil distanse", - "Elevation Gained": "", - "Elevation Lost": "", - "Transfers": "Bytter", - "Fare": "Pris", - "Valid": "Gyldig", - "Link to Itinerary": "Link til reise", - "Print": "Skriv ut", - "Your Trip": "Din reise", - "Email": "e-post", - "every %d min": "hvert minutt", - "every %d min_plural": "hvert %d minutt", - "Board at ": "Påstigning ", - "Stop": "Stoppested", - "Time in transit": "Tid kollektivtransport", - "Route ID": "", - "Trip ID": "", - "Service Date": "", - "Trip Viewer": "Vis Rute", - "late as": "sent som", - "Stay on board": "Bli om bord", - "Alight": "Avstigning", - "at": "på", - "%(currency)s %(price)s": "%(currency)s %(price)s", - "Start: %(location)s at %(time_date)s": "Fra: %(location)s klokka %(time_date)s", - "Board": "Påstigning", - "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s Stoppested ID #%(stop_id)s),", - "End: %(location)s at %(time_date)s": "Ankomst: %(location)s klokka %(time_date)s", - "(%(agencyId)s Stop ID #%(id)s),": "", - "\nView itinerary online:\n%(itinerary_link)s\n": "\nVis reiseplan:\n%(itinerary_link)s\n", - "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Beklager. Reiseplanleggeren er midlertidig utilgjengelig. Venligst forsøk igjen senere.", - "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", - "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "Ingen reise funnet. Sjekk at fra/til sted er innenfor angitt gangavstand til destinasjon, stopested, bysykkel-stativ og/eller påstigningspunkt for bil.", - "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Ingen kolektivreiser funnet for denne dagen.", - "The trip planner is taking way too long to process your request. Please try again later.": "Reiseplanleggeren svarer ikke på forspørsel. Prøv igjen senere.", - "The request has errors that the server is not willing or able to process.": "Ugyldig input data. Server er ikke i stand til å behandle 'RouteRequest'.", - "Origin is unknown. Can you be a bit more descriptive?": "Avreisested er ukjent. Kan du spesifisere nærmere?", - "Destination is unknown. Can you be a bit more descriptive?": "Reisemålet er ukjent. Kan du spesifisere nærmere?", - "Both origin and destination are unknown. Can you be a bit more descriptive?": "Både fra/til sted er ukjent. Kan du spesifisere nærmere?", - "Both origin and destination are not wheelchair accessible": "Både fra/til sted er utilgjengelig for rullestolukjent.", - "Origin is within a trivial distance of the destination.": "Du kan klare å gå? Det er bare noen få meter.", - "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.", - "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.", - "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Both origin and destination are ambiguous. Please select from the following options, or be more specific.", - "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are", - "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1", - "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE", - "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set", - "Set as Start Location": "Reis herfra", - "Set as End Location": "Reis hit", - "Destination": "Destinasjon", - "Error %(error_id)d": "Feil %(error_id)d", - "No Trip Found": "Ingen tur tilgjenglig", - "Your %(bike_share_name)s route": "Din %(bike_share_name)s rute", - "Your bike route": "Din sykkel rute", - "Walk to the %(bike_share_name)s dock.": "Gå til %(bike_share_name)s sykkelstativ.", - "Walk from the %(bike_share_name)s dock to your destination.": "Walk from the %(bike_share_name)s dock to your destination.", - "Your walk route": "Your walk route", - "Your route using the scooter": "", - "Your driving route": "Din sykkel rute", - "north": "nord", - "northeast": "nordøst", - "east": "øst", - "southeast": "sørøst", - "south": "sør", - "southwest": "sørvest", - "west": "vest", - "northwest": "nordvest", - "hard left": "skart venstre", - "left": "venstre", - "slight left": "svakt venstre", - "continue": "fortsett", - "slight right": "svakt høyre", - "right": "høyre", - "hard right": "skart høyre", - "elevator": "heis", - "U-turn left": "U-sving venstre", - "U-turn right": "U-sving høyre", - "Walk": "Gå", - "Cycle": "Sykkel", - "Car": "Bil", - "Bus": "Buss", - "Subway": "T-bane", - "Train": "Tog", - "Ferry": "Ferje", - "Light Rail": "Trikk", - "Cable Car": "Cable Car", - "Funicular": "Kabelbane", - "Aerial Tram": "Tau bane", - "Airplane": "Fly", - "Bicycle rental station": "Bysykkelstativ", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Følg rundkjøringen mot klokka ta %(ordinal_exit_number)s avkjøring til %(street_name)s", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Følg rundkjøring mot klokka, ta %(ordinal_exit_number)s avkjøring til %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Følg rundkjøring med klokka, ta %(ordinal_exit_number)s avkjøring til %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Følg rundkjøring med klokka, ta %(ordinal_exit_number)s avkjøring til %(street_name)s", - "Start on": "Start fra", - " heading ": " mot ", - "to continue on": "fortsett på", - "on to": "på", - "first": "første", - "second": "andre", - "third": "tredje", - "fourth": "fjerde", - "fifth": "femte", - "sixth": "sjette", - "seventh": "syvende", - "eight": "åttende", - "ninth": "niende", - "tenth": "tidende", - "%d hr": "%d time", - "%d hr_plural": "%d timer", - "%d min": "%d minutt", - "%d min_plural": "%d minutter", - "%d sec": "%d sekund", - "%d sec_plural": "%d sekunder", - "OK": "OK", - "Minimize": "Minimer vinduer", - "Bring to front": "Flytt fremst", - "Send to back": "Flytt bakerst", - "Route:": "Rute:", - "Variant:": "Alternativ:", - "Stop Finder": "Søk Stoppested", - "Feed": "Agency", - "By ID": "Med ID", - "By Name": "Med Navn", - "Search": "Søk", - "No Stops Found": "Stoppested ikke funnet", - "Date": "Date", - "Find Stops": "Søk Stoppested", - "(No Stop Selected)": "(Ingen Stoppested valgt)", - "Block": "Block", - "Recenter": "Sentrer", - "Viewer": "Vis", - "Quick": "Rask", - "Flat": "Flat", - "Bike Friendly": "Sykkel vennlig", - "B": "B", - "F": "F", - "Q": "R", - "All Routes": "Alle Ruter", - "Save": "Lagre", - "Close": "Lukk", - "Travel Options": "Reise Resultater", - "Geocoder": "Geocoder", - "Arrive": "Ankomst", - "Now": "Nå", - "Wheelchair accessible trip:": "Tilgjenelig for rullestol:", - "Show Filtered Itineraries:": "", - "Travel by": "Reis med", - "Preferred Routes": "Foretrukket rute", - "Edit": "Endre", - "None": "Ingen", - "Weight": "Weight", - "Banned routes": "Untatt rute", - "Use": "Bruk", - "My Own Bike": "Egen Sykkel", - "A Shared Bike": "Bysykkel", - "Plan Your Trip": "Planlegg Reise", - "Additional parameters": "", - " to _direction": " til ", - " to _bus_direction": " til ", - "Start_template": "Fra", - "Depart_itinerary": "Avgang", - "depart_itinerary": "Avreise", - "Start_popup": "Start", - "Depart_tripoptions": "Avgang" -} \ No newline at end of file + "Transit": "Kollektivtransport", + "Bus Only": "Buss", + "Rail Only": "Tog", + "Airplane Only": "Fly", + "Transit, No Airplane": "", + "Bicycle Only": "Sykkel", + "Bicycle & Transit": "Sykkel & Kollektivtransport", + "Walk Only": "Gå", + "Car Only": "Start fra", + "Taxi": "", + "Park and Ride": "Park and Ride", + "Ride and Kiss (Car Pickup)": "", + "Kiss and Ride (Car Dropoff)": "", + "Bike and Ride": "Bike and Ride", + "Rented Bicycle": "Bysykkel", + "Transit & Rented Bicycle": "Kollektivtransport & Bysykkel", + "Rented Scooter": "", + "Transit & Rented Scooter": "Kollektivtransport & Bysykkel", + "Transit with flex access": "", + "Transit with flex egress": "", + "Transit with flex access and egress": "", + "Direct flex search": "", + "Recenter Map Here": "Sentrer kart her", + "Zoom In": "Zoom inn", + "Zoom Out": "Zoom ut", + "Minimize all": "Minimer vinduer", + "Unminimize all": "Vis vinduer", + "Stop Viewer": "Vis Stoppested", + "Plan Trip": "Reiseplanlegger", + "From Stop": "Fra stoppested", + "To Stop": "Til stoppested", + "Routes Serving Stop": "Ruter fra stoppested", + "Bike Share Planner": "Bike Share Planner", + "Trip Options": "Reise søk", + "PICK UP BIKE": "PICK UP BIKE", + "ALTERNATE PICKUP": "ALTERNATE PICKUP", + "DROP OFF BIKE": "DROP OFF BIKE", + "ALTERNATE DROP OFF": "ALTERNATE DROP OFF", + "BIKE STATION": "BIKE STATION", + "Station:": "Stasjon:", + "%d bike available": "%d sykkel tilgjengelig", + "%d bike available_plural": "%d sykler tilgjengelig", + "%d dock available": "%d plass ledig", + "%d dock available_plural": "%d plasser ledig", + "Recommended Pick Up:": "Anbefalt Pick Up:", + "Bicycle rental": "Bysykkel", + "Recommended Drop Off:": "Anbefalt Drop Off:", + "Multimodal Trip Planner": "Reiseplanlegger", + "Itineraries": "Vis Reiseplaner", + "This itinerary departs on a different day from the previous one": "", + "%d Itinerary Returned": "%d Reise alternativ", + "%d Itinerary Returned_plural": "%d Reise alternativer", + "Link to search": "Link til søk", + "Previous Page": "Forrige", + "Next Page": "", + "CONTINUES AS": "FORTSETTER SOM", + "%d min late": "%d minutt forsinket", + "%d min late_plural": "%d minutter forsinket", + "%d min early": "%d minutt fortidlig", + "%d min early_plural": "%d minutter fortidlig", + "on time": "i rute", + "This itinerary departs on a different day than the one searched for": "", + "Arrived at destination with a rented bicycle!": "", + "End": "Til", + "Trip Summary": "Reise oversikt", + "Travel": "Start", + "Time": "Reisetid", + "GenCost": "Kost", + "Total Walk": "Gangeavstand", + "Total Bike": "Sykkel distanse", + "Total drive": "Bil distanse", + "Elevation Gained": "", + "Elevation Lost": "", + "Transfers": "Bytter", + "Fare": "Pris", + "Valid": "Gyldig", + "Link to Itinerary": "Link til reise", + "Print": "Skriv ut", + "Your Trip": "Din reise", + "Email": "e-post", + "every %d min": "hvert minutt", + "every %d min_plural": "hvert %d minutt", + "Board at ": "Påstigning ", + "Stop": "Stoppested", + "Time in transit": "Tid kollektivtransport", + "Route ID": "", + "Trip ID": "", + "Service Date": "", + "Trip Viewer": "Vis Rute", + "late as": "sent som", + "Stay on board": "Bli om bord", + "Alight": "Avstigning", + "at": "på", + "%(currency)s %(price)s": "%(currency)s %(price)s", + "Start: %(location)s at %(time_date)s": "Fra: %(location)s klokka %(time_date)s", + "Board": "Påstigning", + "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s Stoppested ID #%(stop_id)s),", + "End: %(location)s at %(time_date)s": "Ankomst: %(location)s klokka %(time_date)s", + "(%(agencyId)s Stop ID #%(id)s),": "", + "\nView itinerary online:\n%(itinerary_link)s\n": "\nVis reiseplan:\n%(itinerary_link)s\n", + "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Beklager. Reiseplanleggeren er midlertidig utilgjengelig. Venligst forsøk igjen senere.", + "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", + "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "Ingen reise funnet. Sjekk at fra/til sted er innenfor angitt gangavstand til destinasjon, stopested, bysykkel-stativ og/eller påstigningspunkt for bil.", + "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Ingen kolektivreiser funnet for denne dagen.", + "The trip planner is taking way too long to process your request. Please try again later.": "Reiseplanleggeren svarer ikke på forspørsel. Prøv igjen senere.", + "The request has errors that the server is not willing or able to process.": "Ugyldig input data. Server er ikke i stand til å behandle 'RouteRequest'.", + "Origin is unknown. Can you be a bit more descriptive?": "Avreisested er ukjent. Kan du spesifisere nærmere?", + "Destination is unknown. Can you be a bit more descriptive?": "Reisemålet er ukjent. Kan du spesifisere nærmere?", + "Both origin and destination are unknown. Can you be a bit more descriptive?": "Både fra/til sted er ukjent. Kan du spesifisere nærmere?", + "Both origin and destination are not wheelchair accessible": "Både fra/til sted er utilgjengelig for rullestolukjent.", + "Origin is within a trivial distance of the destination.": "Du kan klare å gå? Det er bare noen få meter.", + "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.", + "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.", + "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Both origin and destination are ambiguous. Please select from the following options, or be more specific.", + "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are", + "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1", + "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE", + "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set", + "Set as Start Location": "Reis herfra", + "Set as End Location": "Reis hit", + "Destination": "Destinasjon", + "Error %(error_id)d": "Feil %(error_id)d", + "No Trip Found": "Ingen tur tilgjenglig", + "Your %(bike_share_name)s route": "Din %(bike_share_name)s rute", + "Your bike route": "Din sykkel rute", + "Walk to the %(bike_share_name)s dock.": "Gå til %(bike_share_name)s sykkelstativ.", + "Walk from the %(bike_share_name)s dock to your destination.": "Walk from the %(bike_share_name)s dock to your destination.", + "Your walk route": "Your walk route", + "Your route using the scooter": "", + "Your driving route": "Din sykkel rute", + "north": "nord", + "northeast": "nordøst", + "east": "øst", + "southeast": "sørøst", + "south": "sør", + "southwest": "sørvest", + "west": "vest", + "northwest": "nordvest", + "hard left": "skart venstre", + "left": "venstre", + "slight left": "svakt venstre", + "continue": "fortsett", + "slight right": "svakt høyre", + "right": "høyre", + "hard right": "skart høyre", + "elevator": "heis", + "U-turn left": "U-sving venstre", + "U-turn right": "U-sving høyre", + "Walk": "Gå", + "Cycle": "Sykkel", + "Car": "Bil", + "Bus": "Buss", + "Subway": "T-bane", + "Train": "Tog", + "Ferry": "Ferje", + "Light Rail": "Trikk", + "Cable Car": "Cable Car", + "Funicular": "Kabelbane", + "Aerial Tram": "Tau bane", + "Airplane": "Fly", + "Bicycle rental station": "Bysykkelstativ", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Følg rundkjøringen mot klokka ta %(ordinal_exit_number)s avkjøring til %(street_name)s", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Følg rundkjøring mot klokka, ta %(ordinal_exit_number)s avkjøring til %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Følg rundkjøring med klokka, ta %(ordinal_exit_number)s avkjøring til %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Følg rundkjøring med klokka, ta %(ordinal_exit_number)s avkjøring til %(street_name)s", + "Start on": "Start fra", + " heading ": " mot ", + "to continue on": "fortsett på", + "on to": "på", + "first": "første", + "second": "andre", + "third": "tredje", + "fourth": "fjerde", + "fifth": "femte", + "sixth": "sjette", + "seventh": "syvende", + "eight": "åttende", + "ninth": "niende", + "tenth": "tidende", + "%d hr": "%d time", + "%d hr_plural": "%d timer", + "%d min": "%d minutt", + "%d min_plural": "%d minutter", + "%d sec": "%d sekund", + "%d sec_plural": "%d sekunder", + "OK": "OK", + "Minimize": "Minimer vinduer", + "Bring to front": "Flytt fremst", + "Send to back": "Flytt bakerst", + "Route:": "Rute:", + "Variant:": "Alternativ:", + "Stop Finder": "Søk Stoppested", + "Feed": "Agency", + "By ID": "Med ID", + "By Name": "Med Navn", + "Search": "Søk", + "No Stops Found": "Stoppested ikke funnet", + "Date": "Date", + "Find Stops": "Søk Stoppested", + "(No Stop Selected)": "(Ingen Stoppested valgt)", + "Block": "Block", + "Recenter": "Sentrer", + "Viewer": "Vis", + "Quick": "Rask", + "Flat": "Flat", + "Bike Friendly": "Sykkel vennlig", + "B": "B", + "F": "F", + "Q": "R", + "All Routes": "Alle Ruter", + "Save": "Lagre", + "Close": "Lukk", + "Travel Options": "Reise Resultater", + "Geocoder": "Geocoder", + "Arrive": "Ankomst", + "Now": "Nå", + "Wheelchair accessible trip:": "Tilgjenelig for rullestol:", + "Show Filtered Itineraries:": "", + "Travel by": "Reis med", + "Preferred Routes": "Foretrukket rute", + "Edit": "Endre", + "None": "Ingen", + "Weight": "Weight", + "Banned routes": "Untatt rute", + "Use": "Bruk", + "My Own Bike": "Egen Sykkel", + "A Shared Bike": "Bysykkel", + "Plan Your Trip": "Planlegg Reise", + "Additional parameters": "", + " to _direction": " til ", + " to _bus_direction": " til ", + "Start_template": "Fra", + "Depart_itinerary": "Avgang", + "depart_itinerary": "Avreise", + "Start_popup": "Start", + "Depart_tripoptions": "Avgang" +} diff --git a/application/src/client/classic-debug/js/otp/locale/pl.json b/application/src/client/classic-debug/js/otp/locale/pl.json index 5cf5a9c71b5..33cf622f930 100644 --- a/application/src/client/classic-debug/js/otp/locale/pl.json +++ b/application/src/client/classic-debug/js/otp/locale/pl.json @@ -1,247 +1,247 @@ { - "Transit": "komunikacją publiczną", - "Bus Only": "wyłącznie autobusami", - "Rail Only": "wyłącznie koleją", - "Airplane Only": "", - "Transit, No Airplane": "", - "Bicycle Only": "wyłącznie rowerem", - "Bicycle & Transit": "rowerem & komunikacją publiczną", - "Walk Only": "wyłącznie pieszo", - "Car Only": "Rozpocznij na ulicy", - "Taxi": "", - "Park and Ride": "schemat P+R (Park and Ride)", - "Ride and Kiss (Car Pickup)": "", - "Kiss and Ride (Car Dropoff)": "", - "Bike and Ride": "schemat B+R (Bike and Ride)", - "Rented Bicycle": "wypożyczonym rowerem", - "Transit & Rented Bicycle": "kom. publiczną & wypoż. rowerem", - "Rented Scooter": "", - "Transit & Rented Scooter": "kom. publiczną & wypoż. rowerem", - "Transit with flex access": "", - "Transit with flex egress": "", - "Transit with flex access and egress": "", - "Direct flex search": "", - "Recenter Map Here": "Wyśrodkuj mapę w tym miejscu", - "Zoom In": "Przybliż", - "Zoom Out": "Oddal", - "Minimize all": "Minimalizuj wszystko", - "Unminimize all": "Maskymalizuj wszystko", - "Stop Viewer": "Zatrzymaj podgląd", - "Plan Trip": "Zaplanuj podróż", - "From Stop": "Z przystanku", - "To Stop": "Do przystanku", - "Routes Serving Stop": "Trasy obsługujące dany przystanek", - "Bike Share Planner": "Planner wypożyczenia roweru", - "Trip Options": "Trasa", - "PICK UP BIKE": "WYPOŻYCZ ROWER", - "ALTERNATE PICKUP": "ALTERNATYWNY PUNKT WYPOŻYCZENIA", - "DROP OFF BIKE": "ODDAJ ROWER", - "ALTERNATE DROP OFF": "ALTERNATYWNY PUNKT ODDANIA ROWERU", - "BIKE STATION": "STACJA ROWEROWA", - "Station:": "Stacja:", - "%d bike available_0": "%d dostępny rower", - "%d bike available_1": "%d dostępne rowery", - "%d bike available_2": "%d dostępnych rowerów", - "%d dock available_0": "%d dostępna stacja", - "%d dock available_1": "%d dostępne stacje", - "%d dock available_2": "%d dostępnych stacji", - "Recommended Pick Up:": "Rekomendowane miejsce wypożyczenia roweru:", - "Bicycle rental": "Wypożyczalnia rowerów", - "Recommended Drop Off:": "Rekomendowane miejsce oddania roweru:", - "Multimodal Trip Planner": "Planner Podróży", - "Itineraries": "Trasy", - "This itinerary departs on a different day from the previous one": "", - "%d Itinerary Returned_0": "%d zwrócona trasa", - "%d Itinerary Returned_1": "%d zwrócone trasy", - "%d Itinerary Returned_2": "%d zwróconych tras", - "Link to search": "Link do wyszukiwania", - "Previous Page": "Poprzednia", - "Next Page": "", - "CONTINUES AS": "POZOSTAŃ", - "%d min late_0": "%d minuta opóźnienia", - "%d min late_1": "%d minuty opóźnienia", - "%d min late_2": "%d minut opóźnienia", - "%d min early_0": "%d minuta przed czasem", - "%d min early_1": "%d minuty przed czasem", - "%d min early_2": "%d minut przed czasem", - "on time": "na czas", - "This itinerary departs on a different day than the one searched for": "", - "Arrived at destination with a rented bicycle!": "", - "End": "Koniec", - "Trip Summary": "Podsumowanie podróży", - "Travel": "Podróż", - "Time": "Czas trwania podróży", - "GenCost": "", - "Total Walk": "Długość trasy do pokonania pieszo", - "Total Bike": "Długośc trasy do pokonania rowerem", - "Total drive": "", - "Elevation Gained": "", - "Elevation Lost": "", - "Transfers": "Przesiadki", - "Fare": "Koszt", - "Valid": "Aktualna", - "Link to Itinerary": "Link do trasy", - "Print": "Drukuj", - "Your Trip": "Zaplanowana podróż", - "Email": "Adres e-mail", - "every %d min_0": "co %d minutę", - "every %d min_1": "co %d minuty", - "every %d min_2": "co %d minut", - "Board at ": "Wyjazd o", - "Stop": "Przystanek", - "Time in transit": "Czas spędzony w komunikacji publicznej", - "Route ID": "", - "Trip ID": "", - "Service Date": "", - "Trip Viewer": "Podgląd podróży", - "late as": "dopiero jak", - "Stay on board": "Kontynuuj podróż", - "Alight": "Wysiądź", - "at": "na przystanku", - "%(currency)s %(price)s": "%(currency)s %(price)s", - "Start: %(location)s at %(time_date)s": "Początek: %(location)s o %(time_date)s", - "Board": "Wyjazd", - "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s ID przystanku #%(stop_id)s),", - "End: %(location)s at %(time_date)s": "Koniec: %(location)s o %(time_date)s", - "(%(agencyId)s Stop ID #%(id)s),": "", - "\nView itinerary online:\n%(itinerary_link)s\n": "\nWyświetl trasę w trybie online:\n%(itinerary_link)s\n", - "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Przepraszamy. Planer podróży jest obecnie niedostępny. Prosimy o ponowienie próby w późniejszym czasie.", - "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", - "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", - "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Brak informacji o rozkładzie komunikacji publicznej. Obowiązujące dane mogą być nieaktualne, bądź niekompatybilne w wybranym czasie z zaplanowaną trasą.", - "The trip planner is taking way too long to process your request. Please try again later.": "Planer podróży nie jest w stanie przetwożyć powierzonego mu zadania. Prosimy o ponowienie próby w późniejszym czasie.", - "The request has errors that the server is not willing or able to process.": "Wybrane zapytanie posiada błędy, których serwer nie jest w stanie obsłużyć.", - "Origin is unknown. Can you be a bit more descriptive?": "Wystąpił problem z określeniem lokalizacji startowej. Czy mógłbyś sprecyzować zapytanie?", - "Destination is unknown. Can you be a bit more descriptive?": "Wystąpił problem z określeniem lokalizacji końcowej. Czy mógłbyś sprecyzować zapytanie?", - "Both origin and destination are unknown. Can you be a bit more descriptive?": "Wystąpił problem z określeniem lokalizacji startowej oraz końcowej. Czy mógłbyś sprecyzować zapytanie?", - "Both origin and destination are not wheelchair accessible": "Zarówno lokalizacja startowa, jak i końcowa, nie oferuje udogodnień dla osób niepełnosprawnych.", - "Origin is within a trivial distance of the destination.": "Lokalizacja początkowa jest zlokalizowana w nieznacznej odległości od miejsca docelowego.", - "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "Planer podróży nie może zinterpretować lokalizacji początkowej. Prosimy o wybranie jednej z poniższych opcji, bądź sprecyzować zapytanie.", - "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "Planer podróży nie może zinterpretować lokalizacji końcowej. Prosimy o wybranie jednej z poniższych opcji, bądź sprecyzować zapytanie.", - "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Zarówno lokalizacja początkowa, jak i końcowa nie została poprawnie ziterpretowana przez planer podróży. Prosimy o wybranie pozycji dostępnych na liście poniżej, bądź sprecyzować zapytanie.", - "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "Każdy z parametrów triangleSafetyFactor (bezpieczeństwo), triangleSlopeFactor (nachylenie) i triangleTimeFactor (czas) musi zostać ustawiony, jeśli na trasie znajdują się dane punkty.", - "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "Suma wartości w parametrach triangleSafetyFactor, triangleSlopeFactor i triangleTimeFactor musi wynieśc równo 1.", - "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Jeśli zostały wprowadzone parametry triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor, wartość OptimizeType musi wskazywać na TRIANGLE (TRÓJKĄT)", - "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Jeśli wartość pola OptimizeType wskazuje na TRIANGLE (TRÓJKĄT), należy podać parametry zmiennych triangleSafetyFactor, triangleSlopeFactor oraz triangleTimeFactor.", - "Set as Start Location": "Wybierz jako punkt początkowy", - "Set as End Location": "Wybierz jako punkt końcowy", - "Destination": "Cel", - "Error %(error_id)d": "Błąd %(error_id)d", - "No Trip Found": "Trasa nie została wyznaczona", - "Your %(bike_share_name)s route": "Twoja trasa : %(bike_share_name)s", - "Your bike route": "Trasa pokonana rowerem", - "Walk to the %(bike_share_name)s dock.": "Przejdź do doku %(bike_share_name)s", - "Walk from the %(bike_share_name)s dock to your destination.": "Przejdź z doku %(bike_share_name)s do punktu docelowego", - "Your walk route": "Trasa pokonana pieszo", - "Your route using the scooter": "", - "Your driving route": "Trasa pokonana rowerem", - "north": "północ", - "northeast": "północny wschód", - "east": "wschód", - "southeast": "południowy wschód", - "south": "południe", - "southwest": "południowy zachód", - "west": "zachód", - "northwest": "północny zachód", - "hard left": "ostro w lewo", - "left": "lewo", - "slight left": "łagodnie w lewo", - "continue": "utrzymuj kierunek", - "slight right": "łagodnie w prawo", - "right": "prawo", - "hard right": "ostro w prawo", - "elevator": "wzniesienie", - "U-turn left": "nawrót w lewo", - "U-turn right": "nawrót w prawo", - "Walk": "Spacer", - "Cycle": "Rower", - "Car": "Samochód", - "Bus": "Autobus", - "Subway": "Metro", - "Train": "Pociąg", - "Ferry": "Prom", - "Light Rail": "Light Rail", - "Cable Car": "Kolejka linowa", - "Funicular": "Kolej linowo-terenowa", - "Aerial Tram": "Kolej linowa", - "Airplane": "", - "Bicycle rental station": "Stacja wypożyczalni rowerów", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Przejedź przez rondo przeciwnie do ruchów wskazówki zegara do %(ordinal_exit_number)s wyjazdu na ulicę %(street_name)s", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Przejedź przez rondo przeciwnie do ruchów wskazówki zegara do %(ordinal_exit_number)s wyjazdu na ulicę %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Przejedź przez rondo zgodnie z ruchem wskazówki zegara do %(ordinal_exit_number)s wyjazdu na ulicę %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Przejedź przez rondo zgodnie z ruchem wskazówki zegara do %(ordinal_exit_number)s wyjazdu na ulicę %(street_name)s", - "Start on": "Rozpocznij na ulicy", - " heading ": "kierując się na", - "to continue on": "kieruj się w stronę", - "on to": "ulicy", - "first": "pierwszego", - "second": "drugiego", - "third": "trzeciego", - "fourth": "czwartego", - "fifth": "piątego", - "sixth": "szóstego", - "seventh": "siódmego", - "eight": "ósmego", - "ninth": "dziewiątego", - "tenth": "dziesiątego", - "%d hr_0": "%d h", - "%d hr_1": "%d h", - "%d hr_2": "%d h", - "%d min_0": "%d min", - "%d min_1": "%d min", - "%d min_2": "%d min", - "%d sec_0": "%d sek", - "%d sec_1": "%d sek", - "%d sec_2": "%d sek", - "OK": "OK", - "Minimize": "Minimalizuj", - "Bring to front": "Przenieś na wierzch", - "Send to back": "Przesuń na spód", - "Route:": "Trasa przejazdu:", - "Variant:": "Wariant:", - "Stop Finder": "Wyszukiwarka przystanków", - "Feed": "Agencja", - "By ID": "ID", - "By Name": "Nazwa", - "Search": "Szukaj", - "No Stops Found": "Nie znaleziono przystanków", - "Date": "Data", - "Find Stops": "Wyszukaj przystanki", - "(No Stop Selected)": "Nie wybrano przystanków", - "Block": "Zablokuj", - "Recenter": "Wyśrodkuj", - "Viewer": "Podgląd", - "Quick": "Szybki", - "Flat": "Równy teren", - "Bike Friendly": "Przyjazny dla rowerzystów", - "B": "B", - "F": "F", - "Q": "Q", - "All Routes": "Wszystkie trasy", - "Save": "Zapisz", - "Close": "Zamknij", - "Travel Options": "Opcje podróży", - "Geocoder": "Geocoder", - "Arrive": "Czas przyjazdu", - "Now": "Teraz", - "Wheelchair accessible trip:": "Wycieczka zawierająca udogodnienia dla osób niepełnosprawnych", - "Show Filtered Itineraries:": "", - "Travel by": "Podróżuj", - "Preferred Routes": "Preferowane trasy", - "Edit": "Edytuj", - "None": "Brak", - "Weight": "Waga", - "Banned routes": "Wyłączone trasy", - "Use": "Użyj", - "My Own Bike": "własnego roweru", - "A Shared Bike": "wypożyczonego roweru", - "Plan Your Trip": "Zaplanuj swoją podróż", - "Additional parameters": "", - " to _direction": "w kierunku", - " to _bus_direction": "w kierunku", - "Start_template": "Start", - "Depart_itinerary": "Wyjazd ze stacji", - "depart_itinerary": "odjazd", - "Start_popup": "Początek", - "Depart_tripoptions": "Czas wyjazdu" -} \ No newline at end of file + "Transit": "komunikacją publiczną", + "Bus Only": "wyłącznie autobusami", + "Rail Only": "wyłącznie koleją", + "Airplane Only": "", + "Transit, No Airplane": "", + "Bicycle Only": "wyłącznie rowerem", + "Bicycle & Transit": "rowerem & komunikacją publiczną", + "Walk Only": "wyłącznie pieszo", + "Car Only": "Rozpocznij na ulicy", + "Taxi": "", + "Park and Ride": "schemat P+R (Park and Ride)", + "Ride and Kiss (Car Pickup)": "", + "Kiss and Ride (Car Dropoff)": "", + "Bike and Ride": "schemat B+R (Bike and Ride)", + "Rented Bicycle": "wypożyczonym rowerem", + "Transit & Rented Bicycle": "kom. publiczną & wypoż. rowerem", + "Rented Scooter": "", + "Transit & Rented Scooter": "kom. publiczną & wypoż. rowerem", + "Transit with flex access": "", + "Transit with flex egress": "", + "Transit with flex access and egress": "", + "Direct flex search": "", + "Recenter Map Here": "Wyśrodkuj mapę w tym miejscu", + "Zoom In": "Przybliż", + "Zoom Out": "Oddal", + "Minimize all": "Minimalizuj wszystko", + "Unminimize all": "Maskymalizuj wszystko", + "Stop Viewer": "Zatrzymaj podgląd", + "Plan Trip": "Zaplanuj podróż", + "From Stop": "Z przystanku", + "To Stop": "Do przystanku", + "Routes Serving Stop": "Trasy obsługujące dany przystanek", + "Bike Share Planner": "Planner wypożyczenia roweru", + "Trip Options": "Trasa", + "PICK UP BIKE": "WYPOŻYCZ ROWER", + "ALTERNATE PICKUP": "ALTERNATYWNY PUNKT WYPOŻYCZENIA", + "DROP OFF BIKE": "ODDAJ ROWER", + "ALTERNATE DROP OFF": "ALTERNATYWNY PUNKT ODDANIA ROWERU", + "BIKE STATION": "STACJA ROWEROWA", + "Station:": "Stacja:", + "%d bike available_0": "%d dostępny rower", + "%d bike available_1": "%d dostępne rowery", + "%d bike available_2": "%d dostępnych rowerów", + "%d dock available_0": "%d dostępna stacja", + "%d dock available_1": "%d dostępne stacje", + "%d dock available_2": "%d dostępnych stacji", + "Recommended Pick Up:": "Rekomendowane miejsce wypożyczenia roweru:", + "Bicycle rental": "Wypożyczalnia rowerów", + "Recommended Drop Off:": "Rekomendowane miejsce oddania roweru:", + "Multimodal Trip Planner": "Planner Podróży", + "Itineraries": "Trasy", + "This itinerary departs on a different day from the previous one": "", + "%d Itinerary Returned_0": "%d zwrócona trasa", + "%d Itinerary Returned_1": "%d zwrócone trasy", + "%d Itinerary Returned_2": "%d zwróconych tras", + "Link to search": "Link do wyszukiwania", + "Previous Page": "Poprzednia", + "Next Page": "", + "CONTINUES AS": "POZOSTAŃ", + "%d min late_0": "%d minuta opóźnienia", + "%d min late_1": "%d minuty opóźnienia", + "%d min late_2": "%d minut opóźnienia", + "%d min early_0": "%d minuta przed czasem", + "%d min early_1": "%d minuty przed czasem", + "%d min early_2": "%d minut przed czasem", + "on time": "na czas", + "This itinerary departs on a different day than the one searched for": "", + "Arrived at destination with a rented bicycle!": "", + "End": "Koniec", + "Trip Summary": "Podsumowanie podróży", + "Travel": "Podróż", + "Time": "Czas trwania podróży", + "GenCost": "", + "Total Walk": "Długość trasy do pokonania pieszo", + "Total Bike": "Długośc trasy do pokonania rowerem", + "Total drive": "", + "Elevation Gained": "", + "Elevation Lost": "", + "Transfers": "Przesiadki", + "Fare": "Koszt", + "Valid": "Aktualna", + "Link to Itinerary": "Link do trasy", + "Print": "Drukuj", + "Your Trip": "Zaplanowana podróż", + "Email": "Adres e-mail", + "every %d min_0": "co %d minutę", + "every %d min_1": "co %d minuty", + "every %d min_2": "co %d minut", + "Board at ": "Wyjazd o", + "Stop": "Przystanek", + "Time in transit": "Czas spędzony w komunikacji publicznej", + "Route ID": "", + "Trip ID": "", + "Service Date": "", + "Trip Viewer": "Podgląd podróży", + "late as": "dopiero jak", + "Stay on board": "Kontynuuj podróż", + "Alight": "Wysiądź", + "at": "na przystanku", + "%(currency)s %(price)s": "%(currency)s %(price)s", + "Start: %(location)s at %(time_date)s": "Początek: %(location)s o %(time_date)s", + "Board": "Wyjazd", + "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s ID przystanku #%(stop_id)s),", + "End: %(location)s at %(time_date)s": "Koniec: %(location)s o %(time_date)s", + "(%(agencyId)s Stop ID #%(id)s),": "", + "\nView itinerary online:\n%(itinerary_link)s\n": "\nWyświetl trasę w trybie online:\n%(itinerary_link)s\n", + "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Przepraszamy. Planer podróży jest obecnie niedostępny. Prosimy o ponowienie próby w późniejszym czasie.", + "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", + "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", + "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Brak informacji o rozkładzie komunikacji publicznej. Obowiązujące dane mogą być nieaktualne, bądź niekompatybilne w wybranym czasie z zaplanowaną trasą.", + "The trip planner is taking way too long to process your request. Please try again later.": "Planer podróży nie jest w stanie przetwożyć powierzonego mu zadania. Prosimy o ponowienie próby w późniejszym czasie.", + "The request has errors that the server is not willing or able to process.": "Wybrane zapytanie posiada błędy, których serwer nie jest w stanie obsłużyć.", + "Origin is unknown. Can you be a bit more descriptive?": "Wystąpił problem z określeniem lokalizacji startowej. Czy mógłbyś sprecyzować zapytanie?", + "Destination is unknown. Can you be a bit more descriptive?": "Wystąpił problem z określeniem lokalizacji końcowej. Czy mógłbyś sprecyzować zapytanie?", + "Both origin and destination are unknown. Can you be a bit more descriptive?": "Wystąpił problem z określeniem lokalizacji startowej oraz końcowej. Czy mógłbyś sprecyzować zapytanie?", + "Both origin and destination are not wheelchair accessible": "Zarówno lokalizacja startowa, jak i końcowa, nie oferuje udogodnień dla osób niepełnosprawnych.", + "Origin is within a trivial distance of the destination.": "Lokalizacja początkowa jest zlokalizowana w nieznacznej odległości od miejsca docelowego.", + "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "Planer podróży nie może zinterpretować lokalizacji początkowej. Prosimy o wybranie jednej z poniższych opcji, bądź sprecyzować zapytanie.", + "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "Planer podróży nie może zinterpretować lokalizacji końcowej. Prosimy o wybranie jednej z poniższych opcji, bądź sprecyzować zapytanie.", + "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Zarówno lokalizacja początkowa, jak i końcowa nie została poprawnie ziterpretowana przez planer podróży. Prosimy o wybranie pozycji dostępnych na liście poniżej, bądź sprecyzować zapytanie.", + "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "Każdy z parametrów triangleSafetyFactor (bezpieczeństwo), triangleSlopeFactor (nachylenie) i triangleTimeFactor (czas) musi zostać ustawiony, jeśli na trasie znajdują się dane punkty.", + "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "Suma wartości w parametrach triangleSafetyFactor, triangleSlopeFactor i triangleTimeFactor musi wynieśc równo 1.", + "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Jeśli zostały wprowadzone parametry triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor, wartość OptimizeType musi wskazywać na TRIANGLE (TRÓJKĄT)", + "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Jeśli wartość pola OptimizeType wskazuje na TRIANGLE (TRÓJKĄT), należy podać parametry zmiennych triangleSafetyFactor, triangleSlopeFactor oraz triangleTimeFactor.", + "Set as Start Location": "Wybierz jako punkt początkowy", + "Set as End Location": "Wybierz jako punkt końcowy", + "Destination": "Cel", + "Error %(error_id)d": "Błąd %(error_id)d", + "No Trip Found": "Trasa nie została wyznaczona", + "Your %(bike_share_name)s route": "Twoja trasa : %(bike_share_name)s", + "Your bike route": "Trasa pokonana rowerem", + "Walk to the %(bike_share_name)s dock.": "Przejdź do doku %(bike_share_name)s", + "Walk from the %(bike_share_name)s dock to your destination.": "Przejdź z doku %(bike_share_name)s do punktu docelowego", + "Your walk route": "Trasa pokonana pieszo", + "Your route using the scooter": "", + "Your driving route": "Trasa pokonana rowerem", + "north": "północ", + "northeast": "północny wschód", + "east": "wschód", + "southeast": "południowy wschód", + "south": "południe", + "southwest": "południowy zachód", + "west": "zachód", + "northwest": "północny zachód", + "hard left": "ostro w lewo", + "left": "lewo", + "slight left": "łagodnie w lewo", + "continue": "utrzymuj kierunek", + "slight right": "łagodnie w prawo", + "right": "prawo", + "hard right": "ostro w prawo", + "elevator": "wzniesienie", + "U-turn left": "nawrót w lewo", + "U-turn right": "nawrót w prawo", + "Walk": "Spacer", + "Cycle": "Rower", + "Car": "Samochód", + "Bus": "Autobus", + "Subway": "Metro", + "Train": "Pociąg", + "Ferry": "Prom", + "Light Rail": "Light Rail", + "Cable Car": "Kolejka linowa", + "Funicular": "Kolej linowo-terenowa", + "Aerial Tram": "Kolej linowa", + "Airplane": "", + "Bicycle rental station": "Stacja wypożyczalni rowerów", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Przejedź przez rondo przeciwnie do ruchów wskazówki zegara do %(ordinal_exit_number)s wyjazdu na ulicę %(street_name)s", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Przejedź przez rondo przeciwnie do ruchów wskazówki zegara do %(ordinal_exit_number)s wyjazdu na ulicę %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Przejedź przez rondo zgodnie z ruchem wskazówki zegara do %(ordinal_exit_number)s wyjazdu na ulicę %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Przejedź przez rondo zgodnie z ruchem wskazówki zegara do %(ordinal_exit_number)s wyjazdu na ulicę %(street_name)s", + "Start on": "Rozpocznij na ulicy", + " heading ": "kierując się na", + "to continue on": "kieruj się w stronę", + "on to": "ulicy", + "first": "pierwszego", + "second": "drugiego", + "third": "trzeciego", + "fourth": "czwartego", + "fifth": "piątego", + "sixth": "szóstego", + "seventh": "siódmego", + "eight": "ósmego", + "ninth": "dziewiątego", + "tenth": "dziesiątego", + "%d hr_0": "%d h", + "%d hr_1": "%d h", + "%d hr_2": "%d h", + "%d min_0": "%d min", + "%d min_1": "%d min", + "%d min_2": "%d min", + "%d sec_0": "%d sek", + "%d sec_1": "%d sek", + "%d sec_2": "%d sek", + "OK": "OK", + "Minimize": "Minimalizuj", + "Bring to front": "Przenieś na wierzch", + "Send to back": "Przesuń na spód", + "Route:": "Trasa przejazdu:", + "Variant:": "Wariant:", + "Stop Finder": "Wyszukiwarka przystanków", + "Feed": "Agencja", + "By ID": "ID", + "By Name": "Nazwa", + "Search": "Szukaj", + "No Stops Found": "Nie znaleziono przystanków", + "Date": "Data", + "Find Stops": "Wyszukaj przystanki", + "(No Stop Selected)": "Nie wybrano przystanków", + "Block": "Zablokuj", + "Recenter": "Wyśrodkuj", + "Viewer": "Podgląd", + "Quick": "Szybki", + "Flat": "Równy teren", + "Bike Friendly": "Przyjazny dla rowerzystów", + "B": "B", + "F": "F", + "Q": "Q", + "All Routes": "Wszystkie trasy", + "Save": "Zapisz", + "Close": "Zamknij", + "Travel Options": "Opcje podróży", + "Geocoder": "Geocoder", + "Arrive": "Czas przyjazdu", + "Now": "Teraz", + "Wheelchair accessible trip:": "Wycieczka zawierająca udogodnienia dla osób niepełnosprawnych", + "Show Filtered Itineraries:": "", + "Travel by": "Podróżuj", + "Preferred Routes": "Preferowane trasy", + "Edit": "Edytuj", + "None": "Brak", + "Weight": "Waga", + "Banned routes": "Wyłączone trasy", + "Use": "Użyj", + "My Own Bike": "własnego roweru", + "A Shared Bike": "wypożyczonego roweru", + "Plan Your Trip": "Zaplanuj swoją podróż", + "Additional parameters": "", + " to _direction": "w kierunku", + " to _bus_direction": "w kierunku", + "Start_template": "Start", + "Depart_itinerary": "Wyjazd ze stacji", + "depart_itinerary": "odjazd", + "Start_popup": "Początek", + "Depart_tripoptions": "Czas wyjazdu" +} diff --git a/application/src/client/classic-debug/js/otp/locale/pt.json b/application/src/client/classic-debug/js/otp/locale/pt.json index 9d15e4afe1a..bf2e4a78732 100644 --- a/application/src/client/classic-debug/js/otp/locale/pt.json +++ b/application/src/client/classic-debug/js/otp/locale/pt.json @@ -1,238 +1,238 @@ { - "Transit": "Vários", - "Bus Only": "Autocarro apenas", - "Rail Only": "Só ferroviário", - "Airplane Only": "", - "Transit, No Airplane": "", - "Bicycle Only": "Bicicleta apenas", - "Bicycle & Transit": "Bicicleta & vários", - "Walk Only": "Só a pé", - "Car Only": "Origem em", - "Taxi": "", - "Park and Ride": "Estacionar e conduzir", - "Ride and Kiss (Car Pickup)": "", - "Kiss and Ride (Car Dropoff)": "", - "Bike and Ride": "Bicicleta e conduzir", - "Rented Bicycle": "Bicicleta alugada", - "Transit & Rented Bicycle": "Vários & bicicletas alugadas", - "Rented Scooter": "", - "Transit & Rented Scooter": "Vários & bicicletas alugadas", - "Transit with flex access": "", - "Transit with flex egress": "", - "Transit with flex access and egress": "", - "Direct flex search": "", - "Recenter Map Here": "Mapa mais recente aqui", - "Zoom In": "Zoom In", - "Zoom Out": "Zoom Out", - "Minimize all": "Minimizar tudo", - "Unminimize all": "Maximizar tudo", - "Stop Viewer": "Visualizardor de paragens", - "Plan Trip": "Planear rota", - "From Stop": "Da paragem", - "To Stop": "Para a paragem", - "Routes Serving Stop": "Paragens servindo as linhas", - "Bike Share Planner": "Planeador de partilha de bicicletas", - "Trip Options": "Opções de viagem", - "PICK UP BIKE": "APANHAR UMA BICICLETA", - "ALTERNATE PICKUP": "APANHAR DE BICICLETA ALTERNATIVO", - "DROP OFF BIKE": "LARGAR A BICICLETA", - "ALTERNATE DROP OFF": "LARGAR DE BICICLETA ALTERNATIVO", - "BIKE STATION": "ESTAÇÃO DE BICICLETAS", - "Station:": "Estação:", - "%d bike available": "%d bicicleta disponível", - "%d bike available_plural": "%d bicicletas disponíveis", - "%d dock available": "%d dock disponível", - "%d dock available_plural": "%d docks disponíveis", - "Recommended Pick Up:": "Apanhar de bicicleta recomendado:", - "Bicycle rental": "Aluguer de bicicletas", - "Recommended Drop Off:": "Largar de bicicleta recomendado:", - "Multimodal Trip Planner": "Planeador de rotas multi-modal", - "Itineraries": "Itinerários", - "This itinerary departs on a different day from the previous one": "", - "%d Itinerary Returned": "%d Itinerário devolvido", - "%d Itinerary Returned_plural": "%d Itinerários devolvidos", - "Link to search": "Link para pesquisa", - "Previous Page": "Anterior", - "Next Page": "", - "CONTINUES AS": "CONTINUAR COMO", - "%d min late": "%d min mais tarde", - "%d min late_plural": "%d mins mais tarde", - "%d min early": "%d min mais cedo", - "%d min early_plural": "%d mins mais cedo", - "on time": "a tempo", - "This itinerary departs on a different day than the one searched for": "", - "Arrived at destination with a rented bicycle!": "", - "End": "Destino", - "Trip Summary": "Sumário da rota", - "Travel": "Viagem", - "Time": "Tempo", - "GenCost": "", - "Total Walk": "Total a pé", - "Total Bike": "Total de bicicleta", - "Total drive": "", - "Elevation Gained": "", - "Elevation Lost": "", - "Transfers": "Transferências", - "Fare": "Tarifa", - "Valid": "Válido", - "Link to Itinerary": "Link para o itenerário", - "Print": "Imprimir", - "Your Trip": "A tua rota", - "Email": "Email", - "every %d min": "A cada %d min", - "every %d min_plural": " A cada %d mins", - "Board at ": "Entrar às", - "Stop": "Paragem", - "Time in transit": "Tempo em viagem", - "Route ID": "", - "Trip ID": "", - "Service Date": "", - "Trip Viewer": "Visualizador de rotas", - "late as": "tão tarde como", - "Stay on board": "Mantenha-se em viagem", - "Alight": "Iluminado", - "at": "às", - "%(currency)s %(price)s": "%(currency)s %(price)s", - "Start: %(location)s at %(time_date)s": "Partida: %(location)s às %(time_date)s", - "Board": "Entrar", - "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s ID Paragem #%(stop_id)s),", - "End: %(location)s at %(time_date)s": "Destino: %(location)s at %(time_date)s", - "(%(agencyId)s Stop ID #%(id)s),": "", - "\nView itinerary online:\n%(itinerary_link)s\n": "\nVer itinerário online:\n%(itinerary_link)s\n", - "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Pedimos desculpa. O planeador de rotas está temporariamente indisponível. Tente mais tarde.", - "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", - "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", - "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Não há tempos de trânsito disponíveis. Não há informação acerca dos transportes para esta data.", - "The trip planner is taking way too long to process your request. Please try again later.": "O planeador de rotas está a demorar demasiado tempo para processar o seu pedido. Tente mais tarde.", - "The request has errors that the server is not willing or able to process.": "O seu pedido tem erros e o servidor não está a conseguir processá-lo.", - "Origin is unknown. Can you be a bit more descriptive?": "Origem desconhecida. Pode ser mais descritivo?", - "Destination is unknown. Can you be a bit more descriptive?": "Destino indisponível. Pode ser mais descritivo?", - "Both origin and destination are unknown. Can you be a bit more descriptive?": "Origem e destino desconhecidos. Pode ser mais descritivo?", - "Both origin and destination are not wheelchair accessible": "Origem e destino não acessível a cadeiras de rodas.", - "Origin is within a trivial distance of the destination.": "Origem a uma distância demasiado pequena do destino.", - "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "O planeador de rotas está inseguro em relação à localização da sua origem. Selecione uma das seguintes opções ou seja mais específico.", - "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "O planeador de rotas está inseguro em relação à localização do seu destino. Selecione uma das seguintes opções ou seja mais específico.", - "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Origem e destino ambíguos. Selecione uma das seguintes opções ou seja mais específico.", - "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "Todo o triangleSafetyFactor, triangleSlopeFactor, e triangleTimeFactor deve ser definido se algum for", - "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "Os valores de triangleSafetyFactor, triangleSlopeFactor, e triangleTimeFactor devem somar com valor 1", - "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Se o triangleSafetyFactor, triangleSlopeFactor, e triangleTimeFactor forem fornecidos, OptimizeType deve ser um TRIANGLE", - "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Se OptimizeType é TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, e triangleTimeFactor devem ser definidos", - "Set as Start Location": "Definir como local de origem", - "Set as End Location": "Definir como local de destino", - "Destination": "Destino", - "Error %(error_id)d": "Erro %(error_id)d", - "No Trip Found": "Nenhuma rota encontrada", - "Your %(bike_share_name)s route": "A sua rota %(bike_share_name)s ", - "Your bike route": "A sua rota de bicicleta", - "Walk to the %(bike_share_name)s dock.": "Andar para a dock %(bike_share_name)s .", - "Walk from the %(bike_share_name)s dock to your destination.": "Andar da dock %(bike_share_name)s para o seu destino.", - "Your walk route": "A sua rota a pé", - "Your route using the scooter": "", - "Your driving route": "A sua rota de bicicleta", - "north": "norte", - "northeast": "nordeste", - "east": "este", - "southeast": "sudeste", - "south": "sul", - "southwest": "sudoeste", - "west": "oeste", - "northwest": "nordeste", - "hard left": "esquerda apertada", - "left": "esquerda", - "slight left": "esquerda ligeira", - "continue": "continuar", - "slight right": "direita ligeira", - "right": "direita", - "hard right": "direita apertada", - "elevator": "elevador", - "U-turn left": "cotovelo à esquerda", - "U-turn right": "cotovelo à direita", - "Walk": "A pé", - "Cycle": "Bicicleta", - "Car": "Carro", - "Bus": "Autocarro", - "Subway": "Metro", - "Train": "Comboio", - "Ferry": "Ferry", - "Light Rail": "Ferroviário leve", - "Cable Car": "Eléctrico", - "Funicular": "Teleférico", - "Aerial Tram": "Teleférico", - "Airplane": "", - "Bicycle rental station": "Estação de aluguer de bicicletas", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Entrar na rotuda no sentido contrário aos ponteiros do relógio na %(ordinal_exit_number)s saída em direção a %(street_name)s", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Entrar na rotunda no sentido contrário aos ponteiros do relógio, na %(ordinal_exit_number)s saída em direcção a %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Entrar na rotuda no sentido dos ponteiros do relógio na %(ordinal_exit_number)s saída em direção a %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Entrar na rotunda no sentido dos ponteiros do relógio, na %(ordinal_exit_number)s saída em direcção a %(street_name)s", - "Start on": "Origem em", - " heading ": "em direcção a", - "to continue on": "a continuar em", - "on to": "para", - "first": "primeiro", - "second": "segundo", - "third": "terceiro", - "fourth": "quarto", - "fifth": "quinto", - "sixth": "sexto", - "seventh": "sétimo", - "eight": "oitavo", - "ninth": "nono", - "tenth": "décimo", - "%d hr": "%d hr", - "%d hr_plural": "%d hrs", - "%d min": "%d min", - "%d min_plural": "%d mins", - "%d sec": "%d sec", - "%d sec_plural": "%d secs", - "OK": "OK", - "Minimize": "Minimzar", - "Bring to front": "Trazer prá frente", - "Send to back": "Mandar para trás", - "Route:": "Rota:", - "Variant:": "Variante:", - "Stop Finder": "Pesquisar paragem", - "Feed": "Companhia", - "By ID": "Por ID", - "By Name": "Por Nome", - "Search": "Pesquisar", - "No Stops Found": "Nenhuma paragem encontrada", - "Date": "Data", - "Find Stops": "Procurar paragens", - "(No Stop Selected)": "(Nenhuma paragem selecionada)", - "Block": "Bloquear", - "Recenter": "Mais recente", - "Viewer": "Visualizador", - "Quick": "Rápido", - "Flat": "Plano", - "Bike Friendly": "Amigo às bicicletas", - "B": "B", - "F": "F", - "Q": "Q", - "All Routes": "Todas as rotas", - "Save": "Guardar", - "Close": "Fechar", - "Travel Options": "Opções de viagem", - "Geocoder": "Geocoder", - "Arrive": "Chegada", - "Now": "Agora", - "Wheelchair accessible trip:": "Rota acessível a cadeira de rodas", - "Show Filtered Itineraries:": "", - "Travel by": "Viagem por", - "Preferred Routes": "Rotas favoritas", - "Edit": "Editar", - "None": "Nenhum", - "Weight": "Peso", - "Banned routes": "Rotas banidas", - "Use": "Utilizar", - "My Own Bike": "A minha bicicleta", - "A Shared Bike": "Uma bicicleta partilhada", - "Plan Your Trip": "Planear a sua viagem", - "Additional parameters": "", - " to _direction": "Para", - " to _bus_direction": "Para", - "Start_template": "Começar", - "Depart_itinerary": "Partida", - "depart_itinerary": "partida", - "Start_popup": "Origem", - "Depart_tripoptions": "Partir" -} \ No newline at end of file + "Transit": "Vários", + "Bus Only": "Autocarro apenas", + "Rail Only": "Só ferroviário", + "Airplane Only": "", + "Transit, No Airplane": "", + "Bicycle Only": "Bicicleta apenas", + "Bicycle & Transit": "Bicicleta & vários", + "Walk Only": "Só a pé", + "Car Only": "Origem em", + "Taxi": "", + "Park and Ride": "Estacionar e conduzir", + "Ride and Kiss (Car Pickup)": "", + "Kiss and Ride (Car Dropoff)": "", + "Bike and Ride": "Bicicleta e conduzir", + "Rented Bicycle": "Bicicleta alugada", + "Transit & Rented Bicycle": "Vários & bicicletas alugadas", + "Rented Scooter": "", + "Transit & Rented Scooter": "Vários & bicicletas alugadas", + "Transit with flex access": "", + "Transit with flex egress": "", + "Transit with flex access and egress": "", + "Direct flex search": "", + "Recenter Map Here": "Mapa mais recente aqui", + "Zoom In": "Zoom In", + "Zoom Out": "Zoom Out", + "Minimize all": "Minimizar tudo", + "Unminimize all": "Maximizar tudo", + "Stop Viewer": "Visualizardor de paragens", + "Plan Trip": "Planear rota", + "From Stop": "Da paragem", + "To Stop": "Para a paragem", + "Routes Serving Stop": "Paragens servindo as linhas", + "Bike Share Planner": "Planeador de partilha de bicicletas", + "Trip Options": "Opções de viagem", + "PICK UP BIKE": "APANHAR UMA BICICLETA", + "ALTERNATE PICKUP": "APANHAR DE BICICLETA ALTERNATIVO", + "DROP OFF BIKE": "LARGAR A BICICLETA", + "ALTERNATE DROP OFF": "LARGAR DE BICICLETA ALTERNATIVO", + "BIKE STATION": "ESTAÇÃO DE BICICLETAS", + "Station:": "Estação:", + "%d bike available": "%d bicicleta disponível", + "%d bike available_plural": "%d bicicletas disponíveis", + "%d dock available": "%d dock disponível", + "%d dock available_plural": "%d docks disponíveis", + "Recommended Pick Up:": "Apanhar de bicicleta recomendado:", + "Bicycle rental": "Aluguer de bicicletas", + "Recommended Drop Off:": "Largar de bicicleta recomendado:", + "Multimodal Trip Planner": "Planeador de rotas multi-modal", + "Itineraries": "Itinerários", + "This itinerary departs on a different day from the previous one": "", + "%d Itinerary Returned": "%d Itinerário devolvido", + "%d Itinerary Returned_plural": "%d Itinerários devolvidos", + "Link to search": "Link para pesquisa", + "Previous Page": "Anterior", + "Next Page": "", + "CONTINUES AS": "CONTINUAR COMO", + "%d min late": "%d min mais tarde", + "%d min late_plural": "%d mins mais tarde", + "%d min early": "%d min mais cedo", + "%d min early_plural": "%d mins mais cedo", + "on time": "a tempo", + "This itinerary departs on a different day than the one searched for": "", + "Arrived at destination with a rented bicycle!": "", + "End": "Destino", + "Trip Summary": "Sumário da rota", + "Travel": "Viagem", + "Time": "Tempo", + "GenCost": "", + "Total Walk": "Total a pé", + "Total Bike": "Total de bicicleta", + "Total drive": "", + "Elevation Gained": "", + "Elevation Lost": "", + "Transfers": "Transferências", + "Fare": "Tarifa", + "Valid": "Válido", + "Link to Itinerary": "Link para o itenerário", + "Print": "Imprimir", + "Your Trip": "A tua rota", + "Email": "Email", + "every %d min": "A cada %d min", + "every %d min_plural": " A cada %d mins", + "Board at ": "Entrar às", + "Stop": "Paragem", + "Time in transit": "Tempo em viagem", + "Route ID": "", + "Trip ID": "", + "Service Date": "", + "Trip Viewer": "Visualizador de rotas", + "late as": "tão tarde como", + "Stay on board": "Mantenha-se em viagem", + "Alight": "Iluminado", + "at": "às", + "%(currency)s %(price)s": "%(currency)s %(price)s", + "Start: %(location)s at %(time_date)s": "Partida: %(location)s às %(time_date)s", + "Board": "Entrar", + "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s ID Paragem #%(stop_id)s),", + "End: %(location)s at %(time_date)s": "Destino: %(location)s at %(time_date)s", + "(%(agencyId)s Stop ID #%(id)s),": "", + "\nView itinerary online:\n%(itinerary_link)s\n": "\nVer itinerário online:\n%(itinerary_link)s\n", + "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Pedimos desculpa. O planeador de rotas está temporariamente indisponível. Tente mais tarde.", + "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", + "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", + "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Não há tempos de trânsito disponíveis. Não há informação acerca dos transportes para esta data.", + "The trip planner is taking way too long to process your request. Please try again later.": "O planeador de rotas está a demorar demasiado tempo para processar o seu pedido. Tente mais tarde.", + "The request has errors that the server is not willing or able to process.": "O seu pedido tem erros e o servidor não está a conseguir processá-lo.", + "Origin is unknown. Can you be a bit more descriptive?": "Origem desconhecida. Pode ser mais descritivo?", + "Destination is unknown. Can you be a bit more descriptive?": "Destino indisponível. Pode ser mais descritivo?", + "Both origin and destination are unknown. Can you be a bit more descriptive?": "Origem e destino desconhecidos. Pode ser mais descritivo?", + "Both origin and destination are not wheelchair accessible": "Origem e destino não acessível a cadeiras de rodas.", + "Origin is within a trivial distance of the destination.": "Origem a uma distância demasiado pequena do destino.", + "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "O planeador de rotas está inseguro em relação à localização da sua origem. Selecione uma das seguintes opções ou seja mais específico.", + "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "O planeador de rotas está inseguro em relação à localização do seu destino. Selecione uma das seguintes opções ou seja mais específico.", + "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "Origem e destino ambíguos. Selecione uma das seguintes opções ou seja mais específico.", + "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "Todo o triangleSafetyFactor, triangleSlopeFactor, e triangleTimeFactor deve ser definido se algum for", + "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "Os valores de triangleSafetyFactor, triangleSlopeFactor, e triangleTimeFactor devem somar com valor 1", + "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "Se o triangleSafetyFactor, triangleSlopeFactor, e triangleTimeFactor forem fornecidos, OptimizeType deve ser um TRIANGLE", + "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "Se OptimizeType é TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, e triangleTimeFactor devem ser definidos", + "Set as Start Location": "Definir como local de origem", + "Set as End Location": "Definir como local de destino", + "Destination": "Destino", + "Error %(error_id)d": "Erro %(error_id)d", + "No Trip Found": "Nenhuma rota encontrada", + "Your %(bike_share_name)s route": "A sua rota %(bike_share_name)s ", + "Your bike route": "A sua rota de bicicleta", + "Walk to the %(bike_share_name)s dock.": "Andar para a dock %(bike_share_name)s .", + "Walk from the %(bike_share_name)s dock to your destination.": "Andar da dock %(bike_share_name)s para o seu destino.", + "Your walk route": "A sua rota a pé", + "Your route using the scooter": "", + "Your driving route": "A sua rota de bicicleta", + "north": "norte", + "northeast": "nordeste", + "east": "este", + "southeast": "sudeste", + "south": "sul", + "southwest": "sudoeste", + "west": "oeste", + "northwest": "nordeste", + "hard left": "esquerda apertada", + "left": "esquerda", + "slight left": "esquerda ligeira", + "continue": "continuar", + "slight right": "direita ligeira", + "right": "direita", + "hard right": "direita apertada", + "elevator": "elevador", + "U-turn left": "cotovelo à esquerda", + "U-turn right": "cotovelo à direita", + "Walk": "A pé", + "Cycle": "Bicicleta", + "Car": "Carro", + "Bus": "Autocarro", + "Subway": "Metro", + "Train": "Comboio", + "Ferry": "Ferry", + "Light Rail": "Ferroviário leve", + "Cable Car": "Eléctrico", + "Funicular": "Teleférico", + "Aerial Tram": "Teleférico", + "Airplane": "", + "Bicycle rental station": "Estação de aluguer de bicicletas", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Entrar na rotuda no sentido contrário aos ponteiros do relógio na %(ordinal_exit_number)s saída em direção a %(street_name)s", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Entrar na rotunda no sentido contrário aos ponteiros do relógio, na %(ordinal_exit_number)s saída em direcção a %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Entrar na rotuda no sentido dos ponteiros do relógio na %(ordinal_exit_number)s saída em direção a %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "Entrar na rotunda no sentido dos ponteiros do relógio, na %(ordinal_exit_number)s saída em direcção a %(street_name)s", + "Start on": "Origem em", + " heading ": "em direcção a", + "to continue on": "a continuar em", + "on to": "para", + "first": "primeiro", + "second": "segundo", + "third": "terceiro", + "fourth": "quarto", + "fifth": "quinto", + "sixth": "sexto", + "seventh": "sétimo", + "eight": "oitavo", + "ninth": "nono", + "tenth": "décimo", + "%d hr": "%d hr", + "%d hr_plural": "%d hrs", + "%d min": "%d min", + "%d min_plural": "%d mins", + "%d sec": "%d sec", + "%d sec_plural": "%d secs", + "OK": "OK", + "Minimize": "Minimzar", + "Bring to front": "Trazer prá frente", + "Send to back": "Mandar para trás", + "Route:": "Rota:", + "Variant:": "Variante:", + "Stop Finder": "Pesquisar paragem", + "Feed": "Companhia", + "By ID": "Por ID", + "By Name": "Por Nome", + "Search": "Pesquisar", + "No Stops Found": "Nenhuma paragem encontrada", + "Date": "Data", + "Find Stops": "Procurar paragens", + "(No Stop Selected)": "(Nenhuma paragem selecionada)", + "Block": "Bloquear", + "Recenter": "Mais recente", + "Viewer": "Visualizador", + "Quick": "Rápido", + "Flat": "Plano", + "Bike Friendly": "Amigo às bicicletas", + "B": "B", + "F": "F", + "Q": "Q", + "All Routes": "Todas as rotas", + "Save": "Guardar", + "Close": "Fechar", + "Travel Options": "Opções de viagem", + "Geocoder": "Geocoder", + "Arrive": "Chegada", + "Now": "Agora", + "Wheelchair accessible trip:": "Rota acessível a cadeira de rodas", + "Show Filtered Itineraries:": "", + "Travel by": "Viagem por", + "Preferred Routes": "Rotas favoritas", + "Edit": "Editar", + "None": "Nenhum", + "Weight": "Peso", + "Banned routes": "Rotas banidas", + "Use": "Utilizar", + "My Own Bike": "A minha bicicleta", + "A Shared Bike": "Uma bicicleta partilhada", + "Plan Your Trip": "Planear a sua viagem", + "Additional parameters": "", + " to _direction": "Para", + " to _bus_direction": "Para", + "Start_template": "Começar", + "Depart_itinerary": "Partida", + "depart_itinerary": "partida", + "Start_popup": "Origem", + "Depart_tripoptions": "Partir" +} diff --git a/application/src/client/classic-debug/js/otp/locale/sl.json b/application/src/client/classic-debug/js/otp/locale/sl.json index c99ad81f704..8991e9451d8 100644 --- a/application/src/client/classic-debug/js/otp/locale/sl.json +++ b/application/src/client/classic-debug/js/otp/locale/sl.json @@ -1,256 +1,256 @@ { - "Transit": "Javni prevoz", - "Bus Only": "Avtobus", - "Rail Only": "Vlak", - "Airplane Only": "", - "Transit, No Airplane": "", - "Bicycle Only": "Kolo", - "Bicycle & Transit": "Kolo & Javni prevoz", - "Walk Only": "Pešačenje", - "Car Only": "Začnite na", - "Taxi": "", - "Park and Ride": "Parkiraj in se pelji", - "Ride and Kiss (Car Pickup)": "", - "Kiss and Ride (Car Dropoff)": "", - "Bike and Ride": "", - "Rented Bicycle": "Izposojeno kolo", - "Transit & Rented Bicycle": "Izposojeno kolo & Javni prevoz", - "Rented Scooter": "", - "Transit & Rented Scooter": "Izposojeno kolo & Javni prevoz", - "Transit with flex access": "", - "Transit with flex egress": "", - "Transit with flex access and egress": "", - "Direct flex search": "", - "Recenter Map Here": "Prikaži karto tukaj", - "Zoom In": "Približaj", - "Zoom Out": "Oddalji", - "Minimize all": "Skrči vse", - "Unminimize all": "Razširi vse", - "Stop Viewer": "Pregledovalnik postaj", - "Plan Trip": "Načrtuj pot", - "From Stop": "Začetna postaja", - "To Stop": "Končna postaja", - "Routes Serving Stop": "Avtobusi, ki ustavljajo na postaji", - "Bike Share Planner": "Planer za izposojena kolesa", - "Trip Options": "Nastavitve poti", - "PICK UP BIKE": "IZPOSOJA KOLESA", - "ALTERNATE PICKUP": "ALTERNATIVNO MESTO IZPOSOJE", - "DROP OFF BIKE": "VRNITEV KOLESA", - "ALTERNATE DROP OFF": "ALTERNATIVNO MESTO VRNITVE KOLESA", - "BIKE STATION": "IZPOSOJEVALNA POSTAJA", - "Station:": "Postaja:", - "%d bike available_0": "%d koles na voljo", - "%d bike available_1": "%d kolo na voljo", - "%d bike available_2": "%d kolesi na voljo", - "%d bike available_3": "%d kolesa na voljo", - "%d dock available_0": "%d prostorov na voljo", - "%d dock available_1": "%d prostor na voljo", - "%d dock available_2": "%d prostora na voljo", - "%d dock available_3": "%d prostori na voljo", - "Recommended Pick Up:": "Predlagana postaja za izposojo kolesa:", - "Bicycle rental": "postaje za izposojo koles", - "Recommended Drop Off:": "Predlagana postaja za vrnitev kolesa:", - "Multimodal Trip Planner": "Načrtovalnik poti", - "Itineraries": "Načrti poti", - "This itinerary departs on a different day from the previous one": "", - "%d Itinerary Returned_0": "%d vrnjenih načrtov poti", - "%d Itinerary Returned_1": "%d vrnjen načrt poti", - "%d Itinerary Returned_2": "%d vrnjena načrta poti", - "%d Itinerary Returned_3": "%d vrnjeni načrti poti", - "Link to search": "Iskanje", - "Previous Page": "Prejšnja", - "Next Page": "", - "CONTINUES AS": "SE NADALJUJE KOT", - "%d min late_0": "%d min. zamude", - "%d min late_1": "%d min. zamude", - "%d min late_2": "%d min. zamude", - "%d min late_3": "%d min. zamude", - "%d min early_0": "%d min. prehitro", - "%d min early_1": "%d min. prehitro", - "%d min early_2": "%d min. prehitro", - "%d min early_3": "%d min. prehitro", - "on time": "pravočasno", - "This itinerary departs on a different day than the one searched for": "", - "Arrived at destination with a rented bicycle!": "", - "End": "Konec", - "Trip Summary": "Povzetek poti", - "Travel": "Potuj ob", - "Time": "Trajanje", - "GenCost": "", - "Total Walk": "Skupno hoje", - "Total Bike": "Skupno kolesarjenja", - "Total drive": "", - "Elevation Gained": "", - "Elevation Lost": "", - "Transfers": "Št. prestopov", - "Fare": "Cena", - "Valid": "Veljavno", - "Link to Itinerary": "Načrt poti", - "Print": "Natisni", - "Your Trip": "Vaša pot", - "Email": "E-pošta", - "every %d min_0": "vsakih %d min", - "every %d min_1": "vsako %d min", - "every %d min_2": "vsaki %d min", - "every %d min_3": "vsake %d min", - "Board at ": "Vstop na ", - "Stop": "Postaja", - "Time in transit": "Časa na vožnji", - "Route ID": "", - "Trip ID": "", - "Service Date": "", - "Trip Viewer": "Pregledovalnik poti", - "late as": "", - "Stay on board": "Ostanite v vozilu", - "Alight": "Izstop", - "at": "na", - "%(currency)s %(price)s": "%(price)s %(currency)s", - "Start: %(location)s at %(time_date)s": "Začetek: %(location)s ob %(time_date)s", - "Board": "Vstop", - "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s),", - "End: %(location)s at %(time_date)s": "Konec: %(location)s ob %(time_date)s", - "(%(agencyId)s Stop ID #%(id)s),": "", - "\nView itinerary online:\n%(itinerary_link)s\n": "\nOglejte si načrt poti na spletu:\n%(itinerary_link)s\n", - "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Opravičujemo se. Daljinar trenutno ni na voljo. Prosimo poskusite kasneje.", - "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", - "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", - "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Podatki o voznih redih niso na voljo. Mogoče je datum preveč v preteklosti ali prihodnosti ali pa javni prevoz ne obstaja za pot, ki jo načrtujete.", - "The trip planner is taking way too long to process your request. Please try again later.": "Daljinar potrebuje preveč časa za obdelavo vašega zahtevka. Prosimo poskusite znova kasneje.", - "The request has errors that the server is not willing or able to process.": "Zahtevek ima napake, ki jih strežnik ne more obdelati.", - "Origin is unknown. Can you be a bit more descriptive?": "Začetek poti ni znan. Prosimo bodite bolj natančni.", - "Destination is unknown. Can you be a bit more descriptive?": "Konec poti ni znan. Prosimo bodite bolj natančni.", - "Both origin and destination are unknown. Can you be a bit more descriptive?": "Začetek in konec sta neznana. Prosimo bodite bolj natančni.", - "Both origin and destination are not wheelchair accessible": "Do začetka in konca ni mogoče priti z vozičkom.", - "Origin is within a trivial distance of the destination.": "Začetek je trivialno oddaljen od konec.", - "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "", - "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "", - "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "", - "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "", - "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "", - "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "", - "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "", - "Set as Start Location": "Začetek poti", - "Set as End Location": "Konec poti", - "Destination": "Konec", - "Error %(error_id)d": "Napaka %(error_id)d", - "No Trip Found": "Ne najdemo poti", - "Your %(bike_share_name)s route": "Kolesarjenje s kolesom izposojenim pri %(bike_share_name)s", - "Your bike route": "Kolesarska pot", - "Walk to the %(bike_share_name)s dock.": "Hodite do postaje podjetja %(bike_share_name)s.", - "Walk from the %(bike_share_name)s dock to your destination.": "Hodite od postaje podjetja %(bike_share_name)s do vašega cilja.", - "Your walk route": "Pot peš", - "Your route using the scooter": "", - "Your driving route": "Kolesarska pot", - "north": "sever", - "northeast": "severovzhod", - "east": "vzhod", - "southeast": "jugovzhod", - "south": "jug", - "southwest": "jugozahod", - "west": "zahod", - "northwest": "severozahod", - "hard left": "ostro levo", - "left": "levo", - "slight left": "rahlo levo", - "continue": "nadaljujte", - "slight right": "rahlo desno", - "right": "desno", - "hard right": "ostro desno", - "elevator": "pojdite z dvigalom", - "U-turn left": "Polkrožno obrnite v levo", - "U-turn right": "Polkrožno obrnite v desno", - "Walk": "Pešačite", - "Cycle": "Kolesarite", - "Car": "Avto", - "Bus": "Avtobus", - "Subway": "Podzemna železnica", - "Train": "Vlak", - "Ferry": "", - "Light Rail": "Tramvaj", - "Cable Car": "", - "Funicular": "", - "Aerial Tram": "Gondola", - "Airplane": "", - "Bicycle rental station": "postaje za izposojo koles", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "V krožišču vozite v nasprotni smeri urinega kazalca in pri %(ordinal_exit_number)s izvozu zavijte na %(street_name)s", - "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "V krožišču vozite v nasprotni smeri urinega kazalca in pri %(ordinal_exit_number)s izvozu zavijte na %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "V krožišču vozite v smeri urinega kazalca in pri %(ordinal_exit_number)s izvozu zavijte na %(street_name)s", - "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "V krožišču vozite v smeri urinega kazalca in pri %(ordinal_exit_number)s izvozu zavijte na %(street_name)s", - "Start on": "Začnite na", - " heading ": " v smeri ", - "to continue on": "nadaljujte na", - "on to": "na", - "first": "prvem", - "second": "drugem", - "third": "tretjem", - "fourth": "četrtem", - "fifth": "petem", - "sixth": "šestem", - "seventh": "sedmem", - "eight": "osmem", - "ninth": "devetem", - "tenth": "desetem", - "%d hr_0": "%d ur", - "%d hr_1": "%d ura", - "%d hr_2": "%d uri", - "%d hr_3": "%d ure", - "%d min_0": "%d min.", - "%d min_1": "%d min.", - "%d min_2": "%d min.", - "%d min_3": "%d min.", - "%d sec_0": "%d sek.", - "%d sec_1": "%d sek.", - "%d sec_2": "%d sek.", - "%d sec_3": "%d sek.", - "OK": "V redu", - "Minimize": "Skrči", - "Bring to front": "Postavi v ospredje", - "Send to back": "Pošlji v ozadje", - "Route:": "Linija:", - "Variant:": "Različica:", - "Stop Finder": "Iskalnik postaj", - "Feed": "", - "By ID": "Po ID-ju", - "By Name": "Po imenu", - "Search": "Poišči", - "No Stops Found": "Ni najdenih postaj", - "Date": "Datum", - "Find Stops": "Poišči postaje", - "(No Stop Selected)": "(Nobena postaja ni bila izbrana)", - "Block": "Blok", - "Recenter": "Prikaži na karti", - "Viewer": "Pregledovalnik", - "Quick": "Hitro", - "Flat": "Položno", - "Bike Friendly": "Kolesarju prijazno", - "B": "K", - "F": "P", - "Q": "H", - "All Routes": "Vse linije", - "Save": "Shrani", - "Close": "Zapri", - "Travel Options": "Možnosti potovanja", - "Geocoder": "", - "Arrive": "Prihod do", - "Now": "Zdaj", - "Wheelchair accessible trip:": "Primerno za invalidske vozičke:", - "Show Filtered Itineraries:": "", - "Travel by": "Način potovanja ", - "Preferred Routes": "Priljubljene linije", - "Edit": "Uredi", - "None": "Brez", - "Weight": "Utež", - "Banned routes": "Neželene linije", - "Use": "Uporabi", - "My Own Bike": "Lastno kolo", - "A Shared Bike": "Izposojeno kolo", - "Plan Your Trip": "Načrtuj pot", - "Additional parameters": "", - " to _direction": " do ", - " to _bus_direction": " smer ", - "Start_template": "Začetek", - "Depart_itinerary": "Odhod", - "depart_itinerary": "začni pot", - "Start_popup": "Začetek", - "Depart_tripoptions": "Odhod ob" -} \ No newline at end of file + "Transit": "Javni prevoz", + "Bus Only": "Avtobus", + "Rail Only": "Vlak", + "Airplane Only": "", + "Transit, No Airplane": "", + "Bicycle Only": "Kolo", + "Bicycle & Transit": "Kolo & Javni prevoz", + "Walk Only": "Pešačenje", + "Car Only": "Začnite na", + "Taxi": "", + "Park and Ride": "Parkiraj in se pelji", + "Ride and Kiss (Car Pickup)": "", + "Kiss and Ride (Car Dropoff)": "", + "Bike and Ride": "", + "Rented Bicycle": "Izposojeno kolo", + "Transit & Rented Bicycle": "Izposojeno kolo & Javni prevoz", + "Rented Scooter": "", + "Transit & Rented Scooter": "Izposojeno kolo & Javni prevoz", + "Transit with flex access": "", + "Transit with flex egress": "", + "Transit with flex access and egress": "", + "Direct flex search": "", + "Recenter Map Here": "Prikaži karto tukaj", + "Zoom In": "Približaj", + "Zoom Out": "Oddalji", + "Minimize all": "Skrči vse", + "Unminimize all": "Razširi vse", + "Stop Viewer": "Pregledovalnik postaj", + "Plan Trip": "Načrtuj pot", + "From Stop": "Začetna postaja", + "To Stop": "Končna postaja", + "Routes Serving Stop": "Avtobusi, ki ustavljajo na postaji", + "Bike Share Planner": "Planer za izposojena kolesa", + "Trip Options": "Nastavitve poti", + "PICK UP BIKE": "IZPOSOJA KOLESA", + "ALTERNATE PICKUP": "ALTERNATIVNO MESTO IZPOSOJE", + "DROP OFF BIKE": "VRNITEV KOLESA", + "ALTERNATE DROP OFF": "ALTERNATIVNO MESTO VRNITVE KOLESA", + "BIKE STATION": "IZPOSOJEVALNA POSTAJA", + "Station:": "Postaja:", + "%d bike available_0": "%d koles na voljo", + "%d bike available_1": "%d kolo na voljo", + "%d bike available_2": "%d kolesi na voljo", + "%d bike available_3": "%d kolesa na voljo", + "%d dock available_0": "%d prostorov na voljo", + "%d dock available_1": "%d prostor na voljo", + "%d dock available_2": "%d prostora na voljo", + "%d dock available_3": "%d prostori na voljo", + "Recommended Pick Up:": "Predlagana postaja za izposojo kolesa:", + "Bicycle rental": "postaje za izposojo koles", + "Recommended Drop Off:": "Predlagana postaja za vrnitev kolesa:", + "Multimodal Trip Planner": "Načrtovalnik poti", + "Itineraries": "Načrti poti", + "This itinerary departs on a different day from the previous one": "", + "%d Itinerary Returned_0": "%d vrnjenih načrtov poti", + "%d Itinerary Returned_1": "%d vrnjen načrt poti", + "%d Itinerary Returned_2": "%d vrnjena načrta poti", + "%d Itinerary Returned_3": "%d vrnjeni načrti poti", + "Link to search": "Iskanje", + "Previous Page": "Prejšnja", + "Next Page": "", + "CONTINUES AS": "SE NADALJUJE KOT", + "%d min late_0": "%d min. zamude", + "%d min late_1": "%d min. zamude", + "%d min late_2": "%d min. zamude", + "%d min late_3": "%d min. zamude", + "%d min early_0": "%d min. prehitro", + "%d min early_1": "%d min. prehitro", + "%d min early_2": "%d min. prehitro", + "%d min early_3": "%d min. prehitro", + "on time": "pravočasno", + "This itinerary departs on a different day than the one searched for": "", + "Arrived at destination with a rented bicycle!": "", + "End": "Konec", + "Trip Summary": "Povzetek poti", + "Travel": "Potuj ob", + "Time": "Trajanje", + "GenCost": "", + "Total Walk": "Skupno hoje", + "Total Bike": "Skupno kolesarjenja", + "Total drive": "", + "Elevation Gained": "", + "Elevation Lost": "", + "Transfers": "Št. prestopov", + "Fare": "Cena", + "Valid": "Veljavno", + "Link to Itinerary": "Načrt poti", + "Print": "Natisni", + "Your Trip": "Vaša pot", + "Email": "E-pošta", + "every %d min_0": "vsakih %d min", + "every %d min_1": "vsako %d min", + "every %d min_2": "vsaki %d min", + "every %d min_3": "vsake %d min", + "Board at ": "Vstop na ", + "Stop": "Postaja", + "Time in transit": "Časa na vožnji", + "Route ID": "", + "Trip ID": "", + "Service Date": "", + "Trip Viewer": "Pregledovalnik poti", + "late as": "", + "Stay on board": "Ostanite v vozilu", + "Alight": "Izstop", + "at": "na", + "%(currency)s %(price)s": "%(price)s %(currency)s", + "Start: %(location)s at %(time_date)s": "Začetek: %(location)s ob %(time_date)s", + "Board": "Vstop", + "(%(agency_id)s Stop ID #%(stop_id)s),": "(%(agency_id)s),", + "End: %(location)s at %(time_date)s": "Konec: %(location)s ob %(time_date)s", + "(%(agencyId)s Stop ID #%(id)s),": "", + "\nView itinerary online:\n%(itinerary_link)s\n": "\nOglejte si načrt poti na spletu:\n%(itinerary_link)s\n", + "We're sorry. The trip planner is temporarily unavailable. Please try again later.": "Opravičujemo se. Daljinar trenutno ni na voljo. Prosimo poskusite kasneje.", + "Trip is not possible. You might be trying to plan a trip outside the map data boundary.": "", + "No trip found. There may be no transit service within the maximum specified distance or at the specified time, or your start or end point might not be safely accessible.": "", + "No transit times available. The date may be past or too far in the future or there may not be transit service for your trip at the time you chose.": "Podatki o voznih redih niso na voljo. Mogoče je datum preveč v preteklosti ali prihodnosti ali pa javni prevoz ne obstaja za pot, ki jo načrtujete.", + "The trip planner is taking way too long to process your request. Please try again later.": "Daljinar potrebuje preveč časa za obdelavo vašega zahtevka. Prosimo poskusite znova kasneje.", + "The request has errors that the server is not willing or able to process.": "Zahtevek ima napake, ki jih strežnik ne more obdelati.", + "Origin is unknown. Can you be a bit more descriptive?": "Začetek poti ni znan. Prosimo bodite bolj natančni.", + "Destination is unknown. Can you be a bit more descriptive?": "Konec poti ni znan. Prosimo bodite bolj natančni.", + "Both origin and destination are unknown. Can you be a bit more descriptive?": "Začetek in konec sta neznana. Prosimo bodite bolj natančni.", + "Both origin and destination are not wheelchair accessible": "Do začetka in konca ni mogoče priti z vozičkom.", + "Origin is within a trivial distance of the destination.": "Začetek je trivialno oddaljen od konec.", + "The trip planner is unsure of the location you want to start from. Please select from the following options, or be more specific.": "", + "The trip planner is unsure of the destination you want to go to. Please select from the following options, or be more specific.": "", + "Both origin and destination are ambiguous. Please select from the following options, or be more specific.": "", + "All of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set if any are": "", + "The values of triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must sum to 1": "", + "If triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor are provided, OptimizeType must be TRIANGLE": "", + "If OptimizeType is TRIANGLE, triangleSafetyFactor, triangleSlopeFactor, and triangleTimeFactor must be set": "", + "Set as Start Location": "Začetek poti", + "Set as End Location": "Konec poti", + "Destination": "Konec", + "Error %(error_id)d": "Napaka %(error_id)d", + "No Trip Found": "Ne najdemo poti", + "Your %(bike_share_name)s route": "Kolesarjenje s kolesom izposojenim pri %(bike_share_name)s", + "Your bike route": "Kolesarska pot", + "Walk to the %(bike_share_name)s dock.": "Hodite do postaje podjetja %(bike_share_name)s.", + "Walk from the %(bike_share_name)s dock to your destination.": "Hodite od postaje podjetja %(bike_share_name)s do vašega cilja.", + "Your walk route": "Pot peš", + "Your route using the scooter": "", + "Your driving route": "Kolesarska pot", + "north": "sever", + "northeast": "severovzhod", + "east": "vzhod", + "southeast": "jugovzhod", + "south": "jug", + "southwest": "jugozahod", + "west": "zahod", + "northwest": "severozahod", + "hard left": "ostro levo", + "left": "levo", + "slight left": "rahlo levo", + "continue": "nadaljujte", + "slight right": "rahlo desno", + "right": "desno", + "hard right": "ostro desno", + "elevator": "pojdite z dvigalom", + "U-turn left": "Polkrožno obrnite v levo", + "U-turn right": "Polkrožno obrnite v desno", + "Walk": "Pešačite", + "Cycle": "Kolesarite", + "Car": "Avto", + "Bus": "Avtobus", + "Subway": "Podzemna železnica", + "Train": "Vlak", + "Ferry": "", + "Light Rail": "Tramvaj", + "Cable Car": "", + "Funicular": "", + "Aerial Tram": "Gondola", + "Airplane": "", + "Bicycle rental station": "postaje za izposojo koles", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "V krožišču vozite v nasprotni smeri urinega kazalca in pri %(ordinal_exit_number)s izvozu zavijte na %(street_name)s", + "Take roundabout counterclockwise to %(ordinal_exit_number)s exit on %(street_name)s": "V krožišču vozite v nasprotni smeri urinega kazalca in pri %(ordinal_exit_number)s izvozu zavijte na %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "V krožišču vozite v smeri urinega kazalca in pri %(ordinal_exit_number)s izvozu zavijte na %(street_name)s", + "Take roundabout clockwise to %(ordinal_exit_number)s exit on %(street_name)s": "V krožišču vozite v smeri urinega kazalca in pri %(ordinal_exit_number)s izvozu zavijte na %(street_name)s", + "Start on": "Začnite na", + " heading ": " v smeri ", + "to continue on": "nadaljujte na", + "on to": "na", + "first": "prvem", + "second": "drugem", + "third": "tretjem", + "fourth": "četrtem", + "fifth": "petem", + "sixth": "šestem", + "seventh": "sedmem", + "eight": "osmem", + "ninth": "devetem", + "tenth": "desetem", + "%d hr_0": "%d ur", + "%d hr_1": "%d ura", + "%d hr_2": "%d uri", + "%d hr_3": "%d ure", + "%d min_0": "%d min.", + "%d min_1": "%d min.", + "%d min_2": "%d min.", + "%d min_3": "%d min.", + "%d sec_0": "%d sek.", + "%d sec_1": "%d sek.", + "%d sec_2": "%d sek.", + "%d sec_3": "%d sek.", + "OK": "V redu", + "Minimize": "Skrči", + "Bring to front": "Postavi v ospredje", + "Send to back": "Pošlji v ozadje", + "Route:": "Linija:", + "Variant:": "Različica:", + "Stop Finder": "Iskalnik postaj", + "Feed": "", + "By ID": "Po ID-ju", + "By Name": "Po imenu", + "Search": "Poišči", + "No Stops Found": "Ni najdenih postaj", + "Date": "Datum", + "Find Stops": "Poišči postaje", + "(No Stop Selected)": "(Nobena postaja ni bila izbrana)", + "Block": "Blok", + "Recenter": "Prikaži na karti", + "Viewer": "Pregledovalnik", + "Quick": "Hitro", + "Flat": "Položno", + "Bike Friendly": "Kolesarju prijazno", + "B": "K", + "F": "P", + "Q": "H", + "All Routes": "Vse linije", + "Save": "Shrani", + "Close": "Zapri", + "Travel Options": "Možnosti potovanja", + "Geocoder": "", + "Arrive": "Prihod do", + "Now": "Zdaj", + "Wheelchair accessible trip:": "Primerno za invalidske vozičke:", + "Show Filtered Itineraries:": "", + "Travel by": "Način potovanja ", + "Preferred Routes": "Priljubljene linije", + "Edit": "Uredi", + "None": "Brez", + "Weight": "Utež", + "Banned routes": "Neželene linije", + "Use": "Uporabi", + "My Own Bike": "Lastno kolo", + "A Shared Bike": "Izposojeno kolo", + "Plan Your Trip": "Načrtuj pot", + "Additional parameters": "", + " to _direction": " do ", + " to _bus_direction": " smer ", + "Start_template": "Začetek", + "Depart_itinerary": "Odhod", + "depart_itinerary": "začni pot", + "Start_popup": "Začetek", + "Depart_tripoptions": "Odhod ob" +} diff --git a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/bikeep/bikeep.json b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/bikeep/bikeep.json index 6f164077ee1..0ffa202bd11 100644 --- a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/bikeep/bikeep.json +++ b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/bikeep/bikeep.json @@ -5,22 +5,14 @@ "type": "Feature", "geometry": { "type": "Point", - "coordinates": [ - 4.996344, - 60.405932 - ] + "coordinates": [4.996344, 60.405932] }, "properties": { "code": "224121", "label": "Ågotnes Terminal", "name": "#224121 Ågotnes Terminal", "address": "Ågotnes", - "tags": [ - "FREE", - "BIKE", - "PRIVATE", - "BOOKABLE" - ], + "tags": ["FREE", "BIKE", "PRIVATE", "BOOKABLE"], "icon": { "png": "", "png2x": "", @@ -38,22 +30,14 @@ "type": "Feature", "geometry": { "type": "Point", - "coordinates": [ - 10.666802, - 59.436443 - ] + "coordinates": [10.666802, 59.436443] }, "properties": { "code": "226261", "label": "Gågata Østre", "name": "#226261 Gågata Østre", "address": "Dronningens gate, Moss", - "tags": [ - "FREE", - "PRIVATE", - "BOOKABLE", - "BIKE" - ], + "tags": ["FREE", "PRIVATE", "BOOKABLE", "BIKE"], "icon": { "png": "", "png2x": "", @@ -71,22 +55,14 @@ "type": "Feature", "geometry": { "type": "Point", - "coordinates": [ - 10.661444, - 59.435401 - ] + "coordinates": [10.661444, 59.435401] }, "properties": { "code": "226259", "label": "Gågata Vestre", "name": "#226259 Gågata Vestre", "address": "Dronningens gate, Moss", - "tags": [ - "BIKE", - "FREE", - "PRIVATE", - "BOOKABLE" - ], + "tags": ["BIKE", "FREE", "PRIVATE", "BOOKABLE"], "icon": { "png": "", "png2x": "", @@ -104,22 +80,14 @@ "type": "Feature", "geometry": { "type": "Point", - "coordinates": [ - 10.774958, - 59.946535 - ] + "coordinates": [10.774958, 59.946535] }, "properties": { "code": "223443", "label": "Storo Storsenter", "name": "#223443 Storo Storsenter", "address": "Norway", - "tags": [ - "BIKE", - "PRIVATE", - "BOOKABLE", - "FREE" - ], + "tags": ["BIKE", "PRIVATE", "BOOKABLE", "FREE"], "icon": { "png": "https://assets.bikeep.com/locations/icons/bikeep.png", "png2x": "https://assets.bikeep.com/locations/icons/bikeep@2x.png", @@ -137,23 +105,14 @@ "type": "Feature", "geometry": { "type": "Point", - "coordinates": [ - 10.501222, - 59.914578 - ] + "coordinates": [10.501222, 59.914578] }, "properties": { "code": "224519", "label": "Kolsås Sykkelhotell", "name": "#224519 Kolsås Sykkelhotell", "address": "Norway", - "tags": [ - "PRIVATE", - "FREE", - "BOOKABLE", - "BIKE_HOUSE", - "BIKE" - ], + "tags": ["PRIVATE", "FREE", "BOOKABLE", "BIKE_HOUSE", "BIKE"], "icon": { "png": "https://assets.bikeep.com/locations/icons/bikeep.png", "png2x": "https://assets.bikeep.com/locations/icons/bikeep@2x.png", @@ -171,22 +130,14 @@ "type": "Feature", "geometry": { "type": "Point", - "coordinates": [ - 10.663716, - 59.435539 - ] + "coordinates": [10.663716, 59.435539] }, "properties": { "code": "226260", "label": "Gågata Midtre", "name": "#226260 Gågata Midtre", "address": "Dronningens gate, Moss", - "tags": [ - "FREE", - "BOOKABLE", - "PRIVATE", - "BIKE" - ], + "tags": ["FREE", "BOOKABLE", "PRIVATE", "BIKE"], "icon": { "png": "", "png2x": "", @@ -204,22 +155,14 @@ "type": "Feature", "geometry": { "type": "Point", - "coordinates": [ - 5.320344, - 60.463246 - ] + "coordinates": [5.320344, 60.463246] }, "properties": { "code": "226266", "label": "Åsane Sykkelhus", "name": "#226266 Åsane Sykkelhus", "address": "Åsane terminal", - "tags": [ - "BOOKABLE", - "BIKE", - "FREE", - "PRIVATE" - ], + "tags": ["BOOKABLE", "BIKE", "FREE", "PRIVATE"], "icon": { "png": "", "png2x": "", @@ -237,22 +180,14 @@ "type": "Feature", "geometry": { "type": "Point", - "coordinates": [ - 10.521137, - 59.889181 - ] + "coordinates": [10.521137, 59.889181] }, "properties": { "code": "224112", "label": "Sandvika Storsenter Kjørbokollen", "name": "#224112 Sandvika Storsenter Kjørbokollen", "address": "Brodtkorbsgate 7, Sandvika", - "tags": [ - "PRIVATE", - "FREE", - "BIKE", - "BOOKABLE" - ], + "tags": ["PRIVATE", "FREE", "BIKE", "BOOKABLE"], "icon": { "png": "", "png2x": "", @@ -270,22 +205,14 @@ "type": "Feature", "geometry": { "type": "Point", - "coordinates": [ - 10.520496, - 59.887412 - ] + "coordinates": [10.520496, 59.887412] }, "properties": { "code": "224111", "label": "Sandvika Storsenter Nytorget", "name": "#224111 Sandvika Storsenter Nytorget", "address": "Sandviksveien 176, Sandvika", - "tags": [ - "BIKE", - "BOOKABLE", - "PRIVATE", - "FREE" - ], + "tags": ["BIKE", "BOOKABLE", "PRIVATE", "FREE"], "icon": { "png": "", "png2x": "", @@ -300,4 +227,4 @@ } } ] -} \ No newline at end of file +} diff --git a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/bikely/bikely.json b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/bikely/bikely.json index a3e1e9e2e57..172220650aa 100644 --- a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/bikely/bikely.json +++ b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/bikely/bikely.json @@ -321,4 +321,4 @@ "id": 26 } ] -} \ No newline at end of file +} diff --git a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/facilities.json b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/facilities.json index 0bca41f3bf6..c9305c556c3 100644 --- a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/facilities.json +++ b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/facilities.json @@ -15,66 +15,25 @@ } }, "bbox": [ - 24.80034603935215, - 60.17480881241633, - 24.80808017426278, + 24.80034603935215, 60.17480881241633, 24.80808017426278, 60.17714686717807 ], "type": "Polygon", "coordinates": [ [ - [ - 24.805922082319398, - 60.17671175792864 - ], - [ - 24.80745024472255, - 60.176920611087695 - ], - [ - 24.80808017426278, - 60.17588213365369 - ], - [ - 24.800591011951123, - 60.17480881241633 - ], - [ - 24.80034603935215, - 60.17519753280732 - ], - [ - 24.80281909606564, - 60.17555724011572 - ], - [ - 24.802492465933668, - 60.17611419849894 - ], - [ - 24.803798986461572, - 60.176299849194635 - ], - [ - 24.803460690967746, - 60.176874199389374 - ], - [ - 24.805478798568853, - 60.17714686717807 - ], - [ - 24.805805428700822, - 60.17661313236411 - ], - [ - 24.805945413043094, - 60.17663633840593 - ], - [ - 24.805922082319398, - 60.17671175792864 - ] + [24.805922082319398, 60.17671175792864], + [24.80745024472255, 60.176920611087695], + [24.80808017426278, 60.17588213365369], + [24.800591011951123, 60.17480881241633], + [24.80034603935215, 60.17519753280732], + [24.80281909606564, 60.17555724011572], + [24.802492465933668, 60.17611419849894], + [24.803798986461572, 60.176299849194635], + [24.803460690967746, 60.176874199389374], + [24.805478798568853, 60.17714686717807], + [24.805805428700822, 60.17661313236411], + [24.805945413043094, 60.17663633840593], + [24.805922082319398, 60.17671175792864] ] ] }, @@ -87,9 +46,7 @@ "builtCapacity": { "CAR": 1365 }, - "usages": [ - "PARK_AND_RIDE" - ], + "usages": ["PARK_AND_RIDE"], "services": [ "LIGHTING", "COVERED", @@ -97,9 +54,7 @@ "PAYMENT_AT_GATE", "ENGINE_IGNITION_AID" ], - "authenticationMethods": [ - "HSL_TICKET" - ], + "authenticationMethods": ["HSL_TICKET"], "pricing": [ { "usage": "PARK_AND_RIDE", @@ -211,9 +166,7 @@ "en": "1. tunti 2 € / 60 min, seuraavat tunnit 1 € / 30 min" }, "url": null, - "paymentMethods": [ - "DEBIT_CARD" - ] + "paymentMethods": ["DEBIT_CARD"] }, "openingHours": { "openNow": true, @@ -264,38 +217,18 @@ } }, "bbox": [ - 24.977034456273202, - 60.186015498799264, - 24.981894619008195, + 24.977034456273202, 60.186015498799264, 24.981894619008195, 60.18802910674705 ], "type": "Polygon", "coordinates": [ [ - [ - 24.977731830617074, - 60.18802910674705 - ], - [ - 24.977034456273202, - 60.186674268899424 - ], - [ - 24.979169494649057, - 60.186015498799264 - ], - [ - 24.981894619008195, - 60.187397033842615 - ], - [ - 24.98158348276247, - 60.187589057277705 - ], - [ - 24.977731830617074, - 60.18802910674705 - ] + [24.977731830617074, 60.18802910674705], + [24.977034456273202, 60.186674268899424], + [24.979169494649057, 60.186015498799264], + [24.981894619008195, 60.187397033842615], + [24.98158348276247, 60.187589057277705], + [24.977731830617074, 60.18802910674705] ] ] }, @@ -310,9 +243,7 @@ "CAR": 300, "ELECTRIC_CAR": 200 }, - "usages": [ - "PARK_AND_RIDE" - ], + "usages": ["PARK_AND_RIDE"], "services": [ "LIGHTING", "COVERED", @@ -320,9 +251,7 @@ "PAYMENT_AT_GATE", "ENGINE_IGNITION_AID" ], - "authenticationMethods": [ - "HSL_TICKET" - ], + "authenticationMethods": ["HSL_TICKET"], "pricing": [ { "usage": "PARK_AND_RIDE", @@ -383,12 +312,7 @@ "en": "Electric car parking 2 € + 0,15€ / kWh" }, "url": null, - "paymentMethods": [ - "COINS", - "NOTES", - "DEBIT_CARD", - "OTHER" - ] + "paymentMethods": ["COINS", "NOTES", "DEBIT_CARD", "OTHER"] }, "openingHours": { "openNow": false, @@ -423,34 +347,17 @@ } }, "bbox": [ - 24.81405168771744, - 60.21851030940037, - 24.81410264968872, + 24.81405168771744, 60.21851030940037, 24.81410264968872, 60.21875543991248 ], "type": "Polygon", "coordinates": [ [ - [ - 24.81406778097153, - 60.21875543991248 - ], - [ - 24.81405168771744, - 60.21851030940037 - ], - [ - 24.81408387422562, - 60.21851030940037 - ], - [ - 24.81410264968872, - 60.21875543991248 - ], - [ - 24.81406778097153, - 60.21875543991248 - ] + [24.81406778097153, 60.21875543991248], + [24.81405168771744, 60.21851030940037], + [24.81408387422562, 60.21851030940037], + [24.81410264968872, 60.21875543991248], + [24.81406778097153, 60.21875543991248] ] ] }, @@ -463,13 +370,8 @@ "builtCapacity": { "BICYCLE": 80 }, - "usages": [ - "PARK_AND_RIDE" - ], - "services": [ - "LIGHTING", - "BICYCLE_FRAME_LOCK" - ], + "usages": ["PARK_AND_RIDE"], + "services": ["LIGHTING", "BICYCLE_FRAME_LOCK"], "authenticationMethods": [], "pricing": [ { @@ -565,39 +467,16 @@ "name": "EPSG:4326" } }, - "bbox": [ - 25.11001, - 60.237897, - 25.110917, - 60.238254 - ], + "bbox": [25.11001, 60.237897, 25.110917, 60.238254], "type": "Polygon", "coordinates": [ [ - [ - 25.110053, - 60.238253 - ], - [ - 25.11001, - 60.237953 - ], - [ - 25.110106, - 60.237905 - ], - [ - 25.110917, - 60.237897 - ], - [ - 25.110912, - 60.238254 - ], - [ - 25.110053, - 60.238253 - ] + [25.110053, 60.238253], + [25.11001, 60.237953], + [25.110106, 60.237905], + [25.110917, 60.237897], + [25.110912, 60.238254], + [25.110053, 60.238253] ] ] }, @@ -610,9 +489,7 @@ "DISABLED": 2, "CAR": 80 }, - "usages": [ - "PARK_AND_RIDE" - ], + "usages": ["PARK_AND_RIDE"], "pricing": [ { "usage": "PARK_AND_RIDE", diff --git a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/hubs.json b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/hubs.json index da4c64a63fa..a05886513df 100644 --- a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/hubs.json +++ b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/hubs.json @@ -1,76 +1,65 @@ { - "results": [ - { - "id": 321, - "name": { - "fi": "HubYksi", - "sv": "HubEn", - "en": "HubOne" - }, - "location": { - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - }, - "type": "Point", - "coordinates": [ - 24.804913, - 60.176064 - ] - }, - "facilityIds": [ - 990, - 1037 - ], - "address": { - "streetAddress": null, - "postalCode": null, - "city": { - "fi": "Espoo", - "sv": "Esbo", - "en": "Espoo" - } - }, - "modifiedAt": null, - "modifiedBy": null + "results": [ + { + "id": 321, + "name": { + "fi": "HubYksi", + "sv": "HubEn", + "en": "HubOne" + }, + "location": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } }, - { - "id": 129, - "name": { - "fi": "HubKaksi", - "sv": "HubTvå", - "en": "HubTwo" - }, - "location": { - "crs": { - "type": "name", - "properties": { - "name": "EPSG:4326" - } - }, - "type": "Point", - "coordinates": [ - 25.101168, - 60.45744 - ] - }, - "facilityIds": [ - 894 - ], - "address": { - "streetAddress": null, - "postalCode": null, - "city": { - "fi": "Järvenpää", - "sv": "Träskända", - "en": "Järvenpää" - } - }, - "modifiedAt": null, - "modifiedBy": null + "type": "Point", + "coordinates": [24.804913, 60.176064] + }, + "facilityIds": [990, 1037], + "address": { + "streetAddress": null, + "postalCode": null, + "city": { + "fi": "Espoo", + "sv": "Esbo", + "en": "Espoo" } - ], - "hasMore": false -} \ No newline at end of file + }, + "modifiedAt": null, + "modifiedBy": null + }, + { + "id": 129, + "name": { + "fi": "HubKaksi", + "sv": "HubTvå", + "en": "HubTwo" + }, + "location": { + "crs": { + "type": "name", + "properties": { + "name": "EPSG:4326" + } + }, + "type": "Point", + "coordinates": [25.101168, 60.45744] + }, + "facilityIds": [894], + "address": { + "streetAddress": null, + "postalCode": null, + "city": { + "fi": "Järvenpää", + "sv": "Träskända", + "en": "Järvenpää" + } + }, + "modifiedAt": null, + "modifiedBy": null + } + ], + "hasMore": false +} diff --git a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/utilizations.json b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/utilizations.json index c8c87fbe823..dc9772682c4 100644 --- a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/utilizations.json +++ b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/hslpark/utilizations.json @@ -1,20 +1,20 @@ [ - { - "facilityId": 990, - "capacityType": "CAR", - "usage": "PARK_AND_RIDE", - "timestamp": "2021-12-21T08:42:39.000+02:00", - "spacesAvailable": 600, - "capacity": 1365, - "openNow": true - }, - { - "facilityId": 894, - "capacityType": "BICYCLE", - "usage": "PARK_AND_RIDE", - "timestamp": "2019-12-31T11:58:13.000+02:00", - "spacesAvailable": 43, - "capacity": 80, - "openNow": true - } + { + "facilityId": 990, + "capacityType": "CAR", + "usage": "PARK_AND_RIDE", + "timestamp": "2021-12-21T08:42:39.000+02:00", + "spacesAvailable": 600, + "capacity": 1365, + "openNow": true + }, + { + "facilityId": 894, + "capacityType": "BICYCLE", + "usage": "PARK_AND_RIDE", + "timestamp": "2019-12-31T11:58:13.000+02:00", + "spacesAvailable": 43, + "capacity": 80, + "openNow": true + } ] diff --git a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/parkapi/herrenberg.json b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/parkapi/herrenberg.json index e351bdc7fd0..b21ca985af1 100644 --- a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/parkapi/herrenberg.json +++ b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/parkapi/herrenberg.json @@ -394,4 +394,4 @@ } } ] -} \ No newline at end of file +} diff --git a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/parkapi/parkapi-reutlingen.json b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/parkapi/parkapi-reutlingen.json index 946ec007ba9..23a39f17920 100644 --- a/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/parkapi/parkapi-reutlingen.json +++ b/application/src/ext-test/resources/org/opentripplanner/ext/vehicleparking/parkapi/parkapi-reutlingen.json @@ -424,4 +424,4 @@ "notes": {} } ] -} \ No newline at end of file +} diff --git a/application/src/ext-test/resources/org/opentripplanner/ext/vehiclerentalservicedirectory/generatedoc/router-config.json b/application/src/ext-test/resources/org/opentripplanner/ext/vehiclerentalservicedirectory/generatedoc/router-config.json index 0c772551549..e2dc7e202d2 100644 --- a/application/src/ext-test/resources/org/opentripplanner/ext/vehiclerentalservicedirectory/generatedoc/router-config.json +++ b/application/src/ext-test/resources/org/opentripplanner/ext/vehiclerentalservicedirectory/generatedoc/router-config.json @@ -9,8 +9,8 @@ }, "networks": [ { - "network" : "oslo-by-sykkel", - "geofencingZones" : true + "network": "oslo-by-sykkel", + "geofencingZones": true } ] } diff --git a/application/src/ext-test/resources/ridehailing/uber-arrival-estimates.json b/application/src/ext-test/resources/ridehailing/uber-arrival-estimates.json index 624d49d41e0..0126158daf7 100644 --- a/application/src/ext-test/resources/ridehailing/uber-arrival-estimates.json +++ b/application/src/ext-test/resources/ridehailing/uber-arrival-estimates.json @@ -49,4 +49,4 @@ "product_id": "3ab64887-4842-4c8e-9780-ccecd3a0391d" } ] -} \ No newline at end of file +} diff --git a/application/src/ext-test/resources/ridehailing/uber-price-estimates.json b/application/src/ext-test/resources/ridehailing/uber-price-estimates.json index d9f8540229e..a6c39c7f10a 100644 --- a/application/src/ext-test/resources/ridehailing/uber-price-estimates.json +++ b/application/src/ext-test/resources/ridehailing/uber-price-estimates.json @@ -89,4 +89,4 @@ "currency_code": "USD" } ] -} \ No newline at end of file +} diff --git a/application/src/ext-test/resources/smoovebikerental/smoove.json b/application/src/ext-test/resources/smoovebikerental/smoove.json index 364d947b504..9091a493a7c 100644 --- a/application/src/ext-test/resources/smoovebikerental/smoove.json +++ b/application/src/ext-test/resources/smoovebikerental/smoove.json @@ -1,49 +1,49 @@ { - "result" : [ - { - "name" : "A04 Hamn", - "operative" : true, - "coordinates" : "60.167913, 24.952269", - "style" : "Station on", - "avl_bikes" : 1, - "free_slots" : 11, - "total_slots" : 12 - }, - { - "name" : "B05 Fake", - "operative" : false, - "coordinates" : "60, 24", - "style" : "Station off", - "avl_bikes" : 5, - "free_slots" : 5, - "total_slots" : 5 - }, - { - "name" : "B06 Foo", - "operative" : true, - "coordinates" : "61,25", - "style" : "Station on", - "avl_bikes" : 5, - "free_slots" : 5, - "total_slots" : 5 - }, - { - "name" : "B08 Invalid", - "operative" : true, - "coordinates" : "", - "style" : "Station on", - "avl_bikes" : 5, - "free_slots" : 5, - "total_slots" : 5 - }, - { - "name" : "B09 Full", - "operative" : true, - "coordinates" : "60.168913, 24.953269", - "style" : "Station on", - "avl_bikes" : 12, - "free_slots" : 0, - "total_slots" : 12 - } - ] + "result": [ + { + "name": "A04 Hamn", + "operative": true, + "coordinates": "60.167913, 24.952269", + "style": "Station on", + "avl_bikes": 1, + "free_slots": 11, + "total_slots": 12 + }, + { + "name": "B05 Fake", + "operative": false, + "coordinates": "60, 24", + "style": "Station off", + "avl_bikes": 5, + "free_slots": 5, + "total_slots": 5 + }, + { + "name": "B06 Foo", + "operative": true, + "coordinates": "61,25", + "style": "Station on", + "avl_bikes": 5, + "free_slots": 5, + "total_slots": 5 + }, + { + "name": "B08 Invalid", + "operative": true, + "coordinates": "", + "style": "Station on", + "avl_bikes": 5, + "free_slots": 5, + "total_slots": 5 + }, + { + "name": "B09 Full", + "operative": true, + "coordinates": "60.168913, 24.953269", + "style": "Station on", + "avl_bikes": 12, + "free_slots": 0, + "total_slots": 12 + } + ] } diff --git a/application/src/ext/resources/org/opentripplanner/ext/vectortiles/router-config.json b/application/src/ext/resources/org/opentripplanner/ext/vectortiles/router-config.json index df325d076a3..5eb5c3976da 100644 --- a/application/src/ext/resources/org/opentripplanner/ext/vectortiles/router-config.json +++ b/application/src/ext/resources/org/opentripplanner/ext/vectortiles/router-config.json @@ -13,4 +13,3 @@ ] } } - diff --git a/application/src/test/resources/gbfs/helsinki/gbfs.json b/application/src/test/resources/gbfs/helsinki/gbfs.json index cad3f88a286..7f4fda298d3 100644 --- a/application/src/test/resources/gbfs/helsinki/gbfs.json +++ b/application/src/test/resources/gbfs/helsinki/gbfs.json @@ -19,4 +19,4 @@ ] } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/gbfs/helsinki/station_information.json b/application/src/test/resources/gbfs/helsinki/station_information.json index 7b39eb6c096..bb20c0ae1c9 100644 --- a/application/src/test/resources/gbfs/helsinki/station_information.json +++ b/application/src/test/resources/gbfs/helsinki/station_information.json @@ -75,4 +75,4 @@ } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/gbfs/helsinki/station_status.json b/application/src/test/resources/gbfs/helsinki/station_status.json index a97734b8b0b..375043145cc 100644 --- a/application/src/test/resources/gbfs/helsinki/station_status.json +++ b/application/src/test/resources/gbfs/helsinki/station_status.json @@ -105,4 +105,4 @@ } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/gbfs/helsinki/system_information.json b/application/src/test/resources/gbfs/helsinki/system_information.json index 2bb380d81a2..0215fd78268 100644 --- a/application/src/test/resources/gbfs/helsinki/system_information.json +++ b/application/src/test/resources/gbfs/helsinki/system_information.json @@ -7,4 +7,4 @@ "name": "HSL Bikes Share", "timezone": "Europe/Helsinki" } -} \ No newline at end of file +} diff --git a/application/src/test/resources/gbfs/lillestrombysykkel/station_information.json b/application/src/test/resources/gbfs/lillestrombysykkel/station_information.json index 785a96c3b7a..d65fc587e9d 100644 --- a/application/src/test/resources/gbfs/lillestrombysykkel/station_information.json +++ b/application/src/test/resources/gbfs/lillestrombysykkel/station_information.json @@ -54,4 +54,4 @@ } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/gbfs/lillestrombysykkel/station_status.json b/application/src/test/resources/gbfs/lillestrombysykkel/station_status.json index 0bd92fb6088..f3cac10ee59 100644 --- a/application/src/test/resources/gbfs/lillestrombysykkel/station_status.json +++ b/application/src/test/resources/gbfs/lillestrombysykkel/station_status.json @@ -114,4 +114,4 @@ } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/gbfs/lillestrombysykkel/system_information.json b/application/src/test/resources/gbfs/lillestrombysykkel/system_information.json index 0ea3c6a3bbc..f8331cb1f8c 100644 --- a/application/src/test/resources/gbfs/lillestrombysykkel/system_information.json +++ b/application/src/test/resources/gbfs/lillestrombysykkel/system_information.json @@ -8,4 +8,4 @@ "name": "Lillestrøm bysykkel", "timezone": "Europe/Oslo" } -} \ No newline at end of file +} diff --git a/application/src/test/resources/gbfs/lillestrombysykkel/system_pricing_plans.json b/application/src/test/resources/gbfs/lillestrombysykkel/system_pricing_plans.json index 84aba1c609a..82eb22e4e44 100644 --- a/application/src/test/resources/gbfs/lillestrombysykkel/system_pricing_plans.json +++ b/application/src/test/resources/gbfs/lillestrombysykkel/system_pricing_plans.json @@ -24,4 +24,4 @@ } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/gbfs/lillestrombysykkel/vehicle_types.json b/application/src/test/resources/gbfs/lillestrombysykkel/vehicle_types.json index 834380fd87a..3145a2b1672 100644 --- a/application/src/test/resources/gbfs/lillestrombysykkel/vehicle_types.json +++ b/application/src/test/resources/gbfs/lillestrombysykkel/vehicle_types.json @@ -11,4 +11,4 @@ } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/gbfs/tieroslo/gbfs.json b/application/src/test/resources/gbfs/tieroslo/gbfs.json index 6ba0c62d3e8..72fd1309db5 100644 --- a/application/src/test/resources/gbfs/tieroslo/gbfs.json +++ b/application/src/test/resources/gbfs/tieroslo/gbfs.json @@ -16,4 +16,4 @@ ] } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/gbfs/tieroslo/geofencing_zones.json b/application/src/test/resources/gbfs/tieroslo/geofencing_zones.json index 19189f4f86b..26700ae9e35 100644 --- a/application/src/test/resources/gbfs/tieroslo/geofencing_zones.json +++ b/application/src/test/resources/gbfs/tieroslo/geofencing_zones.json @@ -26,1722 +26,435 @@ "coordinates": [ [ [ - [ - 10.687577, - 59.917346 - ], - [ - 10.689719, - 59.91757 - ], - [ - 10.693149, - 59.915496 - ], - [ - 10.693549, - 59.915603 - ], - [ - 10.695344, - 59.915406 - ], - [ - 10.696433, - 59.9152 - ], - [ - 10.697358, - 59.914945 - ], - [ - 10.703902, - 59.910901 - ], - [ - 10.704973, - 59.910023 - ], - [ - 10.706125, - 59.910367 - ], - [ - 10.708318, - 59.90981 - ], - [ - 10.709048, - 59.90921 - ], - [ - 10.709194, - 59.907373 - ], - [ - 10.709308, - 59.906807 - ], - [ - 10.710676, - 59.906546 - ], - [ - 10.712482, - 59.906047 - ], - [ - 10.715777, - 59.906964 - ], - [ - 10.717585, - 59.907176 - ], - [ - 10.718362, - 59.907068 - ], - [ - 10.720131, - 59.906389 - ], - [ - 10.722097, - 59.906165 - ], - [ - 10.724074, - 59.907995 - ], - [ - 10.725487, - 59.908637 - ], - [ - 10.726011, - 59.908948 - ], - [ - 10.727579, - 59.909715 - ], - [ - 10.729922, - 59.910772 - ], - [ - 10.731534, - 59.910969 - ], - [ - 10.734022, - 59.910463 - ], - [ - 10.734379, - 59.909063 - ], - [ - 10.734218, - 59.907531 - ], - [ - 10.735753, - 59.905218 - ], - [ - 10.738504, - 59.903317 - ], - [ - 10.741168, - 59.902322 - ], - [ - 10.743451, - 59.902637 - ], - [ - 10.744563, - 59.903929 - ], - [ - 10.74708, - 59.906759 - ], - [ - 10.749004, - 59.907773 - ], - [ - 10.751673, - 59.907154 - ], - [ - 10.75142, - 59.904713 - ], - [ - 10.752924, - 59.904548 - ], - [ - 10.753226, - 59.904059 - ], - [ - 10.753523, - 59.903061 - ], - [ - 10.750778, - 59.901725 - ], - [ - 10.752392, - 59.900919 - ], - [ - 10.75685, - 59.902768 - ], - [ - 10.757897, - 59.902216 - ], - [ - 10.75732, - 59.901444 - ], - [ - 10.756139, - 59.900651 - ], - [ - 10.754918, - 59.898621 - ], - [ - 10.754512, - 59.897874 - ], - [ - 10.754745, - 59.897098 - ], - [ - 10.755141, - 59.896554 - ], - [ - 10.755718, - 59.895909 - ], - [ - 10.755684, - 59.895421 - ], - [ - 10.75486, - 59.894861 - ], - [ - 10.75628, - 59.894047 - ], - [ - 10.757165221094933, - 59.89390175879156 - ], - [ - 10.759106447045964, - 59.89147857906161 - ], - [ - 10.761746326879063, - 59.88890934390498 - ], - [ - 10.764488740333803, - 59.886756017380435 - ], - [ - 10.767790076895182, - 59.884918153072604 - ], - [ - 10.768649096133226, - 59.883717148821795 - ], - [ - 10.774173632442148, - 59.883563457076114 - ], - [ - 10.774906116394662, - 59.88327546158081 - ], - [ - 10.774591630458728, - 59.88282789499579 - ], - [ - 10.776189, - 59.882927 - ], - [ - 10.776783, - 59.882649 - ], - [ - 10.778223, - 59.88239 - ], - [ - 10.779364, - 59.88221 - ], - [ - 10.78106, - 59.88226 - ], - [ - 10.78352, - 59.881761 - ], - [ - 10.784643, - 59.88144 - ], - [ - 10.78564, - 59.880914 - ], - [ - 10.786738, - 59.880499 - ], - [ - 10.78852, - 59.879795 - ], - [ - 10.788919, - 59.879665 - ], - [ - 10.789433, - 59.879383 - ], - [ - 10.790716, - 59.879292 - ], - [ - 10.792192, - 59.879244 - ], - [ - 10.799489, - 59.879952 - ], - [ - 10.80197, - 59.879402 - ], - [ - 10.806901, - 59.87959 - ], - [ - 10.810856, - 59.880185 - ], - [ - 10.805831, - 59.887359 - ], - [ - 10.801735, - 59.892648 - ], - [ - 10.803608, - 59.894296 - ], - [ - 10.804989, - 59.894104 - ], - [ - 10.805318, - 59.893477 - ], - [ - 10.80519, - 59.892795 - ], - [ - 10.805487, - 59.89217 - ], - [ - 10.805705, - 59.891759 - ], - [ - 10.806059, - 59.891418 - ], - [ - 10.80841, - 59.888222 - ], - [ - 10.815093, - 59.887873 - ], - [ - 10.821355, - 59.890048 - ], - [ - 10.822055, - 59.891379 - ], - [ - 10.821592, - 59.894541 - ], - [ - 10.820849, - 59.897019 - ], - [ - 10.82081, - 59.898294 - ], - [ - 10.820285, - 59.899129 - ], - [ - 10.820063, - 59.900453 - ], - [ - 10.819054, - 59.90147 - ], - [ - 10.821037, - 59.903571 - ], - [ - 10.821163, - 59.903519 - ], - [ - 10.822416, - 59.903528 - ], - [ - 10.822439, - 59.903451 - ], - [ - 10.823081, - 59.903455 - ], - [ - 10.823077, - 59.903521 - ], - [ - 10.822077, - 59.904421 - ], - [ - 10.822345, - 59.904619 - ], - [ - 10.82239, - 59.904733 - ], - [ - 10.821725, - 59.905312 - ], - [ - 10.820101, - 59.907008 - ], - [ - 10.820445, - 59.908342 - ], - [ - 10.818684, - 59.911458 - ], - [ - 10.818111, - 59.912228 - ], - [ - 10.823407, - 59.912687 - ], - [ - 10.824883, - 59.913119 - ], - [ - 10.822054, - 59.914982 - ], - [ - 10.820256, - 59.916701 - ], - [ - 10.818784, - 59.917621 - ], - [ - 10.818894, - 59.917652 - ], - [ - 10.818823, - 59.917706 - ], - [ - 10.8184, - 59.917827 - ], - [ - 10.818414, - 59.917968 - ], - [ - 10.818182, - 59.918099 - ], - [ - 10.818195, - 59.918179 - ], - [ - 10.818002, - 59.918324 - ], - [ - 10.818065, - 59.918537 - ], - [ - 10.817746, - 59.918747 - ], - [ - 10.817771853184778, - 59.919060015777795 - ], - [ - 10.817641535436191, - 59.919334313241 - ], - [ - 10.817253369762122, - 59.92016471317217 - ], - [ - 10.817067537520016, - 59.921261284050956 - ], - [ - 10.817737023934322, - 59.922733200931205 - ], - [ - 10.814197529700122, - 59.92460810083015 - ], - [ - 10.810978161382877, - 59.9264397852684 - ], - [ - 10.812405069001775, - 59.92660364907742 - ], - [ - 10.813117506743577, - 59.92712347193087 - ], - [ - 10.813882519011425, - 59.92802623695317 - ], - [ - 10.81558560488797, - 59.92881325879451 - ], - [ - 10.819868304249026, - 59.930211473383615 - ], - [ - 10.824304829920784, - 59.9316174994396 - ], - [ - 10.83025248260097, - 59.93448904912082 - ], - [ - 10.832611785455912, - 59.936347545299554 - ], - [ - 10.829367317734333, - 59.93953928328541 - ], - [ - 10.819790907558911, - 59.940711418196614 - ], - [ - 10.81881548029232, - 59.941866346895225 - ], - [ - 10.81031703932274, - 59.943246252399135 - ], - [ - 10.802510433894849, - 59.94232820122942 - ], - [ - 10.800143, - 59.94264 - ], - [ - 10.797091, - 59.943181 - ], - [ - 10.794973, - 59.947701 - ], - [ - 10.792395, - 59.948248 - ], - [ - 10.794348, - 59.950349 - ], - [ - 10.795747, - 59.9514 - ], - [ - 10.797669, - 59.952565 - ], - [ - 10.79768, - 59.953333 - ], - [ - 10.793784, - 59.95392 - ], - [ - 10.79339, - 59.956074 - ], - [ - 10.797104, - 59.956691 - ], - [ - 10.795132, - 59.959956 - ], - [ - 10.794082, - 59.960799 - ], - [ - 10.793441, - 59.960794 - ], - [ - 10.791472, - 59.960936 - ], - [ - 10.788484, - 59.960297 - ], - [ - 10.786342, - 59.960273 - ], - [ - 10.784512, - 59.96229 - ], - [ - 10.784255, - 59.96301 - ], - [ - 10.785606, - 59.964267 - ], - [ - 10.785628, - 59.965209 - ], - [ - 10.783802, - 59.966468 - ], - [ - 10.781205, - 59.965769 - ], - [ - 10.780721, - 59.966028 - ], - [ - 10.780177, - 59.966117 - ], - [ - 10.77965, - 59.966055 - ], - [ - 10.778763, - 59.965858 - ], - [ - 10.778379, - 59.965797 - ], - [ - 10.777944, - 59.965853 - ], - [ - 10.777004, - 59.966234 - ], - [ - 10.769503, - 59.967927 - ], - [ - 10.766244, - 59.967631 - ], - [ - 10.765191, - 59.965302 - ], - [ - 10.76122, - 59.965685 - ], - [ - 10.754526, - 59.965425 - ], - [ - 10.751988, - 59.9647 - ], - [ - 10.750515, - 59.964404 - ], - [ - 10.748898, - 59.964421 - ], - [ - 10.746719, - 59.964153 - ], - [ - 10.744433, - 59.963341 - ], - [ - 10.739722, - 59.963308 - ], - [ - 10.737243, - 59.963478 - ], - [ - 10.73483, - 59.963531 - ], - [ - 10.734494, - 59.967231 - ], - [ - 10.73258, - 59.968011 - ], - [ - 10.73374, - 59.964376 - ], - [ - 10.733217, - 59.962427 - ], - [ - 10.734604, - 59.961139 - ], - [ - 10.732683, - 59.959511 - ], - [ - 10.732454, - 59.957576 - ], - [ - 10.732339, - 59.956654 - ], - [ - 10.731767, - 59.955778 - ], - [ - 10.729022, - 59.9544 - ], - [ - 10.727162, - 59.953346 - ], - [ - 10.727, - 59.952709 - ], - [ - 10.726269, - 59.951945 - ], - [ - 10.724372, - 59.949613 - ], - [ - 10.722744, - 59.948744 - ], - [ - 10.720964, - 59.947867 - ], - [ - 10.719147, - 59.947458 - ], - [ - 10.716952, - 59.947768 - ], - [ - 10.717625, - 59.950161 - ], - [ - 10.716953304599347, - 59.95123857393473 - ], - [ - 10.716361743887454, - 59.951196807911636 - ], - [ - 10.714308, - 59.950961 - ], - [ - 10.7123, - 59.950721 - ], - [ - 10.711077, - 59.950103 - ], - [ - 10.710495, - 59.950611 - ], - [ - 10.70858, - 59.950256 - ], - [ - 10.706861, - 59.949741 - ], - [ - 10.708201, - 59.952176 - ], - [ - 10.708676, - 59.954882 - ], - [ - 10.708067, - 59.95738 - ], - [ - 10.7072, - 59.958238 - ], - [ - 10.705126, - 59.958376 - ], - [ - 10.703478, - 59.958013 - ], - [ - 10.700792, - 59.957345 - ], - [ - 10.697309, - 59.957191 - ], - [ - 10.695678, - 59.955528 - ], - [ - 10.694974, - 59.954029 - ], - [ - 10.694844, - 59.953168 - ], - [ - 10.693603, - 59.952752 - ], - [ - 10.692661, - 59.953666 - ], - [ - 10.691528, - 59.95491 - ], - [ - 10.690429, - 59.956215 - ], - [ - 10.690447, - 59.959074 - ], - [ - 10.689576, - 59.959484 - ], - [ - 10.685242, - 59.959649 - ], - [ - 10.680987, - 59.959724 - ], - [ - 10.678302, - 59.959411 - ], - [ - 10.676037, - 59.958745 - ], - [ - 10.674125216549873, - 59.957909368938346 - ], - [ - 10.67322992850205, - 59.95743845698356 - ], - [ - 10.672213433099746, - 59.957073737876684 - ], - [ - 10.666666, - 59.956539 - ], - [ - 10.664284, - 59.956772 - ], - [ - 10.662673, - 59.956543 - ], - [ - 10.65942, - 59.955745 - ], - [ - 10.658216, - 59.955569 - ], - [ - 10.654555, - 59.956926 - ], - [ - 10.65292, - 59.957484 - ], - [ - 10.651637, - 59.958384 - ], - [ - 10.651486, - 59.959286 - ], - [ - 10.650796, - 59.95996 - ], - [ - 10.647778, - 59.961542 - ], - [ - 10.64712, - 59.962482 - ], - [ - 10.646076, - 59.9629 - ], - [ - 10.640822, - 59.96219 - ], - [ - 10.639926, - 59.961995 - ], - [ - 10.630801, - 59.961333 - ], - [ - 10.632761, - 59.954949 - ], - [ - 10.634492, - 59.952681 - ], - [ - 10.634186, - 59.952483 - ], - [ - 10.633764, - 59.952135 - ], - [ - 10.634263, - 59.951901 - ], - [ - 10.634572, - 59.951578 - ], - [ - 10.63479, - 59.95062 - ], - [ - 10.635518, - 59.949692 - ], - [ - 10.635869, - 59.947503 - ], - [ - 10.635935, - 59.946419 - ], - [ - 10.636382, - 59.945364 - ], - [ - 10.635548, - 59.944527 - ], - [ - 10.634821, - 59.94371 - ], - [ - 10.633683, - 59.943055 - ], - [ - 10.633628, - 59.942171 - ], - [ - 10.633083, - 59.941489 - ], - [ - 10.63261, - 59.940036 - ], - [ - 10.632291, - 59.938903 - ], - [ - 10.633838, - 59.937789 - ], - [ - 10.634985, - 59.936781 - ], - [ - 10.635825, - 59.935926 - ], - [ - 10.634147, - 59.933758 - ], - [ - 10.633299, - 59.93226 - ], - [ - 10.631951, - 59.931097 - ], - [ - 10.629841, - 59.93033 - ], - [ - 10.627535, - 59.929842 - ], - [ - 10.627202, - 59.929558 - ], - [ - 10.62783, - 59.928948 - ], - [ - 10.62824, - 59.928668 - ], - [ - 10.627808, - 59.927866 - ], - [ - 10.62595, - 59.927039 - ], - [ - 10.625788, - 59.926851 - ], - [ - 10.626434, - 59.926353 - ], - [ - 10.62701, - 59.926144 - ], - [ - 10.627806, - 59.925847 - ], - [ - 10.628272, - 59.925301 - ], - [ - 10.627081, - 59.92463 - ], - [ - 10.626299, - 59.924299 - ], - [ - 10.625889, - 59.923806 - ], - [ - 10.625752, - 59.923353 - ], - [ - 10.625976, - 59.922638 - ], - [ - 10.627122, - 59.922431 - ], - [ - 10.627907, - 59.922338 - ], - [ - 10.628355, - 59.922162 - ], - [ - 10.628967, - 59.922014 - ], - [ - 10.629751, - 59.921695 - ], - [ - 10.630176, - 59.921335 - ], - [ - 10.629969, - 59.920491 - ], - [ - 10.63008, - 59.920209 - ], - [ - 10.630297, - 59.91959 - ], - [ - 10.63057, - 59.919256 - ], - [ - 10.630619, - 59.918453 - ], - [ - 10.631062, - 59.918122 - ], - [ - 10.631561, - 59.918051 - ], - [ - 10.632437, - 59.918529 - ], - [ - 10.632973, - 59.918476 - ], - [ - 10.633472, - 59.918293 - ], - [ - 10.634406, - 59.917735 - ], - [ - 10.634705, - 59.917042 - ], - [ - 10.634257, - 59.916489 - ], - [ - 10.633487, - 59.916275 - ], - [ - 10.63336, - 59.916172 - ], - [ - 10.63331, - 59.91598 - ], - [ - 10.633315, - 59.914699 - ], - [ - 10.634435, - 59.914175 - ], - [ - 10.635022, - 59.914218 - ], - [ - 10.635022, - 59.914623 - ], - [ - 10.635539, - 59.914922 - ], - [ - 10.63602, - 59.914995 - ], - [ - 10.636347, - 59.914927 - ], - [ - 10.638346, - 59.914527 - ], - [ - 10.640538, - 59.914083 - ], - [ - 10.64214, - 59.911986 - ], - [ - 10.64676, - 59.91294 - ], - [ - 10.649693, - 59.91406 - ], - [ - 10.649041, - 59.91244 - ], - [ - 10.65145, - 59.912597 - ], - [ - 10.652128, - 59.913311 - ], - [ - 10.654842, - 59.914189 - ], - [ - 10.656544, - 59.914563 - ], - [ - 10.65577, - 59.915611 - ], - [ - 10.655881, - 59.91591 - ], - [ - 10.657296, - 59.916305 - ], - [ - 10.660673, - 59.916977 - ], - [ - 10.66344, - 59.917713 - ], - [ - 10.664669, - 59.917915 - ], - [ - 10.666225, - 59.918045 - ], - [ - 10.667923, - 59.918365 - ], - [ - 10.671949, - 59.919449 - ], - [ - 10.672596, - 59.919468 - ], - [ - 10.67297, - 59.919106 - ], - [ - 10.67254, - 59.918542 - ], - [ - 10.67034, - 59.916935 - ], - [ - 10.667644, - 59.915772 - ], - [ - 10.666052, - 59.91499 - ], - [ - 10.66424, - 59.914329 - ], - [ - 10.662968, - 59.913975 - ], - [ - 10.662679, - 59.912894 - ], - [ - 10.662802, - 59.91271 - ], - [ - 10.662855, - 59.912525 - ], - [ - 10.662892, - 59.912248 - ], - [ - 10.663268, - 59.912123 - ], - [ - 10.663674, - 59.911903 - ], - [ - 10.663718, - 59.911682 - ], - [ - 10.666089, - 59.911342 - ], - [ - 10.666437, - 59.911073 - ], - [ - 10.666612, - 59.910603 - ], - [ - 10.667331, - 59.910313 - ], - [ - 10.666122, - 59.909331 - ], - [ - 10.665722, - 59.908822 - ], - [ - 10.664803, - 59.908294 - ], - [ - 10.663568, - 59.907353 - ], - [ - 10.664236, - 59.90647 - ], - [ - 10.664365, - 59.905735 - ], - [ - 10.664373, - 59.90399 - ], - [ - 10.664338, - 59.902448 - ], - [ - 10.666901, - 59.90081 - ], - [ - 10.668391, - 59.899236 - ], - [ - 10.668717, - 59.898815 - ], - [ - 10.669702, - 59.89854 - ], - [ - 10.670936, - 59.898469 - ], - [ - 10.671516, - 59.89844 - ], - [ - 10.672208, - 59.898521 - ], - [ - 10.672678, - 59.898752 - ], - [ - 10.673036, - 59.898886 - ], - [ - 10.672998, - 59.898393 - ], - [ - 10.673574, - 59.898072 - ], - [ - 10.674904, - 59.898919 - ], - [ - 10.675568, - 59.898951 - ], - [ - 10.676719, - 59.900216 - ], - [ - 10.677554, - 59.900122 - ], - [ - 10.678753, - 59.898899 - ], - [ - 10.677605, - 59.89743 - ], - [ - 10.677497, - 59.896483 - ], - [ - 10.682677, - 59.897315 - ], - [ - 10.684746, - 59.897508 - ], - [ - 10.685371, - 59.898127 - ], - [ - 10.685312, - 59.898734 - ], - [ - 10.688495, - 59.899716 - ], - [ - 10.694208, - 59.901146 - ], - [ - 10.698902, - 59.902867 - ], - [ - 10.697001, - 59.904053 - ], - [ - 10.692517, - 59.902632 - ], - [ - 10.691911, - 59.902705 - ], - [ - 10.687294, - 59.901715 - ], - [ - 10.686957, - 59.902824 - ], - [ - 10.687309, - 59.90323 - ], - [ - 10.689902, - 59.903918 - ], - [ - 10.693765, - 59.90566 - ], - [ - 10.694209, - 59.906718 - ], - [ - 10.696105, - 59.90734 - ], - [ - 10.695788, - 59.907558 - ], - [ - 10.694281, - 59.907216 - ], - [ - 10.693907, - 59.907558 - ], - [ - 10.693459, - 59.907877 - ], - [ - 10.693087, - 59.908858 - ], - [ - 10.690732, - 59.909233 - ], - [ - 10.691793, - 59.909689 - ], - [ - 10.692658, - 59.910216 - ], - [ - 10.692771, - 59.910641 - ], - [ - 10.693086, - 59.910997 - ], - [ - 10.693085, - 59.91143 - ], - [ - 10.69305, - 59.911802 - ], - [ - 10.692947, - 59.912254 - ], - [ - 10.692032, - 59.913482 - ], - [ - 10.68968, - 59.915085 - ], - [ - 10.687044, - 59.915443 - ], - [ - 10.687544, - 59.916644 - ], - [ - 10.687577, - 59.917346 - ] + [10.687577, 59.917346], + [10.689719, 59.91757], + [10.693149, 59.915496], + [10.693549, 59.915603], + [10.695344, 59.915406], + [10.696433, 59.9152], + [10.697358, 59.914945], + [10.703902, 59.910901], + [10.704973, 59.910023], + [10.706125, 59.910367], + [10.708318, 59.90981], + [10.709048, 59.90921], + [10.709194, 59.907373], + [10.709308, 59.906807], + [10.710676, 59.906546], + [10.712482, 59.906047], + [10.715777, 59.906964], + [10.717585, 59.907176], + [10.718362, 59.907068], + [10.720131, 59.906389], + [10.722097, 59.906165], + [10.724074, 59.907995], + [10.725487, 59.908637], + [10.726011, 59.908948], + [10.727579, 59.909715], + [10.729922, 59.910772], + [10.731534, 59.910969], + [10.734022, 59.910463], + [10.734379, 59.909063], + [10.734218, 59.907531], + [10.735753, 59.905218], + [10.738504, 59.903317], + [10.741168, 59.902322], + [10.743451, 59.902637], + [10.744563, 59.903929], + [10.74708, 59.906759], + [10.749004, 59.907773], + [10.751673, 59.907154], + [10.75142, 59.904713], + [10.752924, 59.904548], + [10.753226, 59.904059], + [10.753523, 59.903061], + [10.750778, 59.901725], + [10.752392, 59.900919], + [10.75685, 59.902768], + [10.757897, 59.902216], + [10.75732, 59.901444], + [10.756139, 59.900651], + [10.754918, 59.898621], + [10.754512, 59.897874], + [10.754745, 59.897098], + [10.755141, 59.896554], + [10.755718, 59.895909], + [10.755684, 59.895421], + [10.75486, 59.894861], + [10.75628, 59.894047], + [10.757165221094933, 59.89390175879156], + [10.759106447045964, 59.89147857906161], + [10.761746326879063, 59.88890934390498], + [10.764488740333803, 59.886756017380435], + [10.767790076895182, 59.884918153072604], + [10.768649096133226, 59.883717148821795], + [10.774173632442148, 59.883563457076114], + [10.774906116394662, 59.88327546158081], + [10.774591630458728, 59.88282789499579], + [10.776189, 59.882927], + [10.776783, 59.882649], + [10.778223, 59.88239], + [10.779364, 59.88221], + [10.78106, 59.88226], + [10.78352, 59.881761], + [10.784643, 59.88144], + [10.78564, 59.880914], + [10.786738, 59.880499], + [10.78852, 59.879795], + [10.788919, 59.879665], + [10.789433, 59.879383], + [10.790716, 59.879292], + [10.792192, 59.879244], + [10.799489, 59.879952], + [10.80197, 59.879402], + [10.806901, 59.87959], + [10.810856, 59.880185], + [10.805831, 59.887359], + [10.801735, 59.892648], + [10.803608, 59.894296], + [10.804989, 59.894104], + [10.805318, 59.893477], + [10.80519, 59.892795], + [10.805487, 59.89217], + [10.805705, 59.891759], + [10.806059, 59.891418], + [10.80841, 59.888222], + [10.815093, 59.887873], + [10.821355, 59.890048], + [10.822055, 59.891379], + [10.821592, 59.894541], + [10.820849, 59.897019], + [10.82081, 59.898294], + [10.820285, 59.899129], + [10.820063, 59.900453], + [10.819054, 59.90147], + [10.821037, 59.903571], + [10.821163, 59.903519], + [10.822416, 59.903528], + [10.822439, 59.903451], + [10.823081, 59.903455], + [10.823077, 59.903521], + [10.822077, 59.904421], + [10.822345, 59.904619], + [10.82239, 59.904733], + [10.821725, 59.905312], + [10.820101, 59.907008], + [10.820445, 59.908342], + [10.818684, 59.911458], + [10.818111, 59.912228], + [10.823407, 59.912687], + [10.824883, 59.913119], + [10.822054, 59.914982], + [10.820256, 59.916701], + [10.818784, 59.917621], + [10.818894, 59.917652], + [10.818823, 59.917706], + [10.8184, 59.917827], + [10.818414, 59.917968], + [10.818182, 59.918099], + [10.818195, 59.918179], + [10.818002, 59.918324], + [10.818065, 59.918537], + [10.817746, 59.918747], + [10.817771853184778, 59.919060015777795], + [10.817641535436191, 59.919334313241], + [10.817253369762122, 59.92016471317217], + [10.817067537520016, 59.921261284050956], + [10.817737023934322, 59.922733200931205], + [10.814197529700122, 59.92460810083015], + [10.810978161382877, 59.9264397852684], + [10.812405069001775, 59.92660364907742], + [10.813117506743577, 59.92712347193087], + [10.813882519011425, 59.92802623695317], + [10.81558560488797, 59.92881325879451], + [10.819868304249026, 59.930211473383615], + [10.824304829920784, 59.9316174994396], + [10.83025248260097, 59.93448904912082], + [10.832611785455912, 59.936347545299554], + [10.829367317734333, 59.93953928328541], + [10.819790907558911, 59.940711418196614], + [10.81881548029232, 59.941866346895225], + [10.81031703932274, 59.943246252399135], + [10.802510433894849, 59.94232820122942], + [10.800143, 59.94264], + [10.797091, 59.943181], + [10.794973, 59.947701], + [10.792395, 59.948248], + [10.794348, 59.950349], + [10.795747, 59.9514], + [10.797669, 59.952565], + [10.79768, 59.953333], + [10.793784, 59.95392], + [10.79339, 59.956074], + [10.797104, 59.956691], + [10.795132, 59.959956], + [10.794082, 59.960799], + [10.793441, 59.960794], + [10.791472, 59.960936], + [10.788484, 59.960297], + [10.786342, 59.960273], + [10.784512, 59.96229], + [10.784255, 59.96301], + [10.785606, 59.964267], + [10.785628, 59.965209], + [10.783802, 59.966468], + [10.781205, 59.965769], + [10.780721, 59.966028], + [10.780177, 59.966117], + [10.77965, 59.966055], + [10.778763, 59.965858], + [10.778379, 59.965797], + [10.777944, 59.965853], + [10.777004, 59.966234], + [10.769503, 59.967927], + [10.766244, 59.967631], + [10.765191, 59.965302], + [10.76122, 59.965685], + [10.754526, 59.965425], + [10.751988, 59.9647], + [10.750515, 59.964404], + [10.748898, 59.964421], + [10.746719, 59.964153], + [10.744433, 59.963341], + [10.739722, 59.963308], + [10.737243, 59.963478], + [10.73483, 59.963531], + [10.734494, 59.967231], + [10.73258, 59.968011], + [10.73374, 59.964376], + [10.733217, 59.962427], + [10.734604, 59.961139], + [10.732683, 59.959511], + [10.732454, 59.957576], + [10.732339, 59.956654], + [10.731767, 59.955778], + [10.729022, 59.9544], + [10.727162, 59.953346], + [10.727, 59.952709], + [10.726269, 59.951945], + [10.724372, 59.949613], + [10.722744, 59.948744], + [10.720964, 59.947867], + [10.719147, 59.947458], + [10.716952, 59.947768], + [10.717625, 59.950161], + [10.716953304599347, 59.95123857393473], + [10.716361743887454, 59.951196807911636], + [10.714308, 59.950961], + [10.7123, 59.950721], + [10.711077, 59.950103], + [10.710495, 59.950611], + [10.70858, 59.950256], + [10.706861, 59.949741], + [10.708201, 59.952176], + [10.708676, 59.954882], + [10.708067, 59.95738], + [10.7072, 59.958238], + [10.705126, 59.958376], + [10.703478, 59.958013], + [10.700792, 59.957345], + [10.697309, 59.957191], + [10.695678, 59.955528], + [10.694974, 59.954029], + [10.694844, 59.953168], + [10.693603, 59.952752], + [10.692661, 59.953666], + [10.691528, 59.95491], + [10.690429, 59.956215], + [10.690447, 59.959074], + [10.689576, 59.959484], + [10.685242, 59.959649], + [10.680987, 59.959724], + [10.678302, 59.959411], + [10.676037, 59.958745], + [10.674125216549873, 59.957909368938346], + [10.67322992850205, 59.95743845698356], + [10.672213433099746, 59.957073737876684], + [10.666666, 59.956539], + [10.664284, 59.956772], + [10.662673, 59.956543], + [10.65942, 59.955745], + [10.658216, 59.955569], + [10.654555, 59.956926], + [10.65292, 59.957484], + [10.651637, 59.958384], + [10.651486, 59.959286], + [10.650796, 59.95996], + [10.647778, 59.961542], + [10.64712, 59.962482], + [10.646076, 59.9629], + [10.640822, 59.96219], + [10.639926, 59.961995], + [10.630801, 59.961333], + [10.632761, 59.954949], + [10.634492, 59.952681], + [10.634186, 59.952483], + [10.633764, 59.952135], + [10.634263, 59.951901], + [10.634572, 59.951578], + [10.63479, 59.95062], + [10.635518, 59.949692], + [10.635869, 59.947503], + [10.635935, 59.946419], + [10.636382, 59.945364], + [10.635548, 59.944527], + [10.634821, 59.94371], + [10.633683, 59.943055], + [10.633628, 59.942171], + [10.633083, 59.941489], + [10.63261, 59.940036], + [10.632291, 59.938903], + [10.633838, 59.937789], + [10.634985, 59.936781], + [10.635825, 59.935926], + [10.634147, 59.933758], + [10.633299, 59.93226], + [10.631951, 59.931097], + [10.629841, 59.93033], + [10.627535, 59.929842], + [10.627202, 59.929558], + [10.62783, 59.928948], + [10.62824, 59.928668], + [10.627808, 59.927866], + [10.62595, 59.927039], + [10.625788, 59.926851], + [10.626434, 59.926353], + [10.62701, 59.926144], + [10.627806, 59.925847], + [10.628272, 59.925301], + [10.627081, 59.92463], + [10.626299, 59.924299], + [10.625889, 59.923806], + [10.625752, 59.923353], + [10.625976, 59.922638], + [10.627122, 59.922431], + [10.627907, 59.922338], + [10.628355, 59.922162], + [10.628967, 59.922014], + [10.629751, 59.921695], + [10.630176, 59.921335], + [10.629969, 59.920491], + [10.63008, 59.920209], + [10.630297, 59.91959], + [10.63057, 59.919256], + [10.630619, 59.918453], + [10.631062, 59.918122], + [10.631561, 59.918051], + [10.632437, 59.918529], + [10.632973, 59.918476], + [10.633472, 59.918293], + [10.634406, 59.917735], + [10.634705, 59.917042], + [10.634257, 59.916489], + [10.633487, 59.916275], + [10.63336, 59.916172], + [10.63331, 59.91598], + [10.633315, 59.914699], + [10.634435, 59.914175], + [10.635022, 59.914218], + [10.635022, 59.914623], + [10.635539, 59.914922], + [10.63602, 59.914995], + [10.636347, 59.914927], + [10.638346, 59.914527], + [10.640538, 59.914083], + [10.64214, 59.911986], + [10.64676, 59.91294], + [10.649693, 59.91406], + [10.649041, 59.91244], + [10.65145, 59.912597], + [10.652128, 59.913311], + [10.654842, 59.914189], + [10.656544, 59.914563], + [10.65577, 59.915611], + [10.655881, 59.91591], + [10.657296, 59.916305], + [10.660673, 59.916977], + [10.66344, 59.917713], + [10.664669, 59.917915], + [10.666225, 59.918045], + [10.667923, 59.918365], + [10.671949, 59.919449], + [10.672596, 59.919468], + [10.67297, 59.919106], + [10.67254, 59.918542], + [10.67034, 59.916935], + [10.667644, 59.915772], + [10.666052, 59.91499], + [10.66424, 59.914329], + [10.662968, 59.913975], + [10.662679, 59.912894], + [10.662802, 59.91271], + [10.662855, 59.912525], + [10.662892, 59.912248], + [10.663268, 59.912123], + [10.663674, 59.911903], + [10.663718, 59.911682], + [10.666089, 59.911342], + [10.666437, 59.911073], + [10.666612, 59.910603], + [10.667331, 59.910313], + [10.666122, 59.909331], + [10.665722, 59.908822], + [10.664803, 59.908294], + [10.663568, 59.907353], + [10.664236, 59.90647], + [10.664365, 59.905735], + [10.664373, 59.90399], + [10.664338, 59.902448], + [10.666901, 59.90081], + [10.668391, 59.899236], + [10.668717, 59.898815], + [10.669702, 59.89854], + [10.670936, 59.898469], + [10.671516, 59.89844], + [10.672208, 59.898521], + [10.672678, 59.898752], + [10.673036, 59.898886], + [10.672998, 59.898393], + [10.673574, 59.898072], + [10.674904, 59.898919], + [10.675568, 59.898951], + [10.676719, 59.900216], + [10.677554, 59.900122], + [10.678753, 59.898899], + [10.677605, 59.89743], + [10.677497, 59.896483], + [10.682677, 59.897315], + [10.684746, 59.897508], + [10.685371, 59.898127], + [10.685312, 59.898734], + [10.688495, 59.899716], + [10.694208, 59.901146], + [10.698902, 59.902867], + [10.697001, 59.904053], + [10.692517, 59.902632], + [10.691911, 59.902705], + [10.687294, 59.901715], + [10.686957, 59.902824], + [10.687309, 59.90323], + [10.689902, 59.903918], + [10.693765, 59.90566], + [10.694209, 59.906718], + [10.696105, 59.90734], + [10.695788, 59.907558], + [10.694281, 59.907216], + [10.693907, 59.907558], + [10.693459, 59.907877], + [10.693087, 59.908858], + [10.690732, 59.909233], + [10.691793, 59.909689], + [10.692658, 59.910216], + [10.692771, 59.910641], + [10.693086, 59.910997], + [10.693085, 59.91143], + [10.69305, 59.911802], + [10.692947, 59.912254], + [10.692032, 59.913482], + [10.68968, 59.915085], + [10.687044, 59.915443], + [10.687544, 59.916644], + [10.687577, 59.917346] ] ] ] @@ -1767,538 +480,139 @@ "coordinates": [ [ [ - [ - 10.708611, - 59.925037 - ], - [ - 10.710421, - 59.926146 - ], - [ - 10.711554, - 59.926854 - ], - [ - 10.708529, - 59.927892 - ], - [ - 10.707201, - 59.92841 - ], - [ - 10.706745, - 59.928559 - ], - [ - 10.706106, - 59.928492 - ], - [ - 10.706014, - 59.928846 - ], - [ - 10.706405, - 59.929097 - ], - [ - 10.70664, - 59.92958 - ], - [ - 10.706775, - 59.929681 - ], - [ - 10.706859, - 59.929941 - ], - [ - 10.707147, - 59.930235 - ], - [ - 10.70715, - 59.930376 - ], - [ - 10.70715, - 59.930477 - ], - [ - 10.706916, - 59.930666 - ], - [ - 10.706978, - 59.930341 - ], - [ - 10.706758, - 59.930177 - ], - [ - 10.706167, - 59.93003 - ], - [ - 10.705945, - 59.930157 - ], - [ - 10.704796, - 59.930488 - ], - [ - 10.703563, - 59.930424 - ], - [ - 10.701887, - 59.930109 - ], - [ - 10.701477, - 59.930108 - ], - [ - 10.701197, - 59.93012 - ], - [ - 10.700728, - 59.930271 - ], - [ - 10.700423, - 59.930114 - ], - [ - 10.699743, - 59.929839 - ], - [ - 10.698705, - 59.929562 - ], - [ - 10.697002, - 59.929257 - ], - [ - 10.695299, - 59.929069 - ], - [ - 10.693864, - 59.9301 - ], - [ - 10.693765, - 59.929788 - ], - [ - 10.69312, - 59.929715 - ], - [ - 10.692991, - 59.929577 - ], - [ - 10.692781, - 59.929426 - ], - [ - 10.692649, - 59.929149 - ], - [ - 10.690892, - 59.928511 - ], - [ - 10.689455, - 59.928667 - ], - [ - 10.689256, - 59.928503 - ], - [ - 10.688056, - 59.928913 - ], - [ - 10.688308, - 59.928455 - ], - [ - 10.688322, - 59.927437 - ], - [ - 10.6882, - 59.92726 - ], - [ - 10.687977, - 59.927132 - ], - [ - 10.686372, - 59.926403 - ], - [ - 10.685361, - 59.925709 - ], - [ - 10.685413, - 59.925398 - ], - [ - 10.686845, - 59.924708 - ], - [ - 10.687428, - 59.924598 - ], - [ - 10.68836, - 59.924319 - ], - [ - 10.689365, - 59.92514 - ], - [ - 10.690181, - 59.924913 - ], - [ - 10.691551, - 59.926037 - ], - [ - 10.691175, - 59.926257 - ], - [ - 10.691406, - 59.926521 - ], - [ - 10.691672, - 59.926558 - ], - [ - 10.691904, - 59.92651 - ], - [ - 10.691996, - 59.926328 - ], - [ - 10.692174, - 59.926046 - ], - [ - 10.692962, - 59.925435 - ], - [ - 10.695119, - 59.925454 - ], - [ - 10.695092, - 59.926223 - ], - [ - 10.696203, - 59.927011 - ], - [ - 10.697195, - 59.927393 - ], - [ - 10.697659, - 59.927373 - ], - [ - 10.697755, - 59.927388 - ], - [ - 10.697895, - 59.927363 - ], - [ - 10.697938, - 59.927109 - ], - [ - 10.697925, - 59.926836 - ], - [ - 10.698022, - 59.926771 - ], - [ - 10.698009, - 59.926638 - ], - [ - 10.698007, - 59.926075 - ], - [ - 10.697944, - 59.925487 - ], - [ - 10.698123, - 59.925005 - ], - [ - 10.698141, - 59.924788 - ], - [ - 10.697858, - 59.924587 - ], - [ - 10.697884, - 59.924382 - ], - [ - 10.69796, - 59.924008 - ], - [ - 10.697985, - 59.923959 - ], - [ - 10.697985, - 59.923924 - ], - [ - 10.697971, - 59.923892 - ], - [ - 10.698013, - 59.923875 - ], - [ - 10.698029, - 59.923859 - ], - [ - 10.698038, - 59.923818 - ], - [ - 10.69804, - 59.923801 - ], - [ - 10.698029, - 59.92378 - ], - [ - 10.698014, - 59.923748 - ], - [ - 10.697866, - 59.92372 - ], - [ - 10.69693, - 59.923741 - ], - [ - 10.695022, - 59.923042 - ], - [ - 10.693212, - 59.922751 - ], - [ - 10.69208, - 59.922151 - ], - [ - 10.690058, - 59.921156 - ], - [ - 10.691843, - 59.920241 - ], - [ - 10.69467, - 59.921056 - ], - [ - 10.695619, - 59.921537 - ], - [ - 10.696359, - 59.922142 - ], - [ - 10.697861, - 59.923276 - ], - [ - 10.69825, - 59.923495 - ], - [ - 10.698502, - 59.923519 - ], - [ - 10.6986, - 59.92353 - ], - [ - 10.698673, - 59.923527 - ], - [ - 10.698737, - 59.923521 - ], - [ - 10.698789, - 59.92351 - ], - [ - 10.698868, - 59.92348 - ], - [ - 10.699029, - 59.923386 - ], - [ - 10.699408, - 59.923512 - ], - [ - 10.699998, - 59.923536 - ], - [ - 10.700497, - 59.923551 - ], - [ - 10.700976, - 59.923514 - ], - [ - 10.701528, - 59.923438 - ], - [ - 10.702418, - 59.923253 - ], - [ - 10.703044, - 59.923132 - ], - [ - 10.703605, - 59.923008 - ], - [ - 10.704098, - 59.922928 - ], - [ - 10.704186, - 59.922934 - ], - [ - 10.704307, - 59.922921 - ], - [ - 10.704602, - 59.922899 - ], - [ - 10.70489, - 59.922898 - ], - [ - 10.705659, - 59.923388 - ], - [ - 10.706335, - 59.923788 - ], - [ - 10.706632, - 59.92394 - ], - [ - 10.707189, - 59.924234 - ], - [ - 10.70738, - 59.924331 - ], - [ - 10.707741, - 59.924549 - ], - [ - 10.707929, - 59.924627 - ], - [ - 10.708104, - 59.924722 - ], - [ - 10.708288, - 59.924831 - ], - [ - 10.708416, - 59.924911 - ], - [ - 10.708509, - 59.924953 - ], - [ - 10.70854, - 59.92499 - ], - [ - 10.708611, - 59.925037 - ] + [10.708611, 59.925037], + [10.710421, 59.926146], + [10.711554, 59.926854], + [10.708529, 59.927892], + [10.707201, 59.92841], + [10.706745, 59.928559], + [10.706106, 59.928492], + [10.706014, 59.928846], + [10.706405, 59.929097], + [10.70664, 59.92958], + [10.706775, 59.929681], + [10.706859, 59.929941], + [10.707147, 59.930235], + [10.70715, 59.930376], + [10.70715, 59.930477], + [10.706916, 59.930666], + [10.706978, 59.930341], + [10.706758, 59.930177], + [10.706167, 59.93003], + [10.705945, 59.930157], + [10.704796, 59.930488], + [10.703563, 59.930424], + [10.701887, 59.930109], + [10.701477, 59.930108], + [10.701197, 59.93012], + [10.700728, 59.930271], + [10.700423, 59.930114], + [10.699743, 59.929839], + [10.698705, 59.929562], + [10.697002, 59.929257], + [10.695299, 59.929069], + [10.693864, 59.9301], + [10.693765, 59.929788], + [10.69312, 59.929715], + [10.692991, 59.929577], + [10.692781, 59.929426], + [10.692649, 59.929149], + [10.690892, 59.928511], + [10.689455, 59.928667], + [10.689256, 59.928503], + [10.688056, 59.928913], + [10.688308, 59.928455], + [10.688322, 59.927437], + [10.6882, 59.92726], + [10.687977, 59.927132], + [10.686372, 59.926403], + [10.685361, 59.925709], + [10.685413, 59.925398], + [10.686845, 59.924708], + [10.687428, 59.924598], + [10.68836, 59.924319], + [10.689365, 59.92514], + [10.690181, 59.924913], + [10.691551, 59.926037], + [10.691175, 59.926257], + [10.691406, 59.926521], + [10.691672, 59.926558], + [10.691904, 59.92651], + [10.691996, 59.926328], + [10.692174, 59.926046], + [10.692962, 59.925435], + [10.695119, 59.925454], + [10.695092, 59.926223], + [10.696203, 59.927011], + [10.697195, 59.927393], + [10.697659, 59.927373], + [10.697755, 59.927388], + [10.697895, 59.927363], + [10.697938, 59.927109], + [10.697925, 59.926836], + [10.698022, 59.926771], + [10.698009, 59.926638], + [10.698007, 59.926075], + [10.697944, 59.925487], + [10.698123, 59.925005], + [10.698141, 59.924788], + [10.697858, 59.924587], + [10.697884, 59.924382], + [10.69796, 59.924008], + [10.697985, 59.923959], + [10.697985, 59.923924], + [10.697971, 59.923892], + [10.698013, 59.923875], + [10.698029, 59.923859], + [10.698038, 59.923818], + [10.69804, 59.923801], + [10.698029, 59.92378], + [10.698014, 59.923748], + [10.697866, 59.92372], + [10.69693, 59.923741], + [10.695022, 59.923042], + [10.693212, 59.922751], + [10.69208, 59.922151], + [10.690058, 59.921156], + [10.691843, 59.920241], + [10.69467, 59.921056], + [10.695619, 59.921537], + [10.696359, 59.922142], + [10.697861, 59.923276], + [10.69825, 59.923495], + [10.698502, 59.923519], + [10.6986, 59.92353], + [10.698673, 59.923527], + [10.698737, 59.923521], + [10.698789, 59.92351], + [10.698868, 59.92348], + [10.699029, 59.923386], + [10.699408, 59.923512], + [10.699998, 59.923536], + [10.700497, 59.923551], + [10.700976, 59.923514], + [10.701528, 59.923438], + [10.702418, 59.923253], + [10.703044, 59.923132], + [10.703605, 59.923008], + [10.704098, 59.922928], + [10.704186, 59.922934], + [10.704307, 59.922921], + [10.704602, 59.922899], + [10.70489, 59.922898], + [10.705659, 59.923388], + [10.706335, 59.923788], + [10.706632, 59.92394], + [10.707189, 59.924234], + [10.70738, 59.924331], + [10.707741, 59.924549], + [10.707929, 59.924627], + [10.708104, 59.924722], + [10.708288, 59.924831], + [10.708416, 59.924911], + [10.708509, 59.924953], + [10.70854, 59.92499], + [10.708611, 59.925037] ] ] ] @@ -2307,4 +621,4 @@ ] } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/gbfs/tieroslo/system_information.json b/application/src/test/resources/gbfs/tieroslo/system_information.json index e3227e3f8f0..b8d6e9eea50 100644 --- a/application/src/test/resources/gbfs/tieroslo/system_information.json +++ b/application/src/test/resources/gbfs/tieroslo/system_information.json @@ -19,4 +19,4 @@ } } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/netex/nordic/build-config.json b/application/src/test/resources/netex/nordic/build-config.json index 4a8351d1c8b..e7b24ca138b 100644 --- a/application/src/test/resources/netex/nordic/build-config.json +++ b/application/src/test/resources/netex/nordic/build-config.json @@ -1,11 +1,11 @@ { "transitServiceStart": "2017-12-21", - "transitServiceEnd": "2018-01-31", - "netexDefaults" : { - "moduleFilePattern" : "netex_.*\\.zip", - "sharedFilePattern" : "_stops.xml", - "sharedGroupFilePattern" : "_(\\w{3})_shared_data.xml", - "groupFilePattern" : "(\\w{3})_.*\\.xml", + "transitServiceEnd": "2018-01-31", + "netexDefaults": { + "moduleFilePattern": "netex_.*\\.zip", + "sharedFilePattern": "_stops.xml", + "sharedGroupFilePattern": "_(\\w{3})_shared_data.xml", + "groupFilePattern": "(\\w{3})_.*\\.xml", "feedId": "EN" } } diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/alerts.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/alerts.json index 1683a37dbe9..80d8d57fdda 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/alerts.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/alerts.json @@ -39,4 +39,4 @@ } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/feedinfo.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/feedinfo.json index 3cf3bd06d66..f5ed39d1af1 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/feedinfo.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/feedinfo.json @@ -1,18 +1,18 @@ { - "data" : { - "feeds" : [ + "data": { + "feeds": [ { - "agencies" : [ + "agencies": [ { - "name" : "speedtransit", - "url" : "www.otp-foo.bar" + "name": "speedtransit", + "url": "www.otp-foo.bar" } ], - "publisher" : { - "name" : "publisher", - "url" : "www.z.org" + "publisher": { + "name": "publisher", + "url": "www.z.org" } } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/nearest.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/nearest.json index b6b5b7ee674..c430fdb6a30 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/nearest.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/nearest.json @@ -1,31 +1,31 @@ { - "data" : { - "nearest" : { - "edges" : [ + "data": { + "nearest": { + "edges": [ { - "node" : { - "place" : { - "id" : "U3RvcDpGOkE", - "gtfsId" : "F:A", - "parentStation" : null + "node": { + "place": { + "id": "U3RvcDpGOkE", + "gtfsId": "F:A", + "parentStation": null } } }, { - "node" : { - "place" : { - "stationId" : "Network-1:FooStation" + "node": { + "place": { + "stationId": "Network-1:FooStation" } } }, { - "node" : { - "place" : { - "vehicleId" : "Network-1:free-floating-bicycle" + "node": { + "place": { + "vehicleId": "Network-1:free-floating-bicycle" } } } ] } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/node-alert.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/node-alert.json index 8d4c96fb4a9..63c731a8945 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/node-alert.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/node-alert.json @@ -7,4 +7,4 @@ "alertUrl": null } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/patterns.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/patterns.json index 08bcc490e0f..73ee8b0495e 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/patterns.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/patterns.json @@ -1,95 +1,95 @@ { - "data" : { - "patterns" : [ + "data": { + "patterns": [ { - "code" : "F:BUS", - "headsign" : "Trip Headsign", - "trips" : [ + "code": "F:BUS", + "headsign": "Trip Headsign", + "trips": [ { - "gtfsId" : "F:123", - "stoptimes" : [ + "gtfsId": "F:123", + "stoptimes": [ { - "stop" : { - "gtfsId" : "F:Stop_0", - "name" : "Stop_0" + "stop": { + "gtfsId": "F:Stop_0", + "name": "Stop_0" }, - "headsign" : "Stop headsign at stop 10", - "scheduledArrival" : 39600, - "scheduledDeparture" : 39600, - "stopPosition" : 10, - "stopPositionInPattern" : 0, - "realtimeState" : "SCHEDULED", - "pickupType" : "SCHEDULED", - "dropoffType" : "SCHEDULED" + "headsign": "Stop headsign at stop 10", + "scheduledArrival": 39600, + "scheduledDeparture": 39600, + "stopPosition": 10, + "stopPositionInPattern": 0, + "realtimeState": "SCHEDULED", + "pickupType": "SCHEDULED", + "dropoffType": "SCHEDULED" }, { - "stop" : { - "gtfsId" : "F:Stop_1", - "name" : "Stop_1" + "stop": { + "gtfsId": "F:Stop_1", + "name": "Stop_1" }, - "headsign" : "Stop headsign at stop 20", - "scheduledArrival" : 39900, - "scheduledDeparture" : 39900, - "stopPosition" : 20, - "stopPositionInPattern" : 1, - "realtimeState" : "SCHEDULED", - "pickupType" : "SCHEDULED", - "dropoffType" : "SCHEDULED" + "headsign": "Stop headsign at stop 20", + "scheduledArrival": 39900, + "scheduledDeparture": 39900, + "stopPosition": 20, + "stopPositionInPattern": 1, + "realtimeState": "SCHEDULED", + "pickupType": "SCHEDULED", + "dropoffType": "SCHEDULED" }, { - "stop" : { - "gtfsId" : "F:Stop_2", - "name" : "Stop_2" + "stop": { + "gtfsId": "F:Stop_2", + "name": "Stop_2" }, - "headsign" : "Stop headsign at stop 30", - "scheduledArrival" : 40200, - "scheduledDeparture" : 40200, - "stopPosition" : 30, - "stopPositionInPattern" : 2, - "realtimeState" : "SCHEDULED", - "pickupType" : "SCHEDULED", - "dropoffType" : "SCHEDULED" + "headsign": "Stop headsign at stop 30", + "scheduledArrival": 40200, + "scheduledDeparture": 40200, + "stopPosition": 30, + "stopPositionInPattern": 2, + "realtimeState": "SCHEDULED", + "pickupType": "SCHEDULED", + "dropoffType": "SCHEDULED" } ], - "occupancy" : { - "occupancyStatus" : "FEW_SEATS_AVAILABLE" + "occupancy": { + "occupancyStatus": "FEW_SEATS_AVAILABLE" } } ], - "vehiclePositions" : [ + "vehiclePositions": [ { - "vehicleId" : "F:vehicle-1", - "label" : null, - "lat" : null, - "lon" : null, - "stopRelationship" : null, - "speed" : null, - "heading" : null, - "lastUpdated" : 31556889864403199, - "trip" : { - "gtfsId" : "F:123" + "vehicleId": "F:vehicle-1", + "label": null, + "lat": null, + "lon": null, + "stopRelationship": null, + "speed": null, + "heading": null, + "lastUpdated": 31556889864403199, + "trip": { + "gtfsId": "F:123" } }, { - "vehicleId" : "F:vehicle-2", - "label" : "vehicle2", - "lat" : 60.0, - "lon" : 80.0, - "stopRelationship" : { - "status" : "IN_TRANSIT_TO", - "stop" : { - "gtfsId" : "F:Stop_0" + "vehicleId": "F:vehicle-2", + "label": "vehicle2", + "lat": 60.0, + "lon": 80.0, + "stopRelationship": { + "status": "IN_TRANSIT_TO", + "stop": { + "gtfsId": "F:Stop_0" } }, - "speed" : 10.2, - "heading" : 80.0, - "lastUpdated" : -31557014167219200, - "trip" : { - "gtfsId" : "F:123" + "speed": 10.2, + "heading": 80.0, + "lastUpdated": -31557014167219200, + "trip": { + "gtfsId": "F:123" } } ] } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/plan.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/plan.json index 879c1503438..817754b79ca 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/plan.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/plan.json @@ -1,69 +1,69 @@ { - "data" : { - "plan" : { - "itineraries" : [ + "data": { + "plan": { + "itineraries": [ { - "start" : "2020-02-02T11:00:00Z", - "end" : "2020-02-02T12:00:00Z", - "legs" : [ + "start": "2020-02-02T11:00:00Z", + "end": "2020-02-02T12:00:00Z", + "legs": [ { - "mode" : "WALK", - "start" : { - "scheduledTime" : "2020-02-02T11:00:00Z" + "mode": "WALK", + "start": { + "scheduledTime": "2020-02-02T11:00:00Z" }, - "end" : { - "scheduledTime" : "2020-02-02T11:00:20Z" + "end": { + "scheduledTime": "2020-02-02T11:00:20Z" }, - "from" : { - "name" : "A" + "from": { + "name": "A" }, - "to" : { - "name" : "B" + "to": { + "name": "B" } }, { - "mode" : "BUS", - "start" : { - "scheduledTime" : "2020-02-02T10:51:00Z" + "mode": "BUS", + "start": { + "scheduledTime": "2020-02-02T10:51:00Z" }, - "end" : { - "scheduledTime" : "2020-02-02T11:05:00Z" + "end": { + "scheduledTime": "2020-02-02T11:05:00Z" }, - "from" : { - "name" : "B" + "from": { + "name": "B" }, - "to" : { - "name" : "C" + "to": { + "name": "C" } }, { - "mode" : "RAIL", - "start" : { - "scheduledTime" : "2020-02-02T11:20:00Z" + "mode": "RAIL", + "start": { + "scheduledTime": "2020-02-02T11:20:00Z" }, - "end" : { - "scheduledTime" : "2020-02-02T11:40:00Z" + "end": { + "scheduledTime": "2020-02-02T11:40:00Z" }, - "from" : { - "name" : "C" + "from": { + "name": "C" }, - "to" : { - "name" : "D" + "to": { + "name": "D" } }, { - "mode" : "CAR", - "start" : { - "scheduledTime" : "2020-02-02T11:50:00Z" + "mode": "CAR", + "start": { + "scheduledTime": "2020-02-02T11:50:00Z" }, - "end" : { - "scheduledTime" : "2020-02-02T12:00:00Z" + "end": { + "scheduledTime": "2020-02-02T12:00:00Z" }, - "from" : { - "name" : "D" + "from": { + "name": "D" }, - "to" : { - "name" : "E" + "to": { + "name": "E" } } ] @@ -71,4 +71,4 @@ ] } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-extended.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-extended.json index 07f613ebd7f..ab29f172b6f 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-extended.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-extended.json @@ -1,359 +1,359 @@ { - "data" : { - "planConnection" : { - "searchDateTime" : "2023-01-27T21:08:35+01:00", - "routingErrors" : [ ], - "pageInfo" : { - "hasNextPage" : false, - "hasPreviousPage" : false, - "startCursor" : null, - "endCursor" : null, - "searchWindowUsed" : null + "data": { + "planConnection": { + "searchDateTime": "2023-01-27T21:08:35+01:00", + "routingErrors": [], + "pageInfo": { + "hasNextPage": false, + "hasPreviousPage": false, + "startCursor": null, + "endCursor": null, + "searchWindowUsed": null }, - "edges" : [ + "edges": [ { - "cursor" : "NoCursor", - "node" : { - "start" : "2020-02-02T11:00:00Z", - "end" : "2020-02-02T12:00:00Z", - "startTime" : 1580641200000, - "endTime" : 1580644800000, - "generalizedCost" : 4072, - "accessibilityScore" : 0.5, - "emissionsPerPerson" : { - "co2" : 123.0 + "cursor": "NoCursor", + "node": { + "start": "2020-02-02T11:00:00Z", + "end": "2020-02-02T12:00:00Z", + "startTime": 1580641200000, + "endTime": 1580644800000, + "generalizedCost": 4072, + "accessibilityScore": 0.5, + "emissionsPerPerson": { + "co2": 123.0 }, - "numberOfTransfers" : 1, - "walkDistance" : 28.0, - "walkTime" : 20, - "legs" : [ + "numberOfTransfers": 1, + "walkDistance": 28.0, + "walkTime": 20, + "legs": [ { - "mode" : "WALK", - "start" : { - "scheduledTime" : "2020-02-02T11:00:00Z", - "estimated" : null + "mode": "WALK", + "start": { + "scheduledTime": "2020-02-02T11:00:00Z", + "estimated": null }, - "end" : { - "scheduledTime" : "2020-02-02T11:00:20Z", - "estimated" : null + "end": { + "scheduledTime": "2020-02-02T11:00:20Z", + "estimated": null }, - "from" : { - "name" : "A", - "lat" : 5.0, - "lon" : 8.0, - "arrival" : { - "scheduledTime" : "2020-02-02T11:00:00Z", - "estimated" : null + "from": { + "name": "A", + "lat": 5.0, + "lon": 8.0, + "arrival": { + "scheduledTime": "2020-02-02T11:00:00Z", + "estimated": null }, - "departure" : { - "scheduledTime" : "2020-02-02T11:00:00Z", - "estimated" : null + "departure": { + "scheduledTime": "2020-02-02T11:00:00Z", + "estimated": null }, - "departureTime" : 1580641200000, - "arrivalTime" : 1580641200000 + "departureTime": 1580641200000, + "arrivalTime": 1580641200000 }, - "to" : { - "name" : "B", - "lat" : 6.0, - "lon" : 8.5, - "arrival" : { - "scheduledTime" : "2020-02-02T11:00:20Z", - "estimated" : null + "to": { + "name": "B", + "lat": 6.0, + "lon": 8.5, + "arrival": { + "scheduledTime": "2020-02-02T11:00:20Z", + "estimated": null }, - "departure" : { - "scheduledTime" : "2020-02-02T11:00:20Z", - "estimated" : null + "departure": { + "scheduledTime": "2020-02-02T11:00:20Z", + "estimated": null }, - "departureTime" : 1580641220000, - "arrivalTime" : 1580641220000 + "departureTime": 1580641220000, + "arrivalTime": 1580641220000 }, - "startTime" : 1580641200000, - "endTime" : 1580641220000, - "generalizedCost" : 40, - "headsign" : null, - "trip" : null, - "intermediatePlaces" : null, - "alerts" : [ ], - "rideHailingEstimate" : null, - "accessibilityScore" : null, - "id" : null, - "realtimeState" : null + "startTime": 1580641200000, + "endTime": 1580641220000, + "generalizedCost": 40, + "headsign": null, + "trip": null, + "intermediatePlaces": null, + "alerts": [], + "rideHailingEstimate": null, + "accessibilityScore": null, + "id": null, + "realtimeState": null }, { - "mode" : "BUS", - "start" : { - "scheduledTime" : "2020-02-02T10:51:00Z", - "estimated" : { - "time" : "2020-02-02T11:01:00Z", - "delay" : "PT10M" + "mode": "BUS", + "start": { + "scheduledTime": "2020-02-02T10:51:00Z", + "estimated": { + "time": "2020-02-02T11:01:00Z", + "delay": "PT10M" } }, - "end" : { - "scheduledTime" : "2020-02-02T11:05:00Z", - "estimated" : { - "time" : "2020-02-02T11:15:00Z", - "delay" : "PT10M" + "end": { + "scheduledTime": "2020-02-02T11:05:00Z", + "estimated": { + "time": "2020-02-02T11:15:00Z", + "delay": "PT10M" } }, - "from" : { - "name" : "B", - "lat" : 6.0, - "lon" : 8.5, - "arrival" : { - "scheduledTime" : "2020-02-02T10:51:00Z", - "estimated" : { - "delay" : "PT10M", - "time" : "2020-02-02T11:01:00Z" + "from": { + "name": "B", + "lat": 6.0, + "lon": 8.5, + "arrival": { + "scheduledTime": "2020-02-02T10:51:00Z", + "estimated": { + "delay": "PT10M", + "time": "2020-02-02T11:01:00Z" } }, - "departure" : { - "scheduledTime" : "2020-02-02T10:51:00Z", - "estimated" : { - "delay" : "PT10M", - "time" : "2020-02-02T11:01:00Z" + "departure": { + "scheduledTime": "2020-02-02T10:51:00Z", + "estimated": { + "delay": "PT10M", + "time": "2020-02-02T11:01:00Z" } }, - "departureTime" : 1580641260000, - "arrivalTime" : 1580641260000 + "departureTime": 1580641260000, + "arrivalTime": 1580641260000 }, - "to" : { - "name" : "C", - "lat" : 7.0, - "lon" : 9.0, - "arrival" : { - "scheduledTime" : "2020-02-02T11:05:00Z", - "estimated" : { - "delay" : "PT10M", - "time" : "2020-02-02T11:15:00Z" + "to": { + "name": "C", + "lat": 7.0, + "lon": 9.0, + "arrival": { + "scheduledTime": "2020-02-02T11:05:00Z", + "estimated": { + "delay": "PT10M", + "time": "2020-02-02T11:15:00Z" } }, - "departure" : { - "scheduledTime" : "2020-02-02T11:05:00Z", - "estimated" : { - "delay" : "PT10M", - "time" : "2020-02-02T11:15:00Z" + "departure": { + "scheduledTime": "2020-02-02T11:05:00Z", + "estimated": { + "delay": "PT10M", + "time": "2020-02-02T11:15:00Z" } }, - "departureTime" : 1580642100000, - "arrivalTime" : 1580642100000 + "departureTime": 1580642100000, + "arrivalTime": 1580642100000 }, - "startTime" : 1580641260000, - "endTime" : 1580642100000, - "generalizedCost" : 992, - "headsign" : "Headsign at boarding (stop index 5)", - "trip" : { - "tripHeadsign" : "Trip headsign 122" + "startTime": 1580641260000, + "endTime": 1580642100000, + "generalizedCost": 992, + "headsign": "Headsign at boarding (stop index 5)", + "trip": { + "tripHeadsign": "Trip headsign 122" }, - "intermediatePlaces" : [ + "intermediatePlaces": [ { - "arrival" : { - "scheduledTime" : "2020-02-02T11:01:00Z", - "estimated" : { - "time" : "2020-02-02T11:11:00Z", - "delay" : "PT10M" + "arrival": { + "scheduledTime": "2020-02-02T11:01:00Z", + "estimated": { + "time": "2020-02-02T11:11:00Z", + "delay": "PT10M" } }, - "departure" : { - "scheduledTime" : "2020-02-02T11:01:00Z", - "estimated" : { - "time" : "2020-02-02T11:11:00Z", - "delay" : "PT10M" + "departure": { + "scheduledTime": "2020-02-02T11:01:00Z", + "estimated": { + "time": "2020-02-02T11:11:00Z", + "delay": "PT10M" } }, - "stop" : { - "name" : "B" + "stop": { + "name": "B" } } ], - "alerts" : [ ], - "rideHailingEstimate" : null, - "accessibilityScore" : null, - "id" : "rO0ABXdBABhTQ0hFRFVMRURfVFJBTlNJVF9MRUdfVjMABUY6MTIyAAoyMDIwLTAyLTAyAAAABQAAAAcAA0Y6QgADRjpDAAA=", - "realtimeState" : "UPDATED" + "alerts": [], + "rideHailingEstimate": null, + "accessibilityScore": null, + "id": "rO0ABXdBABhTQ0hFRFVMRURfVFJBTlNJVF9MRUdfVjMABUY6MTIyAAoyMDIwLTAyLTAyAAAABQAAAAcAA0Y6QgADRjpDAAA=", + "realtimeState": "UPDATED" }, { - "mode" : "RAIL", - "start" : { - "scheduledTime" : "2020-02-02T11:20:00Z", - "estimated" : { - "time" : "2020-02-02T11:30:00Z", - "delay" : "PT10M" + "mode": "RAIL", + "start": { + "scheduledTime": "2020-02-02T11:20:00Z", + "estimated": { + "time": "2020-02-02T11:30:00Z", + "delay": "PT10M" } }, - "end" : { - "scheduledTime" : "2020-02-02T11:40:00Z", - "estimated" : { - "time" : "2020-02-02T11:50:00Z", - "delay" : "PT10M" + "end": { + "scheduledTime": "2020-02-02T11:40:00Z", + "estimated": { + "time": "2020-02-02T11:50:00Z", + "delay": "PT10M" } }, - "from" : { - "name" : "C", - "lat" : 7.0, - "lon" : 9.0, - "arrival" : { - "scheduledTime" : "2020-02-02T11:20:00Z", - "estimated" : { - "delay" : "PT10M", - "time" : "2020-02-02T11:30:00Z" + "from": { + "name": "C", + "lat": 7.0, + "lon": 9.0, + "arrival": { + "scheduledTime": "2020-02-02T11:20:00Z", + "estimated": { + "delay": "PT10M", + "time": "2020-02-02T11:30:00Z" } }, - "departure" : { - "scheduledTime" : "2020-02-02T11:20:00Z", - "estimated" : { - "delay" : "PT10M", - "time" : "2020-02-02T11:30:00Z" + "departure": { + "scheduledTime": "2020-02-02T11:20:00Z", + "estimated": { + "delay": "PT10M", + "time": "2020-02-02T11:30:00Z" } }, - "departureTime" : 1580643000000, - "arrivalTime" : 1580643000000 + "departureTime": 1580643000000, + "arrivalTime": 1580643000000 }, - "to" : { - "name" : "D", - "lat" : 8.0, - "lon" : 9.5, - "arrival" : { - "scheduledTime" : "2020-02-02T11:40:00Z", - "estimated" : { - "delay" : "PT10M", - "time" : "2020-02-02T11:50:00Z" + "to": { + "name": "D", + "lat": 8.0, + "lon": 9.5, + "arrival": { + "scheduledTime": "2020-02-02T11:40:00Z", + "estimated": { + "delay": "PT10M", + "time": "2020-02-02T11:50:00Z" } }, - "departure" : { - "scheduledTime" : "2020-02-02T11:40:00Z", - "estimated" : { - "delay" : "PT10M", - "time" : "2020-02-02T11:50:00Z" + "departure": { + "scheduledTime": "2020-02-02T11:40:00Z", + "estimated": { + "delay": "PT10M", + "time": "2020-02-02T11:50:00Z" } }, - "departureTime" : 1580644200000, - "arrivalTime" : 1580644200000 + "departureTime": 1580644200000, + "arrivalTime": 1580644200000 }, - "startTime" : 1580643000000, - "endTime" : 1580644200000, - "generalizedCost" : 2040, - "headsign" : "Headsign at boarding (stop index 5)", - "trip" : { - "tripHeadsign" : "Trip headsign 439" + "startTime": 1580643000000, + "endTime": 1580644200000, + "generalizedCost": 2040, + "headsign": "Headsign at boarding (stop index 5)", + "trip": { + "tripHeadsign": "Trip headsign 439" }, - "intermediatePlaces" : [ + "intermediatePlaces": [ { - "arrival" : { - "scheduledTime" : "2020-02-02T11:30:00Z", - "estimated" : { - "time" : "2020-02-02T11:40:00Z", - "delay" : "PT10M" + "arrival": { + "scheduledTime": "2020-02-02T11:30:00Z", + "estimated": { + "time": "2020-02-02T11:40:00Z", + "delay": "PT10M" } }, - "departure" : { - "scheduledTime" : "2020-02-02T11:30:00Z", - "estimated" : { - "time" : "2020-02-02T11:40:00Z", - "delay" : "PT10M" + "departure": { + "scheduledTime": "2020-02-02T11:30:00Z", + "estimated": { + "time": "2020-02-02T11:40:00Z", + "delay": "PT10M" } }, - "stop" : { - "name" : "C" + "stop": { + "name": "C" } } ], - "alerts" : [ + "alerts": [ { - "id" : "QWxlcnQ6Rjphbi1hbGVydA", - "alertHeaderText" : "A header", - "alertDescriptionText" : "A description", - "alertEffect" : "REDUCED_SERVICE", - "alertCause" : "MAINTENANCE", - "alertSeverityLevel" : "SEVERE", - "alertUrl" : "https://example.com", - "effectiveStartDate" : 1676459008, - "effectiveEndDate" : 1676545408, - "entities" : [ + "id": "QWxlcnQ6Rjphbi1hbGVydA", + "alertHeaderText": "A header", + "alertDescriptionText": "A description", + "alertEffect": "REDUCED_SERVICE", + "alertCause": "MAINTENANCE", + "alertSeverityLevel": "SEVERE", + "alertUrl": "https://example.com", + "effectiveStartDate": 1676459008, + "effectiveEndDate": 1676545408, + "entities": [ { - "name" : "A", - "gtfsId" : "F:A", - "lat" : 5.0, - "lon" : 8.0 + "name": "A", + "gtfsId": "F:A", + "lat": 5.0, + "lon": 8.0 } ] } ], - "rideHailingEstimate" : null, - "accessibilityScore" : null, - "id" : "rO0ABXdBABhTQ0hFRFVMRURfVFJBTlNJVF9MRUdfVjMABUY6NDM5AAoyMDIwLTAyLTAyAAAABQAAAAcAA0Y6QwADRjpEAAA=", - "realtimeState" : "UPDATED" + "rideHailingEstimate": null, + "accessibilityScore": null, + "id": "rO0ABXdBABhTQ0hFRFVMRURfVFJBTlNJVF9MRUdfVjMABUY6NDM5AAoyMDIwLTAyLTAyAAAABQAAAAcAA0Y6QwADRjpEAAA=", + "realtimeState": "UPDATED" }, { - "mode" : "CAR", - "start" : { - "scheduledTime" : "2020-02-02T11:50:00Z", - "estimated" : null + "mode": "CAR", + "start": { + "scheduledTime": "2020-02-02T11:50:00Z", + "estimated": null }, - "end" : { - "scheduledTime" : "2020-02-02T12:00:00Z", - "estimated" : null + "end": { + "scheduledTime": "2020-02-02T12:00:00Z", + "estimated": null }, - "from" : { - "name" : "D", - "lat" : 8.0, - "lon" : 9.5, - "arrival" : { - "scheduledTime" : "2020-02-02T11:50:00Z", - "estimated" : null + "from": { + "name": "D", + "lat": 8.0, + "lon": 9.5, + "arrival": { + "scheduledTime": "2020-02-02T11:50:00Z", + "estimated": null }, - "departure" : { - "scheduledTime" : "2020-02-02T11:50:00Z", - "estimated" : null + "departure": { + "scheduledTime": "2020-02-02T11:50:00Z", + "estimated": null }, - "departureTime" : 1580644200000, - "arrivalTime" : 1580644200000 + "departureTime": 1580644200000, + "arrivalTime": 1580644200000 }, - "to" : { - "name" : "E", - "lat" : 9.0, - "lon" : 10.0, - "arrival" : { - "scheduledTime" : "2020-02-02T12:00:00Z", - "estimated" : null + "to": { + "name": "E", + "lat": 9.0, + "lon": 10.0, + "arrival": { + "scheduledTime": "2020-02-02T12:00:00Z", + "estimated": null }, - "departure" : { - "scheduledTime" : "2020-02-02T12:00:00Z", - "estimated" : null + "departure": { + "scheduledTime": "2020-02-02T12:00:00Z", + "estimated": null }, - "departureTime" : 1580644800000, - "arrivalTime" : 1580644800000 + "departureTime": 1580644800000, + "arrivalTime": 1580644800000 }, - "startTime" : 1580644200000, - "endTime" : 1580644800000, - "generalizedCost" : 1000, - "headsign" : null, - "trip" : null, - "intermediatePlaces" : null, - "alerts" : [ ], - "rideHailingEstimate" : { - "provider" : { - "id" : "uber" + "startTime": 1580644200000, + "endTime": 1580644800000, + "generalizedCost": 1000, + "headsign": null, + "trip": null, + "intermediatePlaces": null, + "alerts": [], + "rideHailingEstimate": { + "provider": { + "id": "uber" }, - "productName" : "UberX", - "minPrice" : { - "currency" : { - "code" : "EUR", - "digits" : 2 + "productName": "UberX", + "minPrice": { + "currency": { + "code": "EUR", + "digits": 2 }, - "amount" : 10.0 + "amount": 10.0 }, - "maxPrice" : { - "currency" : { - "code" : "EUR", - "digits" : 2 + "maxPrice": { + "currency": { + "code": "EUR", + "digits": 2 }, - "amount" : 20.0 + "amount": 20.0 }, - "arrival" : "PT10M" + "arrival": "PT10M" }, - "accessibilityScore" : null, - "id" : null, - "realtimeState" : null + "accessibilityScore": null, + "id": null, + "realtimeState": null } ] } @@ -361,4 +361,4 @@ ] } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-fares.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-fares.json index d56142820b5..748fc668e63 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-fares.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-fares.json @@ -1,163 +1,163 @@ { - "data" : { - "planConnection" : { - "edges" : [ + "data": { + "planConnection": { + "edges": [ { - "node" : { - "legs" : [ + "node": { + "legs": [ { - "mode" : "WALK", - "from" : { - "name" : "A", - "lat" : 5.0, - "lon" : 8.0 + "mode": "WALK", + "from": { + "name": "A", + "lat": 5.0, + "lon": 8.0 }, - "to" : { - "name" : "B", - "lat" : 6.0, - "lon" : 8.5 + "to": { + "name": "B", + "lat": 6.0, + "lon": 8.5 }, - "generalizedCost" : 40, - "fareProducts" : [ ] + "generalizedCost": 40, + "fareProducts": [] }, { - "mode" : "BUS", - "from" : { - "name" : "B", - "lat" : 6.0, - "lon" : 8.5 + "mode": "BUS", + "from": { + "name": "B", + "lat": 6.0, + "lon": 8.5 }, - "to" : { - "name" : "C", - "lat" : 7.0, - "lon" : 9.0 + "to": { + "name": "C", + "lat": 7.0, + "lon": 9.0 }, - "generalizedCost" : 992, - "fareProducts" : [ + "generalizedCost": 992, + "fareProducts": [ { - "id" : "5d8f889c-42cb-3bcc-89d5-480b995c78c8", - "product" : { - "id" : "F:day-pass", - "name" : "day-pass", - "__typename" : "DefaultFareProduct", - "price" : { - "currency" : { - "digits" : 2, - "code" : "EUR" + "id": "5d8f889c-42cb-3bcc-89d5-480b995c78c8", + "product": { + "id": "F:day-pass", + "name": "day-pass", + "__typename": "DefaultFareProduct", + "price": { + "currency": { + "digits": 2, + "code": "EUR" }, - "amount" : 10.0 + "amount": 10.0 }, - "riderCategory" : { - "id" : "F:senior-citizens", - "name" : "Senior citizens" + "riderCategory": { + "id": "F:senior-citizens", + "name": "Senior citizens" }, - "medium" : { - "id" : "F:oyster", - "name" : "TfL Oyster Card" + "medium": { + "id": "F:oyster", + "name": "TfL Oyster Card" } } }, { - "id" : "09bb5f2b-6af9-3355-8b5d-5e93a27ce280", - "product" : { - "id" : "F:single-ticket", - "name" : "single-ticket", - "__typename" : "DefaultFareProduct", - "price" : { - "currency" : { - "digits" : 2, - "code" : "EUR" + "id": "09bb5f2b-6af9-3355-8b5d-5e93a27ce280", + "product": { + "id": "F:single-ticket", + "name": "single-ticket", + "__typename": "DefaultFareProduct", + "price": { + "currency": { + "digits": 2, + "code": "EUR" }, - "amount" : 10.0 + "amount": 10.0 }, - "riderCategory" : { - "id" : "F:senior-citizens", - "name" : "Senior citizens" + "riderCategory": { + "id": "F:senior-citizens", + "name": "Senior citizens" }, - "medium" : { - "id" : "F:oyster", - "name" : "TfL Oyster Card" + "medium": { + "id": "F:oyster", + "name": "TfL Oyster Card" } } } ] }, { - "mode" : "RAIL", - "from" : { - "name" : "C", - "lat" : 7.0, - "lon" : 9.0 + "mode": "RAIL", + "from": { + "name": "C", + "lat": 7.0, + "lon": 9.0 }, - "to" : { - "name" : "D", - "lat" : 8.0, - "lon" : 9.5 + "to": { + "name": "D", + "lat": 8.0, + "lon": 9.5 }, - "generalizedCost" : 2040, - "fareProducts" : [ + "generalizedCost": 2040, + "fareProducts": [ { - "id" : "5d8f889c-42cb-3bcc-89d5-480b995c78c8", - "product" : { - "id" : "F:day-pass", - "name" : "day-pass", - "__typename" : "DefaultFareProduct", - "price" : { - "currency" : { - "digits" : 2, - "code" : "EUR" + "id": "5d8f889c-42cb-3bcc-89d5-480b995c78c8", + "product": { + "id": "F:day-pass", + "name": "day-pass", + "__typename": "DefaultFareProduct", + "price": { + "currency": { + "digits": 2, + "code": "EUR" }, - "amount" : 10.0 + "amount": 10.0 }, - "riderCategory" : { - "id" : "F:senior-citizens", - "name" : "Senior citizens" + "riderCategory": { + "id": "F:senior-citizens", + "name": "Senior citizens" }, - "medium" : { - "id" : "F:oyster", - "name" : "TfL Oyster Card" + "medium": { + "id": "F:oyster", + "name": "TfL Oyster Card" } } }, { - "id" : "46190ddd-93b0-3136-adb7-a18394f8b0ef", - "product" : { - "id" : "F:single-ticket", - "name" : "single-ticket", - "__typename" : "DefaultFareProduct", - "price" : { - "currency" : { - "digits" : 2, - "code" : "EUR" + "id": "46190ddd-93b0-3136-adb7-a18394f8b0ef", + "product": { + "id": "F:single-ticket", + "name": "single-ticket", + "__typename": "DefaultFareProduct", + "price": { + "currency": { + "digits": 2, + "code": "EUR" }, - "amount" : 10.0 + "amount": 10.0 }, - "riderCategory" : { - "id" : "F:senior-citizens", - "name" : "Senior citizens" + "riderCategory": { + "id": "F:senior-citizens", + "name": "Senior citizens" }, - "medium" : { - "id" : "F:oyster", - "name" : "TfL Oyster Card" + "medium": { + "id": "F:oyster", + "name": "TfL Oyster Card" } } } ] }, { - "mode" : "CAR", - "from" : { - "name" : "D", - "lat" : 8.0, - "lon" : 9.5 + "mode": "CAR", + "from": { + "name": "D", + "lat": 8.0, + "lon": 9.5 }, - "to" : { - "name" : "E", - "lat" : 9.0, - "lon" : 10.0 + "to": { + "name": "E", + "lat": 9.0, + "lon": 10.0 }, - "generalizedCost" : 1000, - "fareProducts" : [ ] + "generalizedCost": 1000, + "fareProducts": [] } ] } @@ -165,4 +165,4 @@ ] } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-stop-positions.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-stop-positions.json index dbf73734975..f197dcefe1c 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-stop-positions.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-stop-positions.json @@ -1,89 +1,89 @@ { - "data" : { - "planConnection" : { - "edges" : [ + "data": { + "planConnection": { + "edges": [ { - "node" : { - "start" : "2020-02-02T11:00:00Z", - "end" : "2020-02-02T12:00:00Z", - "generalizedCost" : 4072, - "accessibilityScore" : 0.5, - "legs" : [ + "node": { + "start": "2020-02-02T11:00:00Z", + "end": "2020-02-02T12:00:00Z", + "generalizedCost": 4072, + "accessibilityScore": 0.5, + "legs": [ { - "mode" : "WALK", - "from" : { - "name" : "A", - "lat" : 5.0, - "lon" : 8.0, - "stopPosition" : null + "mode": "WALK", + "from": { + "name": "A", + "lat": 5.0, + "lon": 8.0, + "stopPosition": null }, - "to" : { - "name" : "B", - "lat" : 6.0, - "lon" : 8.5, - "stopPosition" : null + "to": { + "name": "B", + "lat": 6.0, + "lon": 8.5, + "stopPosition": null }, - "generalizedCost" : 40 + "generalizedCost": 40 }, { - "mode" : "BUS", - "from" : { - "name" : "B", - "lat" : 6.0, - "lon" : 8.5, - "stopPosition" : { - "__typename" : "PositionAtStop", - "position" : 0 + "mode": "BUS", + "from": { + "name": "B", + "lat": 6.0, + "lon": 8.5, + "stopPosition": { + "__typename": "PositionAtStop", + "position": 0 } }, - "to" : { - "name" : "C", - "lat" : 7.0, - "lon" : 9.0, - "stopPosition" : { - "__typename" : "PositionAtStop", - "position" : 0 + "to": { + "name": "C", + "lat": 7.0, + "lon": 9.0, + "stopPosition": { + "__typename": "PositionAtStop", + "position": 0 } }, - "generalizedCost" : 992 + "generalizedCost": 992 }, { - "mode" : "RAIL", - "from" : { - "name" : "C", - "lat" : 7.0, - "lon" : 9.0, - "stopPosition" : { - "__typename" : "PositionAtStop", - "position" : 0 + "mode": "RAIL", + "from": { + "name": "C", + "lat": 7.0, + "lon": 9.0, + "stopPosition": { + "__typename": "PositionAtStop", + "position": 0 } }, - "to" : { - "name" : "D", - "lat" : 8.0, - "lon" : 9.5, - "stopPosition" : { - "__typename" : "PositionAtStop", - "position" : 0 + "to": { + "name": "D", + "lat": 8.0, + "lon": 9.5, + "stopPosition": { + "__typename": "PositionAtStop", + "position": 0 } }, - "generalizedCost" : 2040 + "generalizedCost": 2040 }, { - "mode" : "CAR", - "from" : { - "name" : "D", - "lat" : 8.0, - "lon" : 9.5, - "stopPosition" : null + "mode": "CAR", + "from": { + "name": "D", + "lat": 8.0, + "lon": 9.5, + "stopPosition": null }, - "to" : { - "name" : "E", - "lat" : 9.0, - "lon" : 10.0, - "stopPosition" : null + "to": { + "name": "E", + "lat": 9.0, + "lon": 10.0, + "stopPosition": null }, - "generalizedCost" : 1000 + "generalizedCost": 1000 } ] } @@ -91,4 +91,4 @@ ] } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-tutorial.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-tutorial.json index eff2b223eff..caafc57375d 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-tutorial.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/planConnection-tutorial.json @@ -1,127 +1,127 @@ { - "data" : { - "planConnection" : { - "edges" : [ + "data": { + "planConnection": { + "edges": [ { - "node" : { - "start" : "2020-02-02T11:00:00Z", - "end" : "2020-02-02T12:00:00Z", - "legs" : [ + "node": { + "start": "2020-02-02T11:00:00Z", + "end": "2020-02-02T12:00:00Z", + "legs": [ { - "mode" : "WALK", - "from" : { - "name" : "A", - "lat" : 5.0, - "lon" : 8.0, - "departure" : { - "scheduledTime" : "2020-02-02T11:00:00Z", - "estimated" : null + "mode": "WALK", + "from": { + "name": "A", + "lat": 5.0, + "lon": 8.0, + "departure": { + "scheduledTime": "2020-02-02T11:00:00Z", + "estimated": null } }, - "to" : { - "name" : "B", - "lat" : 6.0, - "lon" : 8.5, - "arrival" : { - "scheduledTime" : "2020-02-02T11:00:20Z", - "estimated" : null + "to": { + "name": "B", + "lat": 6.0, + "lon": 8.5, + "arrival": { + "scheduledTime": "2020-02-02T11:00:20Z", + "estimated": null } }, - "route" : null, - "legGeometry" : null + "route": null, + "legGeometry": null }, { - "mode" : "BUS", - "from" : { - "name" : "B", - "lat" : 6.0, - "lon" : 8.5, - "departure" : { - "scheduledTime" : "2020-02-02T10:51:00Z", - "estimated" : { - "time" : "2020-02-02T11:01:00Z", - "delay" : "PT10M" + "mode": "BUS", + "from": { + "name": "B", + "lat": 6.0, + "lon": 8.5, + "departure": { + "scheduledTime": "2020-02-02T10:51:00Z", + "estimated": { + "time": "2020-02-02T11:01:00Z", + "delay": "PT10M" } } }, - "to" : { - "name" : "C", - "lat" : 7.0, - "lon" : 9.0, - "arrival" : { - "scheduledTime" : "2020-02-02T11:05:00Z", - "estimated" : { - "time" : "2020-02-02T11:15:00Z", - "delay" : "PT10M" + "to": { + "name": "C", + "lat": 7.0, + "lon": 9.0, + "arrival": { + "scheduledTime": "2020-02-02T11:05:00Z", + "estimated": { + "time": "2020-02-02T11:15:00Z", + "delay": "PT10M" } } }, - "route" : { - "gtfsId" : "F:BUS", - "longName" : "Long name for BUS", - "shortName" : "RBUS" + "route": { + "gtfsId": "F:BUS", + "longName": "Long name for BUS", + "shortName": "RBUS" }, - "legGeometry" : { - "points" : "_{rc@_d{r@????_ibE_t`B" + "legGeometry": { + "points": "_{rc@_d{r@????_ibE_t`B" } }, { - "mode" : "RAIL", - "from" : { - "name" : "C", - "lat" : 7.0, - "lon" : 9.0, - "departure" : { - "scheduledTime" : "2020-02-02T11:20:00Z", - "estimated" : { - "time" : "2020-02-02T11:30:00Z", - "delay" : "PT10M" + "mode": "RAIL", + "from": { + "name": "C", + "lat": 7.0, + "lon": 9.0, + "departure": { + "scheduledTime": "2020-02-02T11:20:00Z", + "estimated": { + "time": "2020-02-02T11:30:00Z", + "delay": "PT10M" } } }, - "to" : { - "name" : "D", - "lat" : 8.0, - "lon" : 9.5, - "arrival" : { - "scheduledTime" : "2020-02-02T11:40:00Z", - "estimated" : { - "time" : "2020-02-02T11:50:00Z", - "delay" : "PT10M" + "to": { + "name": "D", + "lat": 8.0, + "lon": 9.5, + "arrival": { + "scheduledTime": "2020-02-02T11:40:00Z", + "estimated": { + "time": "2020-02-02T11:50:00Z", + "delay": "PT10M" } } }, - "route" : { - "gtfsId" : "F:2", - "longName" : null, - "shortName" : "R2" + "route": { + "gtfsId": "F:2", + "longName": null, + "shortName": "R2" }, - "legGeometry" : { - "points" : "_evi@_y|u@????_ibE_t`B" + "legGeometry": { + "points": "_evi@_y|u@????_ibE_t`B" } }, { - "mode" : "CAR", - "from" : { - "name" : "D", - "lat" : 8.0, - "lon" : 9.5, - "departure" : { - "scheduledTime" : "2020-02-02T11:50:00Z", - "estimated" : null + "mode": "CAR", + "from": { + "name": "D", + "lat": 8.0, + "lon": 9.5, + "departure": { + "scheduledTime": "2020-02-02T11:50:00Z", + "estimated": null } }, - "to" : { - "name" : "E", - "lat" : 9.0, - "lon" : 10.0, - "arrival" : { - "scheduledTime" : "2020-02-02T12:00:00Z", - "estimated" : null + "to": { + "name": "E", + "lat": 9.0, + "lon": 10.0, + "arrival": { + "scheduledTime": "2020-02-02T12:00:00Z", + "estimated": null } }, - "route" : null, - "legGeometry" : null + "route": null, + "legGeometry": null } ] } @@ -129,4 +129,4 @@ ] } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json index 9017fe77a93..bcff74d0413 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/rental-vehicle.json @@ -1,20 +1,20 @@ { "data": { "rentalVehicle": { - "vehicleId":"Network-1:free-floating-bicycle", - "name":"free-floating-bicycle", - "allowPickupNow":true, - "lon":19.01, - "lat":47.52, - "rentalUris":null, - "operative":true, + "vehicleId": "Network-1:free-floating-bicycle", + "name": "free-floating-bicycle", + "allowPickupNow": true, + "lon": 19.01, + "lat": 47.52, + "rentalUris": null, + "operative": true, "vehicleType": { - "formFactor":"BICYCLE", - "propulsionType":"HUMAN" + "formFactor": "BICYCLE", + "propulsionType": "HUMAN" }, "rentalNetwork": { - "networkId":"Network-1", - "url":"https://foo.bar" + "networkId": "Network-1", + "url": "https://foo.bar" } } } diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/routes-extended.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/routes-extended.json index 8856972ce4e..be772736fc5 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/routes-extended.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/routes-extended.json @@ -1,188 +1,188 @@ { - "data" : { - "routes" : [ + "data": { + "routes": [ { - "longName" : "Long name for CARPOOL", - "shortName" : "RCARPOOL", - "gtfsId" : "F:CARPOOL", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for CARPOOL", + "shortName": "RCARPOOL", + "gtfsId": "F:CARPOOL", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "CARPOOL", - "sortOrder" : 12, - "bikesAllowed" : "ALLOWED", - "patterns" : [ ] + "mode": "CARPOOL", + "sortOrder": 12, + "bikesAllowed": "ALLOWED", + "patterns": [] }, { - "longName" : "Long name for SUBWAY", - "shortName" : "RSUBWAY", - "gtfsId" : "F:SUBWAY", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for SUBWAY", + "shortName": "RSUBWAY", + "gtfsId": "F:SUBWAY", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "SUBWAY", - "sortOrder" : 2, - "bikesAllowed" : "NO_INFORMATION", - "patterns" : [ ] + "mode": "SUBWAY", + "sortOrder": 2, + "bikesAllowed": "NO_INFORMATION", + "patterns": [] }, { - "longName" : "Long name for BUS", - "shortName" : "RBUS", - "gtfsId" : "F:BUS", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for BUS", + "shortName": "RBUS", + "gtfsId": "F:BUS", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "BUS", - "sortOrder" : 3, - "bikesAllowed" : "ALLOWED", - "patterns" : [ ] + "mode": "BUS", + "sortOrder": 3, + "bikesAllowed": "ALLOWED", + "patterns": [] }, { - "longName" : "Long name for FERRY", - "shortName" : "RFERRY", - "gtfsId" : "F:FERRY", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for FERRY", + "shortName": "RFERRY", + "gtfsId": "F:FERRY", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "FERRY", - "sortOrder" : 5, - "bikesAllowed" : "NO_INFORMATION", - "patterns" : [ ] + "mode": "FERRY", + "sortOrder": 5, + "bikesAllowed": "NO_INFORMATION", + "patterns": [] }, { - "longName" : "Long name for COACH", - "shortName" : "RCOACH", - "gtfsId" : "F:COACH", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for COACH", + "shortName": "RCOACH", + "gtfsId": "F:COACH", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "COACH", - "sortOrder" : 1, - "bikesAllowed" : "NOT_ALLOWED", - "patterns" : [ ] + "mode": "COACH", + "sortOrder": 1, + "bikesAllowed": "NOT_ALLOWED", + "patterns": [] }, { - "longName" : "Long name for TRAM", - "shortName" : "RTRAM", - "gtfsId" : "F:TRAM", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for TRAM", + "shortName": "RTRAM", + "gtfsId": "F:TRAM", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "TRAM", - "sortOrder" : 4, - "bikesAllowed" : "NOT_ALLOWED", - "patterns" : [ ] + "mode": "TRAM", + "sortOrder": 4, + "bikesAllowed": "NOT_ALLOWED", + "patterns": [] }, { - "longName" : "Long name for CABLE_CAR", - "shortName" : "RCABLE_CAR", - "gtfsId" : "F:CABLE_CAR", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for CABLE_CAR", + "shortName": "RCABLE_CAR", + "gtfsId": "F:CABLE_CAR", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "CABLE_CAR", - "sortOrder" : 7, - "bikesAllowed" : "NOT_ALLOWED", - "patterns" : [ ] + "mode": "CABLE_CAR", + "sortOrder": 7, + "bikesAllowed": "NOT_ALLOWED", + "patterns": [] }, { - "longName" : "Long name for FUNICULAR", - "shortName" : "RFUNICULAR", - "gtfsId" : "F:FUNICULAR", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for FUNICULAR", + "shortName": "RFUNICULAR", + "gtfsId": "F:FUNICULAR", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "FUNICULAR", - "sortOrder" : 9, - "bikesAllowed" : "ALLOWED", - "patterns" : [ ] + "mode": "FUNICULAR", + "sortOrder": 9, + "bikesAllowed": "ALLOWED", + "patterns": [] }, { - "longName" : "Long name for RAIL", - "shortName" : "RRAIL", - "gtfsId" : "F:RAIL", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for RAIL", + "shortName": "RRAIL", + "gtfsId": "F:RAIL", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "RAIL", - "sortOrder" : null, - "bikesAllowed" : "ALLOWED", - "patterns" : [ ] + "mode": "RAIL", + "sortOrder": null, + "bikesAllowed": "ALLOWED", + "patterns": [] }, { - "longName" : "Long name for MONORAIL", - "shortName" : "RMONORAIL", - "gtfsId" : "F:MONORAIL", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for MONORAIL", + "shortName": "RMONORAIL", + "gtfsId": "F:MONORAIL", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "MONORAIL", - "sortOrder" : 11, - "bikesAllowed" : "NO_INFORMATION", - "patterns" : [ ] + "mode": "MONORAIL", + "sortOrder": 11, + "bikesAllowed": "NO_INFORMATION", + "patterns": [] }, { - "longName" : "Long name for GONDOLA", - "shortName" : "RGONDOLA", - "gtfsId" : "F:GONDOLA", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for GONDOLA", + "shortName": "RGONDOLA", + "gtfsId": "F:GONDOLA", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "GONDOLA", - "sortOrder" : 8, - "bikesAllowed" : "NO_INFORMATION", - "patterns" : [ ] + "mode": "GONDOLA", + "sortOrder": 8, + "bikesAllowed": "NO_INFORMATION", + "patterns": [] }, { - "longName" : "Long name for TROLLEYBUS", - "shortName" : "RTROLLEYBUS", - "gtfsId" : "F:TROLLEYBUS", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for TROLLEYBUS", + "shortName": "RTROLLEYBUS", + "gtfsId": "F:TROLLEYBUS", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "TROLLEYBUS", - "sortOrder" : 10, - "bikesAllowed" : "NOT_ALLOWED", - "patterns" : [ ] + "mode": "TROLLEYBUS", + "sortOrder": 10, + "bikesAllowed": "NOT_ALLOWED", + "patterns": [] }, { - "longName" : "Long name for AIRPLANE", - "shortName" : "RAIRPLANE", - "gtfsId" : "F:AIRPLANE", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for AIRPLANE", + "shortName": "RAIRPLANE", + "gtfsId": "F:AIRPLANE", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "AIRPLANE", - "sortOrder" : 6, - "bikesAllowed" : "ALLOWED", - "patterns" : [ ] + "mode": "AIRPLANE", + "sortOrder": 6, + "bikesAllowed": "ALLOWED", + "patterns": [] }, { - "longName" : "Long name for TAXI", - "shortName" : "RTAXI", - "gtfsId" : "F:TAXI", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for TAXI", + "shortName": "RTAXI", + "gtfsId": "F:TAXI", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "TAXI", - "sortOrder" : 13, - "bikesAllowed" : "NOT_ALLOWED", - "patterns" : [ ] + "mode": "TAXI", + "sortOrder": 13, + "bikesAllowed": "NOT_ALLOWED", + "patterns": [] } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/routes-tutorial.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/routes-tutorial.json index e2bdb289c32..f775b2d9d8a 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/routes-tutorial.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/routes-tutorial.json @@ -1,146 +1,146 @@ { - "data" : { - "routes" : [ + "data": { + "routes": [ { - "longName" : "Long name for CARPOOL", - "shortName" : "RCARPOOL", - "gtfsId" : "F:CARPOOL", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for CARPOOL", + "shortName": "RCARPOOL", + "gtfsId": "F:CARPOOL", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "CARPOOL" + "mode": "CARPOOL" }, { - "longName" : "Long name for SUBWAY", - "shortName" : "RSUBWAY", - "gtfsId" : "F:SUBWAY", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for SUBWAY", + "shortName": "RSUBWAY", + "gtfsId": "F:SUBWAY", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "SUBWAY" + "mode": "SUBWAY" }, { - "longName" : "Long name for BUS", - "shortName" : "RBUS", - "gtfsId" : "F:BUS", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for BUS", + "shortName": "RBUS", + "gtfsId": "F:BUS", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "BUS" + "mode": "BUS" }, { - "longName" : "Long name for FERRY", - "shortName" : "RFERRY", - "gtfsId" : "F:FERRY", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for FERRY", + "shortName": "RFERRY", + "gtfsId": "F:FERRY", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "FERRY" + "mode": "FERRY" }, { - "longName" : "Long name for COACH", - "shortName" : "RCOACH", - "gtfsId" : "F:COACH", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for COACH", + "shortName": "RCOACH", + "gtfsId": "F:COACH", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "COACH" + "mode": "COACH" }, { - "longName" : "Long name for TRAM", - "shortName" : "RTRAM", - "gtfsId" : "F:TRAM", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for TRAM", + "shortName": "RTRAM", + "gtfsId": "F:TRAM", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "TRAM" + "mode": "TRAM" }, { - "longName" : "Long name for CABLE_CAR", - "shortName" : "RCABLE_CAR", - "gtfsId" : "F:CABLE_CAR", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for CABLE_CAR", + "shortName": "RCABLE_CAR", + "gtfsId": "F:CABLE_CAR", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "CABLE_CAR" + "mode": "CABLE_CAR" }, { - "longName" : "Long name for FUNICULAR", - "shortName" : "RFUNICULAR", - "gtfsId" : "F:FUNICULAR", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for FUNICULAR", + "shortName": "RFUNICULAR", + "gtfsId": "F:FUNICULAR", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "FUNICULAR" + "mode": "FUNICULAR" }, { - "longName" : "Long name for RAIL", - "shortName" : "RRAIL", - "gtfsId" : "F:RAIL", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for RAIL", + "shortName": "RRAIL", + "gtfsId": "F:RAIL", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "RAIL" + "mode": "RAIL" }, { - "longName" : "Long name for MONORAIL", - "shortName" : "RMONORAIL", - "gtfsId" : "F:MONORAIL", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for MONORAIL", + "shortName": "RMONORAIL", + "gtfsId": "F:MONORAIL", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "MONORAIL" + "mode": "MONORAIL" }, { - "longName" : "Long name for GONDOLA", - "shortName" : "RGONDOLA", - "gtfsId" : "F:GONDOLA", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for GONDOLA", + "shortName": "RGONDOLA", + "gtfsId": "F:GONDOLA", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "GONDOLA" + "mode": "GONDOLA" }, { - "longName" : "Long name for TROLLEYBUS", - "shortName" : "RTROLLEYBUS", - "gtfsId" : "F:TROLLEYBUS", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for TROLLEYBUS", + "shortName": "RTROLLEYBUS", + "gtfsId": "F:TROLLEYBUS", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "TROLLEYBUS" + "mode": "TROLLEYBUS" }, { - "longName" : "Long name for AIRPLANE", - "shortName" : "RAIRPLANE", - "gtfsId" : "F:AIRPLANE", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for AIRPLANE", + "shortName": "RAIRPLANE", + "gtfsId": "F:AIRPLANE", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "AIRPLANE" + "mode": "AIRPLANE" }, { - "longName" : "Long name for TAXI", - "shortName" : "RTAXI", - "gtfsId" : "F:TAXI", - "agency" : { - "gtfsId" : "F:A1", - "name" : "Agency Test" + "longName": "Long name for TAXI", + "shortName": "RTAXI", + "gtfsId": "F:TAXI", + "agency": { + "gtfsId": "F:A1", + "name": "Agency Test" }, - "mode" : "TAXI" + "mode": "TAXI" } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/stops.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/stops.json index 4e3d4c8a18c..b4d54806efe 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/stops.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/stops.json @@ -1,126 +1,126 @@ { - "data" : { - "stops" : [ + "data": { + "stops": [ { - "gtfsId" : "F:A", - "lat" : 5.0, - "lon" : 8.0, - "name" : "A", - "vehicleMode" : "BUS", - "allRoutes" : [ + "gtfsId": "F:A", + "lat": 5.0, + "lon": 8.0, + "name": "A", + "vehicleMode": "BUS", + "allRoutes": [ { - "gtfsId" : "F:a-route", - "longName" : null, - "shortName" : "Ra-route" + "gtfsId": "F:a-route", + "longName": null, + "shortName": "Ra-route" } ], - "routesWithinRange" : [ ] + "routesWithinRange": [] }, { - "gtfsId" : "F:B", - "lat" : 6.0, - "lon" : 8.5, - "name" : "B", - "vehicleMode" : "BUS", - "allRoutes" : [ + "gtfsId": "F:B", + "lat": 6.0, + "lon": 8.5, + "name": "B", + "vehicleMode": "BUS", + "allRoutes": [ { - "gtfsId" : "F:a-route", - "longName" : null, - "shortName" : "Ra-route" + "gtfsId": "F:a-route", + "longName": null, + "shortName": "Ra-route" } ], - "routesWithinRange" : [ ] + "routesWithinRange": [] }, { - "gtfsId" : "F:C", - "lat" : 7.0, - "lon" : 9.0, - "name" : "C", - "vehicleMode" : "BUS", - "allRoutes" : [ + "gtfsId": "F:C", + "lat": 7.0, + "lon": 9.0, + "name": "C", + "vehicleMode": "BUS", + "allRoutes": [ { - "gtfsId" : "F:a-route", - "longName" : null, - "shortName" : "Ra-route" + "gtfsId": "F:a-route", + "longName": null, + "shortName": "Ra-route" } ], - "routesWithinRange" : [ ] + "routesWithinRange": [] }, { - "gtfsId" : "F:D", - "lat" : 8.0, - "lon" : 9.5, - "name" : "D", - "vehicleMode" : "BUS", - "allRoutes" : [ + "gtfsId": "F:D", + "lat": 8.0, + "lon": 9.5, + "name": "D", + "vehicleMode": "BUS", + "allRoutes": [ { - "gtfsId" : "F:a-route", - "longName" : null, - "shortName" : "Ra-route" + "gtfsId": "F:a-route", + "longName": null, + "shortName": "Ra-route" } ], - "routesWithinRange" : [ ] + "routesWithinRange": [] }, { - "gtfsId" : "F:E", - "lat" : 9.0, - "lon" : 10.0, - "name" : "E", - "vehicleMode" : "BUS", - "allRoutes" : [ + "gtfsId": "F:E", + "lat": 9.0, + "lon": 10.0, + "name": "E", + "vehicleMode": "BUS", + "allRoutes": [ { - "gtfsId" : "F:a-route", - "longName" : null, - "shortName" : "Ra-route" + "gtfsId": "F:a-route", + "longName": null, + "shortName": "Ra-route" } ], - "routesWithinRange" : [ ] + "routesWithinRange": [] }, { - "gtfsId" : "F:F", - "lat" : 9.0, - "lon" : 10.5, - "name" : "F", - "vehicleMode" : "BUS", - "allRoutes" : [ + "gtfsId": "F:F", + "lat": 9.0, + "lon": 10.5, + "name": "F", + "vehicleMode": "BUS", + "allRoutes": [ { - "gtfsId" : "F:a-route", - "longName" : null, - "shortName" : "Ra-route" + "gtfsId": "F:a-route", + "longName": null, + "shortName": "Ra-route" } ], - "routesWithinRange" : [ ] + "routesWithinRange": [] }, { - "gtfsId" : "F:G", - "lat" : 9.5, - "lon" : 11.0, - "name" : "G", - "vehicleMode" : "BUS", - "allRoutes" : [ + "gtfsId": "F:G", + "lat": 9.5, + "lon": 11.0, + "name": "G", + "vehicleMode": "BUS", + "allRoutes": [ { - "gtfsId" : "F:a-route", - "longName" : null, - "shortName" : "Ra-route" + "gtfsId": "F:a-route", + "longName": null, + "shortName": "Ra-route" } ], - "routesWithinRange" : [ ] + "routesWithinRange": [] }, { - "gtfsId" : "F:H", - "lat" : 10.0, - "lon" : 11.5, - "name" : "H", - "vehicleMode" : "BUS", - "allRoutes" : [ + "gtfsId": "F:H", + "lat": 10.0, + "lon": 11.5, + "name": "H", + "vehicleMode": "BUS", + "allRoutes": [ { - "gtfsId" : "F:a-route", - "longName" : null, - "shortName" : "Ra-route" + "gtfsId": "F:a-route", + "longName": null, + "shortName": "Ra-route" } ], - "routesWithinRange" : [ ] + "routesWithinRange": [] } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-parking.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-parking.json index 196c00de6f4..549f0b29343 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-parking.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-parking.json @@ -1,10 +1,10 @@ { - "data" : { - "vehicleParkings" : [ + "data": { + "vehicleParkings": [ { - "name" : "parking", - "vehicleParkingId" : "F:parking-1" + "name": "parking", + "vehicleParkingId": "F:parking-1" } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-station.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-station.json index ad1ce76d9be..e7c1e52770f 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-station.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rental-station.json @@ -1,61 +1,61 @@ { - "data" : { - "vehicleRentalStation" : { - "stationId" : "Network-1:FooStation", - "name" : "FooStation", - "vehiclesAvailable" : 10, - "availableVehicles" : { - "byType" : [ + "data": { + "vehicleRentalStation": { + "stationId": "Network-1:FooStation", + "name": "FooStation", + "vehiclesAvailable": 10, + "availableVehicles": { + "byType": [ { - "vehicleType" : { - "formFactor" : "BICYCLE", - "propulsionType" : "ELECTRIC" + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "ELECTRIC" }, - "count" : 5 + "count": 5 }, { - "vehicleType" : { - "formFactor" : "BICYCLE", - "propulsionType" : "HUMAN" + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "HUMAN" }, - "count" : 5 + "count": 5 } ], - "total" : 10 + "total": 10 }, - "spacesAvailable" : 10, - "availableSpaces" : { - "byType" : [ + "spacesAvailable": 10, + "availableSpaces": { + "byType": [ { - "vehicleType" : { - "formFactor" : "BICYCLE", - "propulsionType" : "ELECTRIC" + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "ELECTRIC" }, - "count" : 3 + "count": 3 }, { - "vehicleType" : { - "formFactor" : "BICYCLE", - "propulsionType" : "HUMAN" + "vehicleType": { + "formFactor": "BICYCLE", + "propulsionType": "HUMAN" }, - "count" : 7 + "count": 7 } ], - "total" : 10 + "total": 10 }, - "allowDropoff" : false, - "allowPickup" : false, - "allowDropoffNow" : false, - "allowPickupNow" : false, - "lon" : 18.99, - "lat" : 47.51, - "capacity" : null, - "allowOverloading" : false, - "rentalUris" : null, - "operative" : false, - "rentalNetwork" : { - "networkId" : "Network-1", - "url" : "https://foo.bar" + "allowDropoff": false, + "allowPickup": false, + "allowDropoffNow": false, + "allowPickupNow": false, + "lon": 18.99, + "lat": 47.51, + "capacity": null, + "allowOverloading": false, + "rentalUris": null, + "operative": false, + "rentalNetwork": { + "networkId": "Network-1", + "url": "https://foo.bar" } } } diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json index 01422dd6580..d28e62f8d93 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/vehicle-rentals-bybbox.json @@ -80,4 +80,4 @@ } ] } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/walk-steps.json b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/walk-steps.json index be584a875be..49908207d44 100644 --- a/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/walk-steps.json +++ b/application/src/test/resources/org/opentripplanner/apis/gtfs/expectations/walk-steps.json @@ -1,34 +1,34 @@ { - "data" : { - "planConnection" : { - "edges" : [ + "data": { + "planConnection": { + "edges": [ { - "node" : { - "legs" : [ + "node": { + "legs": [ { - "steps" : [ + "steps": [ { - "streetName" : "street", - "area" : false, - "relativeDirection" : "DEPART", - "absoluteDirection" : "NORTHEAST" + "streetName": "street", + "area": false, + "relativeDirection": "DEPART", + "absoluteDirection": "NORTHEAST" }, { - "streetName" : "elevator", - "area" : false, - "relativeDirection" : "ELEVATOR", - "absoluteDirection" : null + "streetName": "elevator", + "area": false, + "relativeDirection": "ELEVATOR", + "absoluteDirection": null } ] }, { - "steps" : [ ] + "steps": [] }, { - "steps" : [ ] + "steps": [] }, { - "steps" : [ ] + "steps": [] } ] } @@ -36,4 +36,4 @@ ] } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/org/opentripplanner/apis/vectortiles/style.json b/application/src/test/resources/org/opentripplanner/apis/vectortiles/style.json index 2cf936a1e63..b08a225fde3 100644 --- a/application/src/test/resources/org/opentripplanner/apis/vectortiles/style.json +++ b/application/src/test/resources/org/opentripplanner/apis/vectortiles/style.json @@ -1,144 +1,83 @@ { - "name" : "OTP Debug Tiles", - "sources" : { - "background" : { - "id" : "background", - "tiles" : [ - "https://a.tile.openstreetmap.org/{z}/{x}/{y}.png" - ], - "maxzoom" : 19, - "tileSize" : 256, - "attribution" : "© OpenStreetMap Contributors", - "type" : "raster" + "name": "OTP Debug Tiles", + "sources": { + "background": { + "id": "background", + "tiles": ["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"], + "maxzoom": 19, + "tileSize": 256, + "attribution": "© OpenStreetMap Contributors", + "type": "raster" }, - "vectorSource" : { - "id" : "vectorSource", - "url" : "https://example.com", - "type" : "vector" + "vectorSource": { + "id": "vectorSource", + "url": "https://example.com", + "type": "vector" } }, - "layers" : [ + "layers": [ { - "id" : "background", - "type" : "raster", - "source" : "background", - "minzoom" : 0, - "metadata" : { - "group" : "Other" + "id": "background", + "type": "raster", + "source": "background", + "minzoom": 0, + "metadata": { + "group": "Other" } }, { - "id" : "wheelchair-accessible", - "source" : "vectorSource", - "source-layer" : "edges", - "type" : "line", - "minzoom" : 6, - "maxzoom" : 23, - "paint" : { - "line-color" : "#136b04", - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.2, - 23, - 8.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] - }, - "filter" : [ - "==", - "wheelchairAccessible", - true - ], - "layout" : { - "line-cap" : "round", - "visibility" : "none" - }, - "metadata" : { - "group" : "Wheelchair accessibility" + "id": "wheelchair-accessible", + "source": "vectorSource", + "source-layer": "edges", + "type": "line", + "minzoom": 6, + "maxzoom": 23, + "paint": { + "line-color": "#136b04", + "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.2, 23, 8.0], + "line-offset": ["interpolate", ["linear"], ["zoom"], 13, 0.4, 23, 7.0] + }, + "filter": ["==", "wheelchairAccessible", true], + "layout": { + "line-cap": "round", + "visibility": "none" + }, + "metadata": { + "group": "Wheelchair accessibility" } }, { - "id" : "wheelchair-inaccessible", - "source" : "vectorSource", - "source-layer" : "edges", - "type" : "line", - "minzoom" : 6, - "maxzoom" : 23, - "paint" : { - "line-color" : "#fc0f2a", - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.2, - 23, - 8.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] - }, - "filter" : [ - "==", - "wheelchairAccessible", - false - ], - "layout" : { - "line-cap" : "round", - "visibility" : "none" - }, - "metadata" : { - "group" : "Wheelchair accessibility" + "id": "wheelchair-inaccessible", + "source": "vectorSource", + "source-layer": "edges", + "type": "line", + "minzoom": 6, + "maxzoom": 23, + "paint": { + "line-color": "#fc0f2a", + "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.2, 23, 8.0], + "line-offset": ["interpolate", ["linear"], ["zoom"], 13, 0.4, 23, 7.0] + }, + "filter": ["==", "wheelchairAccessible", false], + "layout": { + "line-cap": "round", + "visibility": "none" + }, + "metadata": { + "group": "Wheelchair accessibility" } }, { - "id" : "no-thru-traffic PEDESTRIAN", - "source" : "vectorSource", - "source-layer" : "edges", - "type" : "line", - "minzoom" : 13, - "maxzoom" : 23, - "paint" : { - "line-color" : [ + "id": "no-thru-traffic PEDESTRIAN", + "source": "vectorSource", + "source-layer": "edges", + "type": "line", + "minzoom": 13, + "maxzoom": 23, + "paint": { + "line-color": [ "match", - [ - "get", - "noThruTraffic" - ], + ["get", "noThruTraffic"], "NONE", "#140d0e", "PEDESTRIAN", @@ -157,80 +96,33 @@ "#adb2b0", "#140d0e" ], - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.2, - 23, - 8.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] + "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.2, 23, 8.0], + "line-offset": ["interpolate", ["linear"], ["zoom"], 13, 0.4, 23, 7.0] }, - "filter" : [ + "filter": [ "any", - [ - "in", - "PEDESTRIAN", - [ - "string", - [ - "get", - "noThruTraffic" - ] - ] - ], - [ - "in", - "ALL", - [ - "string", - [ - "get", - "noThruTraffic" - ] - ] - ] + ["in", "PEDESTRIAN", ["string", ["get", "noThruTraffic"]]], + ["in", "ALL", ["string", ["get", "noThruTraffic"]]] ], - "layout" : { - "line-cap" : "butt", - "visibility" : "none" + "layout": { + "line-cap": "butt", + "visibility": "none" }, - "metadata" : { - "group" : "No-thru traffic" + "metadata": { + "group": "No-thru traffic" } }, { - "id" : "no-thru-traffic BICYCLE", - "source" : "vectorSource", - "source-layer" : "edges", - "type" : "line", - "minzoom" : 13, - "maxzoom" : 23, - "paint" : { - "line-color" : [ + "id": "no-thru-traffic BICYCLE", + "source": "vectorSource", + "source-layer": "edges", + "type": "line", + "minzoom": 13, + "maxzoom": 23, + "paint": { + "line-color": [ "match", - [ - "get", - "noThruTraffic" - ], + ["get", "noThruTraffic"], "NONE", "#140d0e", "PEDESTRIAN", @@ -249,80 +141,33 @@ "#adb2b0", "#140d0e" ], - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.2, - 23, - 8.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] + "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.2, 23, 8.0], + "line-offset": ["interpolate", ["linear"], ["zoom"], 13, 0.4, 23, 7.0] }, - "filter" : [ + "filter": [ "any", - [ - "in", - "BICYCLE", - [ - "string", - [ - "get", - "noThruTraffic" - ] - ] - ], - [ - "in", - "ALL", - [ - "string", - [ - "get", - "noThruTraffic" - ] - ] - ] + ["in", "BICYCLE", ["string", ["get", "noThruTraffic"]]], + ["in", "ALL", ["string", ["get", "noThruTraffic"]]] ], - "layout" : { - "line-cap" : "butt", - "visibility" : "none" + "layout": { + "line-cap": "butt", + "visibility": "none" }, - "metadata" : { - "group" : "No-thru traffic" + "metadata": { + "group": "No-thru traffic" } }, { - "id" : "no-thru-traffic CAR", - "source" : "vectorSource", - "source-layer" : "edges", - "type" : "line", - "minzoom" : 13, - "maxzoom" : 23, - "paint" : { - "line-color" : [ + "id": "no-thru-traffic CAR", + "source": "vectorSource", + "source-layer": "edges", + "type": "line", + "minzoom": 13, + "maxzoom": 23, + "paint": { + "line-color": [ "match", - [ - "get", - "noThruTraffic" - ], + ["get", "noThruTraffic"], "NONE", "#140d0e", "PEDESTRIAN", @@ -341,80 +186,36 @@ "#adb2b0", "#140d0e" ], - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.2, - 23, - 8.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] + "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.2, 23, 8.0], + "line-offset": ["interpolate", ["linear"], ["zoom"], 13, 0.4, 23, 7.0] }, - "filter" : [ + "filter": [ "any", - [ - "in", - "CAR", - [ - "string", - [ - "get", - "noThruTraffic" - ] - ] - ], - [ - "in", - "ALL", - [ - "string", - [ - "get", - "noThruTraffic" - ] - ] - ] + ["in", "CAR", ["string", ["get", "noThruTraffic"]]], + ["in", "ALL", ["string", ["get", "noThruTraffic"]]] ], - "layout" : { - "line-cap" : "butt", - "visibility" : "none" + "layout": { + "line-cap": "butt", + "visibility": "none" }, - "metadata" : { - "group" : "No-thru traffic" + "metadata": { + "group": "No-thru traffic" } }, { - "id" : "no-thru-traffic-text", - "source" : "vectorSource", - "source-layer" : "edges", - "type" : "symbol", - "minzoom" : 17, - "maxzoom" : 23, - "paint" : { - "text-color" : "#000", - "text-halo-color" : "#fff", - "text-halo-blur" : 4, - "text-halo-width" : 3 - }, - "filter" : [ + "id": "no-thru-traffic-text", + "source": "vectorSource", + "source-layer": "edges", + "type": "symbol", + "minzoom": 17, + "maxzoom": 23, + "paint": { + "text-color": "#000", + "text-halo-color": "#fff", + "text-halo-blur": 4, + "text-halo-width": 3 + }, + "filter": [ "in", "class", "StreetEdge", @@ -425,54 +226,34 @@ "TemporaryPartialStreetEdge", "TemporaryFreeEdge" ], - "layout" : { - "symbol-placement" : "line-center", - "symbol-spacing" : 1000, - "text-field" : "{noThruTraffic}", - "text-font" : [ - "KlokanTech Noto Sans Regular" - ], - "text-size" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 10, - 6.0, - 24, - 12.0 - ], - "text-max-width" : 100, - "text-keep-upright" : true, - "text-rotation-alignment" : "map", - "text-overlap" : "never", - "text-offset" : [ - 0, - 1.0 - ], - "visibility" : "none" - }, - "metadata" : { - "group" : "No-thru traffic" + "layout": { + "symbol-placement": "line-center", + "symbol-spacing": 1000, + "text-field": "{noThruTraffic}", + "text-font": ["KlokanTech Noto Sans Regular"], + "text-size": ["interpolate", ["linear"], ["zoom"], 10, 6.0, 24, 12.0], + "text-max-width": 100, + "text-keep-upright": true, + "text-rotation-alignment": "map", + "text-overlap": "never", + "text-offset": [0, 1.0], + "visibility": "none" + }, + "metadata": { + "group": "No-thru traffic" } }, { - "id" : "permission PEDESTRIAN", - "source" : "vectorSource", - "source-layer" : "edges", - "type" : "line", - "minzoom" : 13, - "maxzoom" : 23, - "paint" : { - "line-color" : [ + "id": "permission PEDESTRIAN", + "source": "vectorSource", + "source-layer": "edges", + "type": "line", + "minzoom": 13, + "maxzoom": 23, + "paint": { + "line-color": [ "match", - [ - "get", - "permission" - ], + ["get", "permission"], "NONE", "#140d0e", "PEDESTRIAN", @@ -491,80 +272,33 @@ "#adb2b0", "#140d0e" ], - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.2, - 23, - 8.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] + "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.2, 23, 8.0], + "line-offset": ["interpolate", ["linear"], ["zoom"], 13, 0.4, 23, 7.0] }, - "filter" : [ + "filter": [ "any", - [ - "in", - "PEDESTRIAN", - [ - "string", - [ - "get", - "permission" - ] - ] - ], - [ - "in", - "ALL", - [ - "string", - [ - "get", - "permission" - ] - ] - ] + ["in", "PEDESTRIAN", ["string", ["get", "permission"]]], + ["in", "ALL", ["string", ["get", "permission"]]] ], - "layout" : { - "line-cap" : "butt", - "visibility" : "none" + "layout": { + "line-cap": "butt", + "visibility": "none" }, - "metadata" : { - "group" : "Permissions" + "metadata": { + "group": "Permissions" } }, { - "id" : "permission BICYCLE", - "source" : "vectorSource", - "source-layer" : "edges", - "type" : "line", - "minzoom" : 13, - "maxzoom" : 23, - "paint" : { - "line-color" : [ + "id": "permission BICYCLE", + "source": "vectorSource", + "source-layer": "edges", + "type": "line", + "minzoom": 13, + "maxzoom": 23, + "paint": { + "line-color": [ "match", - [ - "get", - "permission" - ], + ["get", "permission"], "NONE", "#140d0e", "PEDESTRIAN", @@ -583,80 +317,33 @@ "#adb2b0", "#140d0e" ], - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.2, - 23, - 8.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] + "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.2, 23, 8.0], + "line-offset": ["interpolate", ["linear"], ["zoom"], 13, 0.4, 23, 7.0] }, - "filter" : [ + "filter": [ "any", - [ - "in", - "BICYCLE", - [ - "string", - [ - "get", - "permission" - ] - ] - ], - [ - "in", - "ALL", - [ - "string", - [ - "get", - "permission" - ] - ] - ] + ["in", "BICYCLE", ["string", ["get", "permission"]]], + ["in", "ALL", ["string", ["get", "permission"]]] ], - "layout" : { - "line-cap" : "butt", - "visibility" : "none" + "layout": { + "line-cap": "butt", + "visibility": "none" }, - "metadata" : { - "group" : "Permissions" + "metadata": { + "group": "Permissions" } }, { - "id" : "permission CAR", - "source" : "vectorSource", - "source-layer" : "edges", - "type" : "line", - "minzoom" : 13, - "maxzoom" : 23, - "paint" : { - "line-color" : [ + "id": "permission CAR", + "source": "vectorSource", + "source-layer": "edges", + "type": "line", + "minzoom": 13, + "maxzoom": 23, + "paint": { + "line-color": [ "match", - [ - "get", - "permission" - ], + ["get", "permission"], "NONE", "#140d0e", "PEDESTRIAN", @@ -675,80 +362,36 @@ "#adb2b0", "#140d0e" ], - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.2, - 23, - 8.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] + "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.2, 23, 8.0], + "line-offset": ["interpolate", ["linear"], ["zoom"], 13, 0.4, 23, 7.0] }, - "filter" : [ + "filter": [ "any", - [ - "in", - "CAR", - [ - "string", - [ - "get", - "permission" - ] - ] - ], - [ - "in", - "ALL", - [ - "string", - [ - "get", - "permission" - ] - ] - ] + ["in", "CAR", ["string", ["get", "permission"]]], + ["in", "ALL", ["string", ["get", "permission"]]] ], - "layout" : { - "line-cap" : "butt", - "visibility" : "none" + "layout": { + "line-cap": "butt", + "visibility": "none" }, - "metadata" : { - "group" : "Permissions" + "metadata": { + "group": "Permissions" } }, { - "id" : "permission-text", - "source" : "vectorSource", - "source-layer" : "edges", - "type" : "symbol", - "minzoom" : 17, - "maxzoom" : 23, - "paint" : { - "text-color" : "#000", - "text-halo-color" : "#fff", - "text-halo-blur" : 4, - "text-halo-width" : 3 - }, - "filter" : [ + "id": "permission-text", + "source": "vectorSource", + "source-layer": "edges", + "type": "symbol", + "minzoom": 17, + "maxzoom": 23, + "paint": { + "text-color": "#000", + "text-halo-color": "#fff", + "text-halo-blur": 4, + "text-halo-width": 3 + }, + "filter": [ "in", "class", "StreetEdge", @@ -759,77 +402,36 @@ "TemporaryPartialStreetEdge", "TemporaryFreeEdge" ], - "layout" : { - "symbol-placement" : "line-center", - "symbol-spacing" : 1000, - "text-field" : "{permission}", - "text-font" : [ - "KlokanTech Noto Sans Regular" - ], - "text-size" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 10, - 6.0, - 24, - 12.0 - ], - "text-max-width" : 100, - "text-keep-upright" : true, - "text-rotation-alignment" : "map", - "text-overlap" : "never", - "text-offset" : [ - 0, - 1.0 - ], - "visibility" : "none" - }, - "metadata" : { - "group" : "Permissions" + "layout": { + "symbol-placement": "line-center", + "symbol-spacing": 1000, + "text-field": "{permission}", + "text-font": ["KlokanTech Noto Sans Regular"], + "text-size": ["interpolate", ["linear"], ["zoom"], 10, 6.0, 24, 12.0], + "text-max-width": 100, + "text-keep-upright": true, + "text-rotation-alignment": "map", + "text-overlap": "never", + "text-offset": [0, 1.0], + "visibility": "none" + }, + "metadata": { + "group": "Permissions" } }, { - "id" : "edge", - "type" : "line", - "source" : "vectorSource", - "source-layer" : "edges", - "minzoom" : 6, - "maxzoom" : 23, - "paint" : { - "line-color" : "#f21d52", - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.1, - 23, - 6.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] - }, - "filter" : [ + "id": "edge", + "type": "line", + "source": "vectorSource", + "source-layer": "edges", + "minzoom": 6, + "maxzoom": 23, + "paint": { + "line-color": "#f21d52", + "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.1, 23, 6.0], + "line-offset": ["interpolate", ["linear"], ["zoom"], 13, 0.4, 23, 7.0] + }, + "filter": [ "in", "class", "StreetEdge", @@ -840,28 +442,28 @@ "TemporaryPartialStreetEdge", "TemporaryFreeEdge" ], - "layout" : { - "line-cap" : "round", - "visibility" : "none" + "layout": { + "line-cap": "round", + "visibility": "none" }, - "metadata" : { - "group" : "Edges" + "metadata": { + "group": "Edges" } }, { - "id" : "edge-name", - "type" : "symbol", - "source" : "vectorSource", - "source-layer" : "edges", - "minzoom" : 17, - "maxzoom" : 23, - "paint" : { - "text-color" : "#000", - "text-halo-color" : "#fff", - "text-halo-blur" : 4, - "text-halo-width" : 3 - }, - "filter" : [ + "id": "edge-name", + "type": "symbol", + "source": "vectorSource", + "source-layer": "edges", + "minzoom": 17, + "maxzoom": 23, + "paint": { + "text-color": "#000", + "text-halo-color": "#fff", + "text-halo-blur": 4, + "text-halo-width": 3 + }, + "filter": [ "in", "class", "StreetEdge", @@ -872,73 +474,35 @@ "TemporaryPartialStreetEdge", "TemporaryFreeEdge" ], - "layout" : { - "symbol-placement" : "line-center", - "symbol-spacing" : 1000, - "text-field" : "{name}", - "text-font" : [ - "KlokanTech Noto Sans Regular" - ], - "text-size" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 10, - 6.0, - 24, - 12.0 - ], - "text-max-width" : 100, - "text-keep-upright" : true, - "text-rotation-alignment" : "map", - "text-overlap" : "never", - "visibility" : "none" - }, - "metadata" : { - "group" : "Edges" + "layout": { + "symbol-placement": "line-center", + "symbol-spacing": 1000, + "text-field": "{name}", + "text-font": ["KlokanTech Noto Sans Regular"], + "text-size": ["interpolate", ["linear"], ["zoom"], 10, 6.0, 24, 12.0], + "text-max-width": 100, + "text-keep-upright": true, + "text-rotation-alignment": "map", + "text-overlap": "never", + "visibility": "none" + }, + "metadata": { + "group": "Edges" } }, { - "id" : "link", - "type" : "line", - "source" : "vectorSource", - "source-layer" : "edges", - "minzoom" : 13, - "maxzoom" : 23, - "paint" : { - "line-color" : "#22DD9E", - "line-width" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.2, - 23, - 8.0 - ], - "line-offset" : [ - "interpolate", - [ - "linear" - ], - [ - "zoom" - ], - 13, - 0.4, - 23, - 7.0 - ] - }, - "filter" : [ + "id": "link", + "type": "line", + "source": "vectorSource", + "source-layer": "edges", + "minzoom": 13, + "maxzoom": 23, + "paint": { + "line-color": "#22DD9E", + "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.2, 23, 8.0], + "line-offset": ["interpolate", ["linear"], ["zoom"], 13, 0.4, 23, 7.0] + }, + "filter": [ "in", "class", "StreetTransitStopLink", @@ -948,181 +512,153 @@ "StreetVehicleParkingLink", "StreetStationCentroidLink" ], - "layout" : { - "line-cap" : "round", - "visibility" : "none" + "layout": { + "line-cap": "round", + "visibility": "none" }, - "metadata" : { - "group" : "Edges" + "metadata": { + "group": "Edges" } }, { - "id" : "vertex", - "type" : "circle", - "source" : "vectorSource", - "source-layer" : "vertices", - "minzoom" : 15, - "maxzoom" : 23, - "paint" : { - "circle-stroke-color" : "#140d0e", - "circle-stroke-width" : [ + "id": "vertex", + "type": "circle", + "source": "vectorSource", + "source-layer": "vertices", + "minzoom": 15, + "maxzoom": 23, + "paint": { + "circle-stroke-color": "#140d0e", + "circle-stroke-width": [ "interpolate", - [ - "linear" - ], - [ - "zoom" - ], + ["linear"], + ["zoom"], 15, 0.2, 23, 3.0 ], - "circle-radius" : [ + "circle-radius": [ "interpolate", - [ - "linear" - ], - [ - "zoom" - ], + ["linear"], + ["zoom"], 15, 1.0, 23, 7.0 ], - "circle-color" : "#BC55F2" + "circle-color": "#BC55F2" }, - "layout" : { - "visibility" : "none" + "layout": { + "visibility": "none" }, - "metadata" : { - "group" : "Vertices" + "metadata": { + "group": "Vertices" } }, { - "id" : "parking-vertex", - "type" : "circle", - "source" : "vectorSource", - "source-layer" : "vertices", - "minzoom" : 13, - "maxzoom" : 23, - "paint" : { - "circle-stroke-color" : "#140d0e", - "circle-stroke-width" : [ + "id": "parking-vertex", + "type": "circle", + "source": "vectorSource", + "source-layer": "vertices", + "minzoom": 13, + "maxzoom": 23, + "paint": { + "circle-stroke-color": "#140d0e", + "circle-stroke-width": [ "interpolate", - [ - "linear" - ], - [ - "zoom" - ], + ["linear"], + ["zoom"], 15, 0.2, 23, 3.0 ], - "circle-radius" : [ + "circle-radius": [ "interpolate", - [ - "linear" - ], - [ - "zoom" - ], + ["linear"], + ["zoom"], 13, 1.4, 23, 10.0 ], - "circle-color" : "#136b04" + "circle-color": "#136b04" }, - "filter" : [ - "in", - "class", - "VehicleParkingEntranceVertex" - ], - "layout" : { - "visibility" : "none" + "filter": ["in", "class", "VehicleParkingEntranceVertex"], + "layout": { + "visibility": "none" }, - "metadata" : { - "group" : "Vertices" + "metadata": { + "group": "Vertices" } }, { - "id" : "area-stop", - "type" : "fill", - "source" : "vectorSource", - "source-layer" : "stops", - "minzoom" : 6, - "maxzoom" : 23, - "paint" : { - "fill-color" : "#22DD9E", - "fill-opacity" : 0.5, - "fill-outline-color" : "#140d0e" - }, - "metadata" : { - "group" : "Stops" + "id": "area-stop", + "type": "fill", + "source": "vectorSource", + "source-layer": "stops", + "minzoom": 6, + "maxzoom": 23, + "paint": { + "fill-color": "#22DD9E", + "fill-opacity": 0.5, + "fill-outline-color": "#140d0e" + }, + "metadata": { + "group": "Stops" } }, { - "id" : "group-stop", - "type" : "fill", - "source" : "vectorSource", - "source-layer" : "stops", - "minzoom" : 6, - "maxzoom" : 23, - "paint" : { - "fill-color" : "#22DD9E", - "fill-opacity" : 0.5, - "fill-outline-color" : "#140d0e" - }, - "metadata" : { - "group" : "Stops" + "id": "group-stop", + "type": "fill", + "source": "vectorSource", + "source-layer": "stops", + "minzoom": 6, + "maxzoom": 23, + "paint": { + "fill-color": "#22DD9E", + "fill-opacity": 0.5, + "fill-outline-color": "#140d0e" + }, + "metadata": { + "group": "Stops" } }, { - "id" : "regular-stop", - "type" : "circle", - "source" : "vectorSource", - "source-layer" : "stops", - "minzoom" : 10, - "maxzoom" : 23, - "paint" : { - "circle-stroke-color" : "#140d0e", - "circle-stroke-width" : [ + "id": "regular-stop", + "type": "circle", + "source": "vectorSource", + "source-layer": "stops", + "minzoom": 10, + "maxzoom": 23, + "paint": { + "circle-stroke-color": "#140d0e", + "circle-stroke-width": [ "interpolate", - [ - "linear" - ], - [ - "zoom" - ], + ["linear"], + ["zoom"], 11, 0.5, 23, 5.0 ], - "circle-radius" : [ + "circle-radius": [ "interpolate", - [ - "linear" - ], - [ - "zoom" - ], + ["linear"], + ["zoom"], 11, 0.5, 23, 10.0 ], - "circle-color" : "#fcf9fa" + "circle-color": "#fcf9fa" }, - "metadata" : { - "group" : "Stops" + "metadata": { + "group": "Stops" } } ], - "version" : 8, - "glyphs" : "https://cdn.jsdelivr.net/gh/klokantech/klokantech-gl-fonts@master/{fontstack}/{range}.pbf" -} \ No newline at end of file + "version": 8, + "glyphs": "https://cdn.jsdelivr.net/gh/klokantech/klokantech-gl-fonts@master/{fontstack}/{range}.pbf" +} diff --git a/application/src/test/resources/portland/build-config.json b/application/src/test/resources/portland/build-config.json index 910f54d7211..96cfdec93a7 100644 --- a/application/src/test/resources/portland/build-config.json +++ b/application/src/test/resources/portland/build-config.json @@ -3,4 +3,4 @@ "transitServiceEnd": "2010-03-01", "staticBikeParkAndRide": true, "staticParkAndRide": true -} \ No newline at end of file +} diff --git a/application/src/test/resources/portland/router-config.json b/application/src/test/resources/portland/router-config.json index 7a73a41bfdf..0967ef424bc 100644 --- a/application/src/test/resources/portland/router-config.json +++ b/application/src/test/resources/portland/router-config.json @@ -1,2 +1 @@ -{ -} \ No newline at end of file +{} diff --git a/application/src/test/resources/speedtest/speed-test-config.json b/application/src/test/resources/speedtest/speed-test-config.json index af5c0745ab0..ca8f9e02807 100644 --- a/application/src/test/resources/speedtest/speed-test-config.json +++ b/application/src/test/resources/speedtest/speed-test-config.json @@ -2,11 +2,11 @@ // Run all test-cases on the given date "testDate": "2009-12-17", "feedId": "1", - "ignoreStreetResults" : true, + "ignoreStreetResults": true, "routingDefaults": { - "itineraryFilters" : { + "itineraryFilters": { // We do not want the filter chain to remove itineraries "debug": "LIST_ALL" } } -} \ No newline at end of file +} diff --git a/application/src/test/resources/standalone/config/build-config.json b/application/src/test/resources/standalone/config/build-config.json index 63df4608944..11ea4a36b2e 100644 --- a/application/src/test/resources/standalone/config/build-config.json +++ b/application/src/test/resources/standalone/config/build-config.json @@ -1,65 +1,69 @@ { "transitServiceStart": "-P3M", - "transitServiceEnd": "P1Y", - "osmCacheDataInMem" : true, - "localFileNamePatterns" : { - "osm" : "(i?)\\.osm\\.pbf$", - "dem" : "(i?)\\.dem\\.tiff?$", - "gtfs" : "(?i)gtfs", - "netex" : "(?i)netex" + "transitServiceEnd": "P1Y", + "osmCacheDataInMem": true, + "localFileNamePatterns": { + "osm": "(i?)\\.osm\\.pbf$", + "dem": "(i?)\\.dem\\.tiff?$", + "gtfs": "(?i)gtfs", + "netex": "(?i)netex" }, "osmDefaults": { "timeZone": "Europe/Rome", "osmTagMapping": "default" }, - "osm": [{ - "source" : "gs://my-bucket/otp-work-dir/norway.osm.pbf", - "timeZone" : "Europe/Oslo", - "osmTagMapping" : "norway" - }], + "osm": [ + { + "source": "gs://my-bucket/otp-work-dir/norway.osm.pbf", + "timeZone": "Europe/Oslo", + "osmTagMapping": "norway" + } + ], "demDefaults": { - "elevationUnitMultiplier" : 1.0 + "elevationUnitMultiplier": 1.0 }, - "dem": [{ - "source" : "gs://my-bucket/otp-work-dir/norway.dem.tiff", - "elevationUnitMultiplier" : 2.5 - }], - "netexDefaults" : { - "feedId" : "EN", - "sharedFilePattern" : "_stops.xml", - "sharedGroupFilePattern" : "_(\\w{3})_shared_data.xml", - "groupFilePattern" : "(\\w{3})_.*\\.xml", - "ignoreFilePattern" : "(temp|tmp)", - "ferryIdsNotAllowedForBicycle" : ["RUT:B107", "RUT:B209"] + "dem": [ + { + "source": "gs://my-bucket/otp-work-dir/norway.dem.tiff", + "elevationUnitMultiplier": 2.5 + } + ], + "netexDefaults": { + "feedId": "EN", + "sharedFilePattern": "_stops.xml", + "sharedGroupFilePattern": "_(\\w{3})_shared_data.xml", + "groupFilePattern": "(\\w{3})_.*\\.xml", + "ignoreFilePattern": "(temp|tmp)", + "ferryIdsNotAllowedForBicycle": ["RUT:B107", "RUT:B209"] }, - "gtfsDefaults" : { - "stationTransferPreference" : "recommended", - "removeRepeatedStops" : true, + "gtfsDefaults": { + "stationTransferPreference": "recommended", + "removeRepeatedStops": true, "discardMinTransferTimes": false, "blockBasedInterlining": true, "maxInterlineDistance": 200 }, - "islandPruning" : { + "islandPruning": { "islandWithStopsMaxSize": 2, "islandWithoutStopsMaxSize": 10, "adaptivePruningFactor": 50.0, "adaptivePruningDistance": 250 }, - "transitFeeds" : [ + "transitFeeds": [ { - "type" : "gtfs", - "feedId" : "SE", - "source" : "https://skanetrafiken.se/download/sweden.gtfs.zip" + "type": "gtfs", + "feedId": "SE", + "source": "https://skanetrafiken.se/download/sweden.gtfs.zip" }, { - "type" : "netex", - "feedId" : "NO", - "source" : "gs://BUCKET/OTP_GCS_WORK_DIR/norway-netex.obj", - "sharedFilePattern" : "_stops.xml", - "sharedGroupFilePattern" : "_(\\w{3})_shared_data.xml", - "groupFilePattern" : "(\\w{3})_.*\\.xml", - "ignoreFilePattern" : "(temp|tmp)" + "type": "netex", + "feedId": "NO", + "source": "gs://BUCKET/OTP_GCS_WORK_DIR/norway-netex.obj", + "sharedFilePattern": "_stops.xml", + "sharedGroupFilePattern": "_(\\w{3})_shared_data.xml", + "groupFilePattern": "(\\w{3})_.*\\.xml", + "ignoreFilePattern": "(temp|tmp)" //"ferryIdsNotAllowedForBicycle" : ["RUT:B107", "RUT:B209"] } ], diff --git a/application/src/test/resources/standalone/config/netex-tutorial/build-config.json b/application/src/test/resources/standalone/config/netex-tutorial/build-config.json index 467580a73a3..5e2788aae5e 100644 --- a/application/src/test/resources/standalone/config/netex-tutorial/build-config.json +++ b/application/src/test/resources/standalone/config/netex-tutorial/build-config.json @@ -17,4 +17,4 @@ } ], "osmCacheDataInMem": true -} \ No newline at end of file +} diff --git a/application/src/test/resources/standalone/config/netex-tutorial/router-config.json b/application/src/test/resources/standalone/config/netex-tutorial/router-config.json index c8f21dd527a..46f36c8c453 100644 --- a/application/src/test/resources/standalone/config/netex-tutorial/router-config.json +++ b/application/src/test/resources/standalone/config/netex-tutorial/router-config.json @@ -16,4 +16,4 @@ "blockReadinessUntilInitialized": true } ] -} \ No newline at end of file +} diff --git a/application/src/test/resources/standalone/config/router-config.json b/application/src/test/resources/standalone/config/router-config.json index f1eac1cb41e..4b6cf30f45d 100644 --- a/application/src/test/resources/standalone/config/router-config.json +++ b/application/src/test/resources/standalone/config/router-config.json @@ -119,12 +119,8 @@ "geoidElevation": false, "maxJourneyDuration": "36h", "unpreferred": { - "agencies": [ - "HSL:123" - ], - "routes": [ - "HSL:456" - ] + "agencies": ["HSL:123"], + "routes": ["HSL:456"] }, "unpreferredCost": "10m + 2.0 x", "streetRoutingTimeout": "5s", @@ -320,9 +316,7 @@ "headers": { "Cache-Control": "max-age=604800" }, - "tags": [ - "source:parkapi" - ] + "tags": ["source:parkapi"] }, { "type": "vehicle-parking", @@ -362,9 +356,7 @@ "Header-Name": "Header-Value" }, "fuzzyTripMatching": false, - "features": [ - "position" - ] + "features": ["position"] }, // Siri-ET over HTTP { @@ -404,8 +396,8 @@ { "type": "siri-azure-et-updater", "topic": "some_topic", - "authenticationType": "SharedAccessKey", - "fullyQualifiedNamespace": "fully_qualified_namespace", + "authenticationType": "SharedAccessKey", + "fullyQualifiedNamespace": "fully_qualified_namespace", "servicebus-url": "service_bus_url", "feedId": "feed_id", "customMidnight": 4, @@ -454,4 +446,3 @@ } ] } - diff --git a/application/src/test/resources/standalone/config/sandbox/build-config-data-overlay.json b/application/src/test/resources/standalone/config/sandbox/build-config-data-overlay.json index 41aac831646..ec348022dff 100644 --- a/application/src/test/resources/standalone/config/sandbox/build-config-data-overlay.json +++ b/application/src/test/resources/standalone/config/sandbox/build-config-data-overlay.json @@ -1,5 +1,5 @@ { - "dataOverlay" : { + "dataOverlay": { "fileName": "graphs/data-file.nc4", "latitudeVariable": "lat", "longitudeVariable": "lon", @@ -30,4 +30,4 @@ } ] } -} \ No newline at end of file +} From 9a52ffbf5f726e9b0a61f98623e2723ae311fbf7 Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Fri, 22 Nov 2024 13:54:32 +0200 Subject: [PATCH 143/169] Update .git-blame-ignore-revs --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index bed6a5ba84b..c232ca6e3d3 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -12,3 +12,6 @@ # Make OTP a multi-module project ead33ffe280dd7caf72cae5ff7a41542e8427636 + +# json file reformatting with prettier +c287575df6798810a69fafc54c8c4e1867b71367 From 1477884b6d8928cb82dfaa799688ce7565acb12c Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Fri, 22 Nov 2024 14:07:09 +0200 Subject: [PATCH 144/169] Add example of a factory method in naming conventions --- doc/dev/decisionrecords/NamingConventions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/dev/decisionrecords/NamingConventions.md b/doc/dev/decisionrecords/NamingConventions.md index 16b37a799bf..324d8275712 100644 --- a/doc/dev/decisionrecords/NamingConventions.md +++ b/doc/dev/decisionrecords/NamingConventions.md @@ -44,6 +44,7 @@ Here is a list of common prefixes used and what to expect. | `listStops() : List/Stream` | List ALL stops in context; return a Collection or Stream (List is preferred). | | `withStop(Stop stop) : Builder` | Set Stop in builder, replacing existing value; return `this` builder. | | `initStop(Stop stop) : void` | Set property _once_; a second call throws an exception. | +| `createStop(String name) : Stop` | Factory methods for creating objects should start with `create` prefix. | | `addStop(Stop stop) : void/Builder` | Add a Stop to a collection of Stops. | | `addStops(Collection stops) : void/Builder` | Add set of Stops to existing set. | | `withBike(Consumer body) : Builder` | For nested builders, use lambdas. | From dfaffd4465770a713a109836e6bc410a2a51c213 Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Fri, 22 Nov 2024 15:03:41 +0000 Subject: [PATCH 145/169] Add changelog entry for #6255 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index 3d0f343e657..f8caa721655 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -51,6 +51,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Apply stricter motor vehicle nothrough traffic rules in Finland [#6254](https://github.com/opentripplanner/OpenTripPlanner/pull/6254) - Add `vehicleRentalsByBbox` query to GTFS GraphQL API [#6186](https://github.com/opentripplanner/OpenTripPlanner/pull/6186) - Improve performance of speculative rental vehicle use in reverse search [#6260](https://github.com/opentripplanner/OpenTripPlanner/pull/6260) +- Fix problem with relaxed-generalized-cost-at-destination [#6255](https://github.com/opentripplanner/OpenTripPlanner/pull/6255) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From f3121446ecffee3c539ce287b7f45f09a099c4b4 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Fri, 22 Nov 2024 21:34:12 +0100 Subject: [PATCH 146/169] Fix NPE when fetching minimumBookingNotice --- .../ext/restapi/mapping/BookingInfoMapper.java | 4 ++-- .../apis/gtfs/datafetchers/BookingInfoImpl.java | 5 +++-- .../transit/model/timetable/booking/BookingInfo.java | 11 +++++------ .../model/timetable/booking/RoutingBookingInfo.java | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/application/src/ext/java/org/opentripplanner/ext/restapi/mapping/BookingInfoMapper.java b/application/src/ext/java/org/opentripplanner/ext/restapi/mapping/BookingInfoMapper.java index b4e3292b435..eafa81195b5 100644 --- a/application/src/ext/java/org/opentripplanner/ext/restapi/mapping/BookingInfoMapper.java +++ b/application/src/ext/java/org/opentripplanner/ext/restapi/mapping/BookingInfoMapper.java @@ -27,8 +27,8 @@ private static ApiBookingInfo mapBookingInfo(BookingInfo info, boolean isPickup) BookingMethodMapper.mapBookingMethods(info.bookingMethods()), BookingTimeMapper.mapBookingTime(info.getEarliestBookingTime()), BookingTimeMapper.mapBookingTime(info.getLatestBookingTime()), - info.getMinimumBookingNotice(), - info.getMaximumBookingNotice(), + info.getMinimumBookingNotice().orElse(null), + info.getMaximumBookingNotice().orElse(null), info.getMessage(), isPickup ? info.getPickupMessage() : null, !isPickup ? info.getDropOffMessage() : null diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImpl.java index 44ee0985542..a3ffda526db 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImpl.java @@ -2,6 +2,7 @@ import graphql.schema.DataFetcher; import graphql.schema.DataFetchingEnvironment; +import java.time.Duration; import org.opentripplanner.apis.gtfs.generated.GraphQLDataFetchers; import org.opentripplanner.transit.model.organization.ContactInfo; import org.opentripplanner.transit.model.timetable.booking.BookingInfo; @@ -31,7 +32,7 @@ public DataFetcher latestBookingTime() { @Override public DataFetcher maximumBookingNoticeSeconds() { - return environment -> getSource(environment).getMaximumBookingNotice().toSeconds(); + return environment -> getSource(environment).getMaximumBookingNotice().map(Duration::toSeconds).orElse(null); } @Override @@ -41,7 +42,7 @@ public DataFetcher message() { @Override public DataFetcher minimumBookingNoticeSeconds() { - return environment -> getSource(environment).getMinimumBookingNotice().toSeconds(); + return environment -> getSource(environment).getMinimumBookingNotice().map(Duration::toSeconds).orElse(null); } @Override diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingInfo.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingInfo.java index b21543b717c..8b48a61ffbe 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingInfo.java +++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/BookingInfo.java @@ -3,6 +3,7 @@ import java.io.Serializable; import java.time.Duration; import java.util.EnumSet; +import java.util.Optional; import javax.annotation.Nullable; import org.opentripplanner.transit.model.organization.ContactInfo; import org.opentripplanner.utils.tostring.ToStringBuilder; @@ -99,14 +100,12 @@ public BookingTime getLatestBookingTime() { return latestBookingTime; } - @Nullable - public Duration getMinimumBookingNotice() { - return minimumBookingNotice; + public Optional getMinimumBookingNotice() { + return Optional.ofNullable(minimumBookingNotice); } - @Nullable - public Duration getMaximumBookingNotice() { - return maximumBookingNotice; + public Optional getMaximumBookingNotice() { + return Optional.ofNullable(maximumBookingNotice); } @Nullable diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfo.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfo.java index 471cff394e2..11ea27d48aa 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfo.java +++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/booking/RoutingBookingInfo.java @@ -151,17 +151,17 @@ Builder withBookingInfo(@Nullable BookingInfo bookingInfo) { return this; } withLatestBookingTime(bookingInfo.getLatestBookingTime()); - withMinimumBookingNotice(bookingInfo.getMinimumBookingNotice()); + withMinimumBookingNotice(bookingInfo.getMinimumBookingNotice().orElse(null)); return this; } - public Builder withLatestBookingTime(BookingTime latestBookingTime) { + public Builder withLatestBookingTime(@Nullable BookingTime latestBookingTime) { this.latestBookingTime = latestBookingTime == null ? NOT_SET : latestBookingTime.relativeTimeSeconds(); return this; } - public Builder withMinimumBookingNotice(Duration minimumBookingNotice) { + public Builder withMinimumBookingNotice(@Nullable Duration minimumBookingNotice) { this.minimumBookingNotice = minimumBookingNotice == null ? NOT_SET : (int) minimumBookingNotice.toSeconds(); return this; From a14df652c8cbf3984aabf59863fd2305e0d905e1 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Fri, 22 Nov 2024 22:02:16 +0100 Subject: [PATCH 147/169] Add test --- .../datafetchers/BookingInfoImplTest.java | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 application/src/test/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImplTest.java diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImplTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImplTest.java new file mode 100644 index 00000000000..9ab76fae1ca --- /dev/null +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImplTest.java @@ -0,0 +1,43 @@ +package org.opentripplanner.apis.gtfs.datafetchers; + +import static graphql.execution.ExecutionContextBuilder.newExecutionContextBuilder; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import graphql.ExecutionInput; +import graphql.execution.ExecutionId; +import graphql.schema.DataFetchingEnvironmentImpl; +import java.time.Duration; +import java.util.Locale; +import java.util.Map; +import org.junit.jupiter.api.Test; +import org.opentripplanner.transit.model.timetable.booking.BookingInfo; + +class BookingInfoImplTest { + + @Test + void map() throws Exception { + + ExecutionInput executionInput = ExecutionInput + .newExecutionInput() + .query("") + .operationName("plan") + .locale(Locale.ENGLISH) + .build(); + + var executionContext = newExecutionContextBuilder() + .executionInput(executionInput) + .executionId(ExecutionId.from(this.getClass().getName())) + .build(); + var env = DataFetchingEnvironmentImpl + .newDataFetchingEnvironment(executionContext) + .arguments(Map.of()) + .source(BookingInfo.of().withMinimumBookingNotice(Duration.ofMinutes(10)).build()) + .build(); + var impl = new BookingInfoImpl(); + var seconds = impl.minimumBookingNoticeSeconds().get(env); + assertEquals(600, seconds); + } + + + +} \ No newline at end of file From 3034d811064e3b9b6486c8ec91acbf8c8f0fbcef Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Fri, 22 Nov 2024 23:05:28 +0200 Subject: [PATCH 148/169] Update doc/dev/decisionrecords/NamingConventions.md Co-authored-by: Thomas Gran --- doc/dev/decisionrecords/NamingConventions.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/dev/decisionrecords/NamingConventions.md b/doc/dev/decisionrecords/NamingConventions.md index 324d8275712..b5fa11628ec 100644 --- a/doc/dev/decisionrecords/NamingConventions.md +++ b/doc/dev/decisionrecords/NamingConventions.md @@ -44,7 +44,8 @@ Here is a list of common prefixes used and what to expect. | `listStops() : List/Stream` | List ALL stops in context; return a Collection or Stream (List is preferred). | | `withStop(Stop stop) : Builder` | Set Stop in builder, replacing existing value; return `this` builder. | | `initStop(Stop stop) : void` | Set property _once_; a second call throws an exception. | -| `createStop(String name) : Stop` | Factory methods for creating objects should start with `create` prefix. | +| `createStop(String name, ...) : Stop` | Factory methods for creating objects should start with `create` prefix. | +| | See (Builder Conventions)[RecordsPOJOsBuilders.md#builder-conventions] for creating objects with builders. | | `addStop(Stop stop) : void/Builder` | Add a Stop to a collection of Stops. | | `addStops(Collection stops) : void/Builder` | Add set of Stops to existing set. | | `withBike(Consumer body) : Builder` | For nested builders, use lambdas. | From 91d67845e70cb7ba78c7cb44dd7b646003fa908c Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Fri, 22 Nov 2024 22:14:44 +0100 Subject: [PATCH 149/169] Add tests --- .../gtfs/datafetchers/BookingInfoImpl.java | 6 +- .../datafetchers/BookingInfoImplTest.java | 59 ++++++++++--------- .../netex/mapping/BookingInfoMapperTest.java | 2 +- .../timetable/booking/BookingInfoTest.java | 2 +- 4 files changed, 38 insertions(+), 31 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImpl.java b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImpl.java index a3ffda526db..0060e6ad7e1 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImpl.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImpl.java @@ -32,7 +32,8 @@ public DataFetcher latestBookingTime() { @Override public DataFetcher maximumBookingNoticeSeconds() { - return environment -> getSource(environment).getMaximumBookingNotice().map(Duration::toSeconds).orElse(null); + return environment -> + getSource(environment).getMaximumBookingNotice().map(Duration::toSeconds).orElse(null); } @Override @@ -42,7 +43,8 @@ public DataFetcher message() { @Override public DataFetcher minimumBookingNoticeSeconds() { - return environment -> getSource(environment).getMinimumBookingNotice().map(Duration::toSeconds).orElse(null); + return environment -> + getSource(environment).getMinimumBookingNotice().map(Duration::toSeconds).orElse(null); } @Override diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImplTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImplTest.java index 9ab76fae1ca..1103024aa61 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImplTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/datafetchers/BookingInfoImplTest.java @@ -2,42 +2,47 @@ import static graphql.execution.ExecutionContextBuilder.newExecutionContextBuilder; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -import graphql.ExecutionInput; import graphql.execution.ExecutionId; +import graphql.schema.DataFetchingEnvironment; import graphql.schema.DataFetchingEnvironmentImpl; import java.time.Duration; -import java.util.Locale; -import java.util.Map; import org.junit.jupiter.api.Test; import org.opentripplanner.transit.model.timetable.booking.BookingInfo; class BookingInfoImplTest { - @Test - void map() throws Exception { + private static final BookingInfoImpl SUBJECT = new BookingInfoImpl(); + private static final Duration TEN_MINUTES = Duration.ofMinutes(10); - ExecutionInput executionInput = ExecutionInput - .newExecutionInput() - .query("") - .operationName("plan") - .locale(Locale.ENGLISH) - .build(); + @Test + void emptyDurations() throws Exception { + var env = dataFetchingEnvironment(BookingInfo.of().build()); + assertNull(SUBJECT.minimumBookingNoticeSeconds().get(env)); + assertNull(SUBJECT.maximumBookingNoticeSeconds().get(env)); + } - var executionContext = newExecutionContextBuilder() - .executionInput(executionInput) - .executionId(ExecutionId.from(this.getClass().getName())) - .build(); - var env = DataFetchingEnvironmentImpl - .newDataFetchingEnvironment(executionContext) - .arguments(Map.of()) - .source(BookingInfo.of().withMinimumBookingNotice(Duration.ofMinutes(10)).build()) - .build(); - var impl = new BookingInfoImpl(); - var seconds = impl.minimumBookingNoticeSeconds().get(env); - assertEquals(600, seconds); - } - - + @Test + void durations() throws Exception { + var env = dataFetchingEnvironment( + BookingInfo + .of() + .withMinimumBookingNotice(TEN_MINUTES) + .withMaximumBookingNotice(TEN_MINUTES) + .build() + ); + assertEquals(600, SUBJECT.minimumBookingNoticeSeconds().get(env)); + assertEquals(600, SUBJECT.maximumBookingNoticeSeconds().get(env)); + } -} \ No newline at end of file + private DataFetchingEnvironment dataFetchingEnvironment(BookingInfo bookingInfo) { + var executionContext = newExecutionContextBuilder() + .executionId(ExecutionId.from(this.getClass().getName())) + .build(); + return DataFetchingEnvironmentImpl + .newDataFetchingEnvironment(executionContext) + .source(bookingInfo) + .build(); + } +} diff --git a/application/src/test/java/org/opentripplanner/netex/mapping/BookingInfoMapperTest.java b/application/src/test/java/org/opentripplanner/netex/mapping/BookingInfoMapperTest.java index e561a6155d3..7b917dcf912 100644 --- a/application/src/test/java/org/opentripplanner/netex/mapping/BookingInfoMapperTest.java +++ b/application/src/test/java/org/opentripplanner/netex/mapping/BookingInfoMapperTest.java @@ -193,6 +193,6 @@ void testMapMinimumBookingNotice() { BookingInfo bookingInfo = subject.map(stopPoint, null, null); - assertEquals(THIRTY_MINUTES, bookingInfo.getMinimumBookingNotice()); + assertEquals(THIRTY_MINUTES, bookingInfo.getMinimumBookingNotice().get()); } } diff --git a/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/BookingInfoTest.java b/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/BookingInfoTest.java index 0bf189a1c29..36587e1f696 100644 --- a/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/BookingInfoTest.java +++ b/application/src/test/java/org/opentripplanner/transit/model/timetable/booking/BookingInfoTest.java @@ -58,7 +58,7 @@ void testBookingInfoWithMinBookingNotice() { .build(); assertNull(subject.getLatestBookingTime()); - assertEquals(minimumBookingNotice, subject.getMinimumBookingNotice()); + assertEquals(minimumBookingNotice, subject.getMinimumBookingNotice().get()); assertEquals( "BookingInfo{bookingMethods: [CALL_DRIVER], minimumBookingNotice: 45m}", From bbcac591c68354ad119b8f19725057045a18bbf1 Mon Sep 17 00:00:00 2001 From: Joel Lappalainen Date: Fri, 22 Nov 2024 23:22:41 +0200 Subject: [PATCH 150/169] Add doc for of, copyOf and build and reorder --- doc/dev/decisionrecords/NamingConventions.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/dev/decisionrecords/NamingConventions.md b/doc/dev/decisionrecords/NamingConventions.md index b5fa11628ec..6aef8d7f7e1 100644 --- a/doc/dev/decisionrecords/NamingConventions.md +++ b/doc/dev/decisionrecords/NamingConventions.md @@ -42,13 +42,16 @@ Here is a list of common prefixes used and what to expect. | `findStop(Criteria criteria) : Optional` | Find one or zero stops; return `Optional`. | | `findStops(Criteria criteria) : List/Stream` | Find 0, 1, or many stops; return a Collection or Stream (List is preferred). | | `listStops() : List/Stream` | List ALL stops in context; return a Collection or Stream (List is preferred). | -| `withStop(Stop stop) : Builder` | Set Stop in builder, replacing existing value; return `this` builder. | | `initStop(Stop stop) : void` | Set property _once_; a second call throws an exception. | -| `createStop(String name, ...) : Stop` | Factory methods for creating objects should start with `create` prefix. | -| | See (Builder Conventions)[RecordsPOJOsBuilders.md#builder-conventions] for creating objects with builders. | +| `createStop(String name, ...) : Stop` | Factory methods for creating objects should start with `create` prefix. | +| | See (Builder Conventions)[RecordsPOJOsBuilders.md#builder-conventions] for creating objects with builders. | | `addStop(Stop stop) : void/Builder` | Add a Stop to a collection of Stops. | | `addStops(Collection stops) : void/Builder` | Add set of Stops to existing set. | | `withBike(Consumer body) : Builder` | For nested builders, use lambdas. | +| `withStop(Stop stop) : Builder` | Set Stop in builder, replacing existing value; return `this` builder. | +| `of(FeedScopedId id) : Builder` | Create new builder instance from `Stop` class. | +| `copyOf() : Builder` | Initialize a new builder instance from `Stop` instance with identical values. | +| `build() : Stop` | Finish building stop with a builder. | These prefixes are also "allowed" but not preferred; they have some kind of negative "force" to them. From 6b2cc822b43e7f7e3ee994b74b6ba71265fe43bb Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Fri, 22 Nov 2024 22:36:05 +0100 Subject: [PATCH 151/169] Apply review feedback --- .../transit/service/DefaultTransitService.java | 12 ++++++++++++ .../transit/service/TimetableRepositoryIndex.java | 10 ++++++++++ .../transit/service/TransitService.java | 8 ++++++++ .../updater/GtfsRealtimeFuzzyTripMatcher.java | 3 +-- .../apis/gtfs/GraphQLIntegrationTest.java | 2 +- .../opentripplanner/model/TripTimeOnDateTest.java | 2 +- .../ScheduledTransitLegReferenceTest.java | 3 +-- .../mappers/TripPatternForDateMapperTest.java | 3 +-- .../model/_data/TimetableRepositoryForTest.java | 10 ++-------- .../transit/service/DefaultTransitServiceTest.java | 7 +++++++ .../vehicle_position/RealtimeVehicleMatcherTest.java | 3 +-- 11 files changed, 45 insertions(+), 18 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java index 5f7cfa95524..a45194a0d2c 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java @@ -599,6 +599,18 @@ public List getTripOnServiceDates(TripOnServiceDateRequest re return getAllTripOnServiceDates().stream().filter(matcher::match).toList(); } + @Override + public boolean containsTrip(FeedScopedId id) { + TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); + if (currentSnapshot != null) { + Trip trip = currentSnapshot.getRealTimeAddedTrip(id); + if (trip != null) { + return true; + } + } + return this.timetableRepositoryIndex.containsTrip(id); + } + /** * TODO OTP2 - This is NOT THREAD-SAFE and is used in the real-time updaters, we need to fix * this when doing the issue #3030. diff --git a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java index 5214d302850..1a801a26996 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java @@ -161,6 +161,16 @@ Trip getTripForId(FeedScopedId tripId) { return tripForId.get(tripId); } + /** + * Checks if the specified trip is contained within the index. + * + * @param tripId the identifier of the trip to check + * @return true if the trip exists in the index map, false otherwise + */ + boolean containsTrip(FeedScopedId tripId) { + return tripForId.containsKey(tripId); + } + TripOnServiceDate getTripOnServiceDateForTripAndDay(TripIdAndServiceDate tripIdAndServiceDate) { return tripOnServiceDateForTripAndDay.get(tripIdAndServiceDate); } diff --git a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java index 7be2a29065a..e2e805da7de 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java @@ -320,4 +320,12 @@ List stopTimesForPatternAtStop( * @return - A list of TripOnServiceDates */ List getTripOnServiceDates(TripOnServiceDateRequest request); + + /** + * Checks if a trip with the given ID exists in the model. + * + * @param id the ID of the trip to check + * @return true if the trip exists, false otherwise + */ + boolean containsTrip(FeedScopedId id); } diff --git a/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java b/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java index 448f01df636..05d0f814263 100644 --- a/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java +++ b/application/src/main/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcher.java @@ -36,8 +36,7 @@ public GtfsRealtimeFuzzyTripMatcher(TransitService transitService) { public TripDescriptor match(String feedId, TripDescriptor trip) { if ( - trip.hasTripId() && - transitService.getTripForId(new FeedScopedId(feedId, trip.getTripId())) != null + trip.hasTripId() && transitService.containsTrip(new FeedScopedId(feedId, trip.getTripId())) ) { // trip_id already exists return trip; diff --git a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java index 5d79c24d05f..88fbe943bba 100644 --- a/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java +++ b/application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLIntegrationTest.java @@ -166,7 +166,7 @@ static void setup() { .trip("123") .withHeadsign(I18NString.of("Trip Headsign")) .build(); - var stopTimes = TEST_MODEL.stopTimesEvery5Minutes(3, trip, T11_00); + var stopTimes = TEST_MODEL.stopTimesEvery5Minutes(3, trip, "11:00"); var tripTimes = TripTimesFactory.tripTimes(trip, stopTimes, DEDUPLICATOR); final TripPattern pattern = TEST_MODEL .pattern(BUS) diff --git a/application/src/test/java/org/opentripplanner/model/TripTimeOnDateTest.java b/application/src/test/java/org/opentripplanner/model/TripTimeOnDateTest.java index 97e34b134bf..7fc2b577fd2 100644 --- a/application/src/test/java/org/opentripplanner/model/TripTimeOnDateTest.java +++ b/application/src/test/java/org/opentripplanner/model/TripTimeOnDateTest.java @@ -17,7 +17,7 @@ void gtfsSequence() { var testModel = TimetableRepositoryForTest.of(); var pattern = testModel.pattern(TransitMode.BUS).build(); var trip = TimetableRepositoryForTest.trip("123").build(); - var stopTimes = testModel.stopTimesEvery5Minutes(3, trip, T11_00); + var stopTimes = testModel.stopTimesEvery5Minutes(3, trip, "11:00"); var tripTimes = TripTimesFactory.tripTimes(trip, stopTimes, new Deduplicator()); diff --git a/application/src/test/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReferenceTest.java b/application/src/test/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReferenceTest.java index 556cfc1ca90..210d58e054e 100644 --- a/application/src/test/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReferenceTest.java +++ b/application/src/test/java/org/opentripplanner/model/plan/legreference/ScheduledTransitLegReferenceTest.java @@ -12,7 +12,6 @@ import org.junit.jupiter.api.Test; import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; import org.opentripplanner.model.calendar.CalendarServiceData; -import org.opentripplanner.model.plan.PlanTestConstants; import org.opentripplanner.model.plan.ScheduledTransitLeg; import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; import org.opentripplanner.transit.model.framework.Deduplicator; @@ -56,7 +55,7 @@ static void buildTransitService() { Trip trip = TimetableRepositoryForTest.trip("1").build(); var tripTimes = TripTimesFactory.tripTimes( trip, - TEST_MODEL.stopTimesEvery5Minutes(5, trip, PlanTestConstants.T11_00), + TEST_MODEL.stopTimesEvery5Minutes(5, trip, "11:00"), new Deduplicator() ); tripTimes.setServiceCode(SERVICE_CODE); diff --git a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TripPatternForDateMapperTest.java b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TripPatternForDateMapperTest.java index 2b0751c7456..9985c3e559f 100644 --- a/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TripPatternForDateMapperTest.java +++ b/application/src/test/java/org/opentripplanner/routing/algorithm/raptoradapter/transit/mappers/TripPatternForDateMapperTest.java @@ -13,7 +13,6 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.opentripplanner.model.Timetable; -import org.opentripplanner.model.plan.PlanTestConstants; import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripPatternForDate; import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; import org.opentripplanner.transit.model.framework.Deduplicator; @@ -38,7 +37,7 @@ public static void setUp() throws Exception { var trip = TimetableRepositoryForTest.trip("1").build(); var tripTimes = TripTimesFactory.tripTimes( trip, - TEST_MODEL.stopTimesEvery5Minutes(5, trip, PlanTestConstants.T11_00), + TEST_MODEL.stopTimesEvery5Minutes(5, trip, "11:00"), new Deduplicator() ); tripTimes.setServiceCode(SERVICE_CODE); diff --git a/application/src/test/java/org/opentripplanner/transit/model/_data/TimetableRepositoryForTest.java b/application/src/test/java/org/opentripplanner/transit/model/_data/TimetableRepositoryForTest.java index 95b398f447e..f8dbf97efb9 100644 --- a/application/src/test/java/org/opentripplanner/transit/model/_data/TimetableRepositoryForTest.java +++ b/application/src/test/java/org/opentripplanner/transit/model/_data/TimetableRepositoryForTest.java @@ -228,20 +228,14 @@ public Place place(String name, double lat, double lon) { *

* The first stop has stop sequence 10, the following one has 20 and so on. */ - public List stopTimesEvery5Minutes(int count, Trip trip, int startTime) { + public List stopTimesEvery5Minutes(int count, Trip trip, String time) { + var startTime = TimeUtils.time(time); return IntStream .range(0, count) .mapToObj(seq -> stopTime(trip, (seq + 1) * 10, startTime + (seq * 60 * 5))) .toList(); } - /** - * @see TimetableRepositoryForTest#stopTimesEvery5Minutes(int, Trip, int) - */ - public List stopTimesEvery5Minutes(int count, Trip trip, String startTime) { - return stopTimesEvery5Minutes(count, trip, TimeUtils.time(startTime)); - } - public StopPattern stopPattern(int numberOfStops) { var builder = StopPattern.create(numberOfStops); for (int i = 0; i < numberOfStops; i++) { diff --git a/application/src/test/java/org/opentripplanner/transit/service/DefaultTransitServiceTest.java b/application/src/test/java/org/opentripplanner/transit/service/DefaultTransitServiceTest.java index 1c0d2a03a0f..ac0530d1ef9 100644 --- a/application/src/test/java/org/opentripplanner/transit/service/DefaultTransitServiceTest.java +++ b/application/src/test/java/org/opentripplanner/transit/service/DefaultTransitServiceTest.java @@ -1,6 +1,7 @@ package org.opentripplanner.transit.service; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; import static org.opentripplanner.transit.model.basic.TransitMode.BUS; import static org.opentripplanner.transit.model.basic.TransitMode.FERRY; import static org.opentripplanner.transit.model.basic.TransitMode.RAIL; @@ -16,6 +17,7 @@ import org.opentripplanner.model.TimetableSnapshot; import org.opentripplanner.transit.model._data.TimetableRepositoryForTest; import org.opentripplanner.transit.model.framework.Deduplicator; +import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.transit.model.network.StopPattern; import org.opentripplanner.transit.model.network.TripPattern; import org.opentripplanner.transit.model.site.RegularStop; @@ -121,4 +123,9 @@ void getPatternForStopsWithRealTime() { Collection patternsForStop = service.getPatternsForStop(STOP_B, true); assertEquals(Set.of(FERRY_PATTERN, RAIL_PATTERN, REAL_TIME_PATTERN), patternsForStop); } + + @Test + void containsTrip() { + assertFalse(service.containsTrip(new FeedScopedId("x", "x"))); + } } diff --git a/application/src/test/java/org/opentripplanner/updater/vehicle_position/RealtimeVehicleMatcherTest.java b/application/src/test/java/org/opentripplanner/updater/vehicle_position/RealtimeVehicleMatcherTest.java index 5fa7c5e8df0..9cdeba6ec3d 100644 --- a/application/src/test/java/org/opentripplanner/updater/vehicle_position/RealtimeVehicleMatcherTest.java +++ b/application/src/test/java/org/opentripplanner/updater/vehicle_position/RealtimeVehicleMatcherTest.java @@ -1,7 +1,6 @@ package org.opentripplanner.updater.vehicle_position; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.opentripplanner.model.plan.PlanTestConstants.T11_00; import static org.opentripplanner.standalone.config.routerconfig.updaters.VehiclePositionsUpdaterConfig.VehiclePositionFeature.OCCUPANCY; import static org.opentripplanner.standalone.config.routerconfig.updaters.VehiclePositionsUpdaterConfig.VehiclePositionFeature.POSITION; import static org.opentripplanner.standalone.config.routerconfig.updaters.VehiclePositionsUpdaterConfig.VehiclePositionFeature.STOP_POSITION; @@ -92,7 +91,7 @@ public void tripNotFoundInPattern() { var trip1 = TimetableRepositoryForTest.trip(tripId).build(); var trip2 = TimetableRepositoryForTest.trip(secondTripId).build(); - var stopTimes = testModel.stopTimesEvery5Minutes(3, trip1, T11_00); + var stopTimes = testModel.stopTimesEvery5Minutes(3, trip1, "11:00"); var pattern = tripPattern(trip1, stopTimes); // Map positions to trips in feed From f40626194bfc67e2bfdac64f41eb2d69d881d397 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 25 Nov 2024 14:58:11 +0100 Subject: [PATCH 152/169] Apply review comments --- .../transit/service/TimetableRepository.java | 1 - .../service/TimetableRepositoryIndex.java | 2 +- .../transit/service/TransitService.java | 2 +- .../GtfsRealtimeFuzzyTripMatcherTest.java | 34 +++++++++---------- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java index 8ae51afe72e..b81dd7d4f14 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java @@ -167,7 +167,6 @@ public TimetableRepository() { public void index() { if (index == null) { LOG.info("Index timetable repository..."); - // the transit model indexing updates the site repository index (flex stops added to the stop index) this.index = new TimetableRepositoryIndex(this); LOG.info("Index timetable repository complete."); } diff --git a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java index 1a801a26996..ca52b710957 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TimetableRepositoryIndex.java @@ -164,7 +164,7 @@ Trip getTripForId(FeedScopedId tripId) { /** * Checks if the specified trip is contained within the index. * - * @param tripId the identifier of the trip to check + * @param tripId the {@link FeedScopedId} of the trip to check * @return true if the trip exists in the index map, false otherwise */ boolean containsTrip(FeedScopedId tripId) { diff --git a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java index e2e805da7de..c5ada6602be 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java @@ -324,7 +324,7 @@ List stopTimesForPatternAtStop( /** * Checks if a trip with the given ID exists in the model. * - * @param id the ID of the trip to check + * @param id the {@link FeedScopedId} of the trip to check * @return true if the trip exists, false otherwise */ boolean containsTrip(FeedScopedId id); diff --git a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java index b1df8a08e6a..fb1e196f7ae 100644 --- a/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java +++ b/application/src/test/java/org/opentripplanner/updater/GtfsRealtimeFuzzyTripMatcherTest.java @@ -78,49 +78,49 @@ static void setup() { @Test void noTripId() { var matcher = matcher(); - TripDescriptor trip1 = matchingTripUpdate().build(); - assertEquals(TRIP.getId().getId(), matcher.match(FEED_ID, trip1).getTripId()); + TripDescriptor trip = matchingTripUpdate().build(); + assertEquals(TRIP_ID, matcher.match(FEED_ID, trip).getTripId()); } @Test void tripIdSetButNotInSchedule() { var matcher = matcher(); - TripDescriptor trip1 = matchingTripUpdate().setTripId("does-not-exist-in-schedule").build(); - assertEquals(TRIP_ID, matcher.match(FEED_ID, trip1).getTripId()); + TripDescriptor trip = matchingTripUpdate().setTripId("does-not-exist-in-schedule").build(); + assertEquals(TRIP_ID, matcher.match(FEED_ID, trip).getTripId()); } @Test void tripIdExistsInSchedule() { var matcher = matcher(); - TripDescriptor trip1 = matchingTripUpdate().setTripId(TRIP_ID).build(); - assertEquals(TRIP_ID, matcher.match(FEED_ID, trip1).getTripId()); + TripDescriptor trip = matchingTripUpdate().setTripId(TRIP_ID).build(); + assertEquals(TRIP_ID, matcher.match(FEED_ID, trip).getTripId()); } @Test void incorrectRoute() { var matcher = matcher(); - TripDescriptor trip1 = matchingTripUpdate().setRouteId("does-not-exists").build(); - assertFalse(matcher.match(FEED_ID, trip1).hasTripId()); + TripDescriptor trip = matchingTripUpdate().setRouteId("does-not-exists").build(); + assertFalse(matcher.match(FEED_ID, trip).hasTripId()); } @Test void incorrectDateFormat() { var matcher = matcher(); - TripDescriptor trip1 = matchingTripUpdate().setStartDate("ZZZ").build(); - assertFalse(matcher.match(FEED_ID, trip1).hasTripId()); + TripDescriptor trip = matchingTripUpdate().setStartDate("ZZZ").build(); + assertFalse(matcher.match(FEED_ID, trip).hasTripId()); } @Test void incorrectDirection() { var matcher = matcher(); - TripDescriptor trip1 = matchingTripUpdate().setDirectionId(1).build(); - assertFalse(matcher.match(FEED_ID, trip1).hasTripId()); + TripDescriptor trip = matchingTripUpdate().setDirectionId(1).build(); + assertFalse(matcher.match(FEED_ID, trip).hasTripId()); } @Test void noMatch() { - // Test matching with "real time", when schedule uses time grater than 24:00 - var trip1 = TripDescriptor + // Test matching with "real time", when schedule uses time greater than 24:00 + var trip = TripDescriptor .newBuilder() .setRouteId("4") .setDirectionId(0) @@ -128,8 +128,8 @@ void noMatch() { .setStartDate("20090915") .build(); // No departure at this time - assertFalse(trip1.hasTripId()); - trip1 = + assertFalse(trip.hasTripId()); + trip = TripDescriptor .newBuilder() .setRouteId("1") @@ -137,7 +137,7 @@ void noMatch() { .setStartDate("20090915") .build(); // Missing direction id - assertFalse(trip1.hasTripId()); + assertFalse(trip.hasTripId()); } @Nested From f1f9d8ae726309565931c901a4f624965bd5e0af Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Mon, 25 Nov 2024 18:18:20 +0100 Subject: [PATCH 153/169] Apply review comments --- .../siri/SiriTimetableSnapshotSource.java | 15 +++++---------- .../rejection/InvalidStopPointRefTest.java | 17 +++++++++++++---- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java b/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java index 6aa068087bd..fd716e7c232 100644 --- a/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java +++ b/application/src/main/java/org/opentripplanner/updater/siri/SiriTimetableSnapshotSource.java @@ -152,6 +152,11 @@ private Result apply( @Nullable SiriFuzzyTripMatcher fuzzyTripMatcher, EntityResolver entityResolver ) { + for (var call : CallWrapper.of(journey)) { + if (StringUtils.hasNoValueOrNullAsString(call.getStopPointRef())) { + return UpdateError.result(null, EMPTY_STOP_POINT_REF, journey.getDataSource()); + } + } boolean shouldAddNewTrip = false; try { shouldAddNewTrip = shouldAddNewTrip(journey, entityResolver); @@ -230,16 +235,6 @@ private Result handleModifiedTrip( return UpdateError.result(trip != null ? trip.getId() : null, NOT_MONITORED, dataSource); } - for (var call : CallWrapper.of(estimatedVehicleJourney)) { - if (StringUtils.hasNoValueOrNullAsString(call.getStopPointRef())) { - return UpdateError.result( - trip != null ? trip.getId() : null, - EMPTY_STOP_POINT_REF, - dataSource - ); - } - } - LocalDate serviceDate = entityResolver.resolveServiceDate(estimatedVehicleJourney); if (serviceDate == null) { diff --git a/application/src/test/java/org/opentripplanner/updater/siri/moduletests/rejection/InvalidStopPointRefTest.java b/application/src/test/java/org/opentripplanner/updater/siri/moduletests/rejection/InvalidStopPointRefTest.java index 93f989b92b4..820f44e3a86 100644 --- a/application/src/test/java/org/opentripplanner/updater/siri/moduletests/rejection/InvalidStopPointRefTest.java +++ b/application/src/test/java/org/opentripplanner/updater/siri/moduletests/rejection/InvalidStopPointRefTest.java @@ -3,8 +3,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.opentripplanner.updater.spi.UpdateResultAssertions.assertFailure; +import java.util.stream.Stream; import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.ValueSource; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; import org.opentripplanner.updater.siri.SiriEtBuilder; import org.opentripplanner.updater.spi.UpdateError; import org.opentripplanner.updater.trip.RealtimeTestConstants; @@ -12,9 +14,15 @@ public class InvalidStopPointRefTest implements RealtimeTestConstants { - @ParameterizedTest - @ValueSource(strings = { "", " ", "\n", "null", " " }) - void rejectEmptyStopPointRef(String invalidRef) { + private static Stream cases() { + return Stream + .of("", " ", " ", "\n", "null", "\t", null) + .flatMap(id -> Stream.of(Arguments.of(id, true), Arguments.of(id, false))); + } + + @ParameterizedTest(name = "invalid id of ''{0}'', extraJourney={1}") + @MethodSource("cases") + void rejectEmptyStopPointRef(String invalidRef, boolean extraJourney) { var env = RealtimeTestEnvironment.siri().build(); // journey contains empty stop point ref elements @@ -23,6 +31,7 @@ void rejectEmptyStopPointRef(String invalidRef) { .withEstimatedVehicleJourneyCode("invalid-journey") .withOperatorRef("unknown-operator") .withLineRef("unknown-line") + .withIsExtraJourney(extraJourney) .withEstimatedCalls(builder -> builder .call(invalidRef) From c3780efdc991e8dead9bec4ce4e3f534d2a28902 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 04:54:32 +0000 Subject: [PATCH 154/169] Update geotools.version to v32.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b520f3cad63..d7c2fdeeec7 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ 172 - 32.0 + 32.1 2.52 2.18.1 3.1.9 From 104827a88ceb5509878568416cf1b0e471585104 Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Tue, 26 Nov 2024 09:50:17 +0000 Subject: [PATCH 155/169] Add changelog entry for #6266 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index f8caa721655..b89da6db247 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -52,6 +52,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Add `vehicleRentalsByBbox` query to GTFS GraphQL API [#6186](https://github.com/opentripplanner/OpenTripPlanner/pull/6186) - Improve performance of speculative rental vehicle use in reverse search [#6260](https://github.com/opentripplanner/OpenTripPlanner/pull/6260) - Fix problem with relaxed-generalized-cost-at-destination [#6255](https://github.com/opentripplanner/OpenTripPlanner/pull/6255) +- Reject SIRI-ET updates with empty StopPointRefs [#6266](https://github.com/opentripplanner/OpenTripPlanner/pull/6266) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From cfbc7e00d58b15367e6a52a253a2e1c0325eb84e Mon Sep 17 00:00:00 2001 From: OTP Changelog Bot Date: Tue, 26 Nov 2024 09:57:09 +0000 Subject: [PATCH 156/169] Add changelog entry for #6250 [ci skip] --- doc/user/Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/user/Changelog.md b/doc/user/Changelog.md index b89da6db247..17a54ede4ae 100644 --- a/doc/user/Changelog.md +++ b/doc/user/Changelog.md @@ -53,6 +53,7 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle - Improve performance of speculative rental vehicle use in reverse search [#6260](https://github.com/opentripplanner/OpenTripPlanner/pull/6260) - Fix problem with relaxed-generalized-cost-at-destination [#6255](https://github.com/opentripplanner/OpenTripPlanner/pull/6255) - Reject SIRI-ET updates with empty StopPointRefs [#6266](https://github.com/opentripplanner/OpenTripPlanner/pull/6266) +- Allow GTFS fuzzy trip matching even when trip descriptor has an id [#6250](https://github.com/opentripplanner/OpenTripPlanner/pull/6250) [](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE) ## 2.6.0 (2024-09-18) From 106f8ec159af6000d5a98596093d3242b5e6fe77 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Tue, 26 Nov 2024 15:45:29 +0100 Subject: [PATCH 157/169] Improve wording of GTFS-RT failure messages --- .../updater/alert/GtfsRealtimeAlertsUpdater.java | 2 +- .../updater/trip/GtfsRealtimeTripUpdateSource.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/updater/alert/GtfsRealtimeAlertsUpdater.java b/application/src/main/java/org/opentripplanner/updater/alert/GtfsRealtimeAlertsUpdater.java index b71dad6a656..a5be5ef4185 100644 --- a/application/src/main/java/org/opentripplanner/updater/alert/GtfsRealtimeAlertsUpdater.java +++ b/application/src/main/java/org/opentripplanner/updater/alert/GtfsRealtimeAlertsUpdater.java @@ -88,7 +88,7 @@ protected void runPolling() { lastTimestamp = feedTimestamp; } catch (Exception e) { - LOG.error("Error reading gtfs-realtime feed from " + url, e); + LOG.error("Failed to process GTFS-RT Alerts feed from {}", url, e); } } } diff --git a/application/src/main/java/org/opentripplanner/updater/trip/GtfsRealtimeTripUpdateSource.java b/application/src/main/java/org/opentripplanner/updater/trip/GtfsRealtimeTripUpdateSource.java index 0b20a4c22c7..f3d3c62d6ea 100644 --- a/application/src/main/java/org/opentripplanner/updater/trip/GtfsRealtimeTripUpdateSource.java +++ b/application/src/main/java/org/opentripplanner/updater/trip/GtfsRealtimeTripUpdateSource.java @@ -73,7 +73,7 @@ public List getUpdates() { if (feedEntity.hasTripUpdate()) updates.add(feedEntity.getTripUpdate()); } } catch (Exception e) { - LOG.error("Failed to parse GTFS-RT feed from {}", url, e); + LOG.error("Failed to process GTFS-RT TripUpdates feed from {}", url, e); } return updates; } From ccd1d9a02e185aca9860e5063a35aa463d5ff912 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 06:30:00 +0000 Subject: [PATCH 158/169] chore(deps): update dependency vite to v6 --- client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/package.json b/client/package.json index d511ba477bc..261d73e00b4 100644 --- a/client/package.json +++ b/client/package.json @@ -50,7 +50,7 @@ "jsdom": "25.0.1", "prettier": "3.3.3", "typescript": "5.6.3", - "vite": "5.4.11", + "vite": "6.0.1", "vitest": "2.1.5" } } From 1d27bc245d88bba22f483ebbff29d457faf2700a Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 27 Nov 2024 13:29:47 +0100 Subject: [PATCH 159/169] Apply suggestions from code review Co-authored-by: Thomas Gran --- .../vehicleparking/internal/DefaultVehicleParkingService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java index cb4f6680b82..ef6be50a253 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java @@ -52,7 +52,7 @@ public Collection listVehicleParkings() { } @Override - public ImmutableListMultimap listVehicleParkingGroups() { + public ListMultimap listVehicleParkingGroups() { return repository.getVehicleParkingGroups(); } From b2357d1c2be5c0e7830f1446028db6e5b9c6d713 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 27 Nov 2024 13:34:42 +0100 Subject: [PATCH 160/169] Return more abstract types --- .../service/vehicleparking/VehicleParkingRepository.java | 4 ++-- .../internal/DefaultVehicleParkingRepository.java | 3 ++- .../vehicleparking/internal/DefaultVehicleParkingService.java | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java index ae4094d904e..7d9e4f110ce 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/VehicleParkingRepository.java @@ -1,6 +1,6 @@ package org.opentripplanner.service.vehicleparking; -import com.google.common.collect.ImmutableListMultimap; +import com.google.common.collect.ListMultimap; import java.util.Collection; import org.opentripplanner.service.vehicleparking.model.VehicleParking; import org.opentripplanner.service.vehicleparking.model.VehicleParkingGroup; @@ -15,5 +15,5 @@ void updateVehicleParking( ); Collection listVehicleParkings(); - ImmutableListMultimap getVehicleParkingGroups(); + ListMultimap getVehicleParkingGroups(); } diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java index e0714e74ee8..ef8f9db99bf 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingRepository.java @@ -2,6 +2,7 @@ import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ImmutableListMultimap; +import com.google.common.collect.ListMultimap; import com.google.common.collect.Multimap; import jakarta.inject.Inject; import jakarta.inject.Singleton; @@ -71,7 +72,7 @@ public Collection listVehicleParkings() { } @Override - public ImmutableListMultimap getVehicleParkingGroups() { + public ListMultimap getVehicleParkingGroups() { return vehicleParkingGroups; } } diff --git a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java index ef6be50a253..b874c4338b7 100644 --- a/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java +++ b/application/src/main/java/org/opentripplanner/service/vehicleparking/internal/DefaultVehicleParkingService.java @@ -1,6 +1,6 @@ package org.opentripplanner.service.vehicleparking.internal; -import com.google.common.collect.ImmutableListMultimap; +import com.google.common.collect.ListMultimap; import jakarta.inject.Inject; import jakarta.inject.Singleton; import java.io.Serializable; From 8a9b964cc7184440aef0c803a7b8f10a1f377af8 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 27 Nov 2024 13:40:44 +0100 Subject: [PATCH 161/169] Use shorter parameter name --- .../transit/service/DefaultTransitService.java | 6 +++--- .../org/opentripplanner/transit/service/TransitService.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java index 9af27b8bee2..8557ce21440 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java @@ -531,17 +531,17 @@ private TimetableSnapshot lazyGetTimeTableSnapShot() { } @Override - public TripOnServiceDate getTripOnServiceDate(FeedScopedId tripOnServiceDateId) { + public TripOnServiceDate getTripOnServiceDate(FeedScopedId id) { TimetableSnapshot currentSnapshot = lazyGetTimeTableSnapShot(); if (currentSnapshot != null) { TripOnServiceDate tripOnServiceDate = currentSnapshot.getRealTimeAddedTripOnServiceDateById( - tripOnServiceDateId + id ); if (tripOnServiceDate != null) { return tripOnServiceDate; } } - return timetableRepository.getTripOnServiceDateById(tripOnServiceDateId); + return timetableRepository.getTripOnServiceDateById(id); } @Override diff --git a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java index 0caed5417a5..863035950eb 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java @@ -242,7 +242,7 @@ List findTripTimeOnDate( /** * Return the TripOnServiceDate for a given id, including real-time updates. */ - TripOnServiceDate getTripOnServiceDate(FeedScopedId datedServiceJourneyId); + TripOnServiceDate getTripOnServiceDate(FeedScopedId id); Collection listTripsOnServiceDate(); From 1f56e43a0f18b8497bae068d155672041cb41131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Erik=20St=C3=B8wer?= Date: Wed, 27 Nov 2024 19:51:14 +0100 Subject: [PATCH 162/169] Upgrade vite react plugin to vite v6 compatible version --- client/package-lock.json | 2039 ++++++++++++++++++++++++++------------ client/package.json | 2 +- 2 files changed, 1430 insertions(+), 611 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index e1e00b4e99d..36c05bdf4f1 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -29,7 +29,7 @@ "@types/react-dom": "18.3.1", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", - "@vitejs/plugin-react": "4.3.3", + "@vitejs/plugin-react": "4.3.4", "@vitest/coverage-v8": "2.1.5", "eslint": "8.57.1", "eslint-config-prettier": "9.1.0", @@ -41,7 +41,7 @@ "jsdom": "25.0.1", "prettier": "3.3.3", "typescript": "5.6.3", - "vite": "5.4.11", + "vite": "6.0.1", "vitest": "2.1.5" } }, @@ -215,13 +215,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", - "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/highlight": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -229,32 +229,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.8.tgz", - "integrity": "sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", + "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.8.tgz", - "integrity": "sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", "dev": true, - "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helpers": "^7.25.7", - "@babel/parser": "^7.25.8", - "@babel/template": "^7.25.7", - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.8", + "@babel/code-frame": "^7.26.0", + "@babel/generator": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.0", + "@babel/parser": "^7.26.0", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -270,13 +268,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz", - "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", + "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.25.7", + "@babel/parser": "^7.26.2", + "@babel/types": "^7.26.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -298,14 +296,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", - "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", + "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.25.7", - "@babel/helper-validator-option": "^7.25.7", + "@babel/compat-data": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -374,30 +371,27 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", - "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", - "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.25.7", - "@babel/helper-simple-access": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "@babel/traverse": "^7.25.7" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -419,11 +413,10 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", - "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -485,151 +478,52 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", - "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", - "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", - "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", - "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", - "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", + "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", - "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.25.8" + "@babel/types": "^7.26.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -1019,13 +913,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.7.tgz", - "integrity": "sha512-JD9MUnLbPL0WdVK8AWC7F7tTG2OS6u/AKKnsK+NdRhUiVdnzyR1S3kKQCaRLOiaULvUiqK6Z4JQE635VgtCFeg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.9.tgz", + "integrity": "sha512-y8quW6p0WHkEhmErnfe58r7x0A70uKphQm8Sp8cV7tjNQwK56sNVK0M73LK3WuYmsuyrftut4xAkjjgU0twaMg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1035,13 +928,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.7.tgz", - "integrity": "sha512-S/JXG/KrbIY06iyJPKfxr0qRxnhNOdkNXYBl/rmwgDd72cQLH9tEGkDm/yJPGvcSIUoikzfjMios9i+xT/uv9w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.9.tgz", + "integrity": "sha512-+iqjT8xmXhhYv4/uiYd8FNQsraMFZIfxVSqxxVSZP0WbbSAWvBXAul0m/zu+7Vv4O/3WtApy9pmaTMiumEZgfg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1109,32 +1001,30 @@ } }, "node_modules/@babel/template": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", - "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz", - "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7", + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -1143,15 +1033,13 @@ } }, "node_modules/@babel/types": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", - "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1164,394 +1052,387 @@ "dev": true }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", "cpu": [ "ppc64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "aix" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", "cpu": [ "arm" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", "cpu": [ "arm" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", "cpu": [ "ia32" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", "cpu": [ "loong64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", "cpu": [ "mips64el" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", "cpu": [ "ppc64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", "cpu": [ "riscv64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", "cpu": [ "s390x" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", "cpu": [ "ia32" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@eslint-community/eslint-utils": { @@ -3156,224 +3037,234 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.2.tgz", - "integrity": "sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.4.tgz", + "integrity": "sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw==", "cpu": [ "arm" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.2.tgz", - "integrity": "sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.4.tgz", + "integrity": "sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.2.tgz", - "integrity": "sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.4.tgz", + "integrity": "sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.2.tgz", - "integrity": "sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.4.tgz", + "integrity": "sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" ] }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.2.tgz", - "integrity": "sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==", + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.4.tgz", + "integrity": "sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw==", "cpu": [ - "arm" + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.4.tgz", + "integrity": "sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.4.tgz", + "integrity": "sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w==", + "cpu": [ + "arm" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.2.tgz", - "integrity": "sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.4.tgz", + "integrity": "sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A==", "cpu": [ "arm" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.2.tgz", - "integrity": "sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.4.tgz", + "integrity": "sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.2.tgz", - "integrity": "sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.4.tgz", + "integrity": "sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.2.tgz", - "integrity": "sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.4.tgz", + "integrity": "sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ==", "cpu": [ "ppc64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.2.tgz", - "integrity": "sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.4.tgz", + "integrity": "sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw==", "cpu": [ "riscv64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.2.tgz", - "integrity": "sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.4.tgz", + "integrity": "sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg==", "cpu": [ "s390x" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.2.tgz", - "integrity": "sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.4.tgz", + "integrity": "sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.2.tgz", - "integrity": "sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.4.tgz", + "integrity": "sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.2.tgz", - "integrity": "sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.4.tgz", + "integrity": "sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.2.tgz", - "integrity": "sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.4.tgz", + "integrity": "sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ==", "cpu": [ "ia32" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.2.tgz", - "integrity": "sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.4.tgz", + "integrity": "sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" @@ -3491,9 +3382,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true }, "node_modules/@types/geojson": { @@ -3832,15 +3723,14 @@ "dev": true }, "node_modules/@vitejs/plugin-react": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.3.tgz", - "integrity": "sha512-NooDe9GpHGqNns1i8XDERg0Vsg5SSYRhRxxyTGogUdkdNt47jal+fbuYi+Yfq6pzRCKXyoPcWisfxE6RIM3GKA==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.4.tgz", + "integrity": "sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/core": "^7.25.2", - "@babel/plugin-transform-react-jsx-self": "^7.24.7", - "@babel/plugin-transform-react-jsx-source": "^7.24.7", + "@babel/core": "^7.26.0", + "@babel/plugin-transform-react-jsx-self": "^7.25.9", + "@babel/plugin-transform-react-jsx-source": "^7.25.9", "@types/babel__core": "^7.20.5", "react-refresh": "^0.14.2" }, @@ -3848,7 +3738,7 @@ "node": "^14.18.0 || >=16.0.0" }, "peerDependencies": { - "vite": "^4.2.0 || ^5.0.0" + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0" } }, "node_modules/@vitest/coverage-v8": { @@ -3900,33 +3790,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/@vitest/mocker": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.5.tgz", - "integrity": "sha512-XYW6l3UuBmitWqSUXTNXcVBUCRytDogBsWuNXQijc00dtnU/9OqpXWp4OJroVrad/gLIomAq9aW8yWDBtMthhQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "2.1.5", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.12" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, "node_modules/@vitest/pretty-format": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.5.tgz", @@ -5562,42 +5425,42 @@ } }, "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", "dev": true, "hasInstallScript": true, - "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" } }, "node_modules/escalade": { @@ -6129,7 +5992,6 @@ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, - "license": "MIT", "dependencies": { "@types/estree": "^1.0.0" } @@ -8399,9 +8261,9 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -8965,11 +8827,10 @@ } }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", - "dev": true, - "license": "ISC" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true }, "node_modules/picomatch": { "version": "2.3.1", @@ -8993,9 +8854,9 @@ } }, "node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "dev": true, "funding": [ { @@ -9011,10 +8872,9 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.1.0", + "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, "engines": { @@ -9471,13 +9331,12 @@ } }, "node_modules/rollup": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.2.tgz", - "integrity": "sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.4.tgz", + "integrity": "sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw==", "dev": true, - "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -9487,22 +9346,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.21.2", - "@rollup/rollup-android-arm64": "4.21.2", - "@rollup/rollup-darwin-arm64": "4.21.2", - "@rollup/rollup-darwin-x64": "4.21.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.21.2", - "@rollup/rollup-linux-arm-musleabihf": "4.21.2", - "@rollup/rollup-linux-arm64-gnu": "4.21.2", - "@rollup/rollup-linux-arm64-musl": "4.21.2", - "@rollup/rollup-linux-powerpc64le-gnu": "4.21.2", - "@rollup/rollup-linux-riscv64-gnu": "4.21.2", - "@rollup/rollup-linux-s390x-gnu": "4.21.2", - "@rollup/rollup-linux-x64-gnu": "4.21.2", - "@rollup/rollup-linux-x64-musl": "4.21.2", - "@rollup/rollup-win32-arm64-msvc": "4.21.2", - "@rollup/rollup-win32-ia32-msvc": "4.21.2", - "@rollup/rollup-win32-x64-msvc": "4.21.2", + "@rollup/rollup-android-arm-eabi": "4.27.4", + "@rollup/rollup-android-arm64": "4.27.4", + "@rollup/rollup-darwin-arm64": "4.27.4", + "@rollup/rollup-darwin-x64": "4.27.4", + "@rollup/rollup-freebsd-arm64": "4.27.4", + "@rollup/rollup-freebsd-x64": "4.27.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.27.4", + "@rollup/rollup-linux-arm-musleabihf": "4.27.4", + "@rollup/rollup-linux-arm64-gnu": "4.27.4", + "@rollup/rollup-linux-arm64-musl": "4.27.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.27.4", + "@rollup/rollup-linux-riscv64-gnu": "4.27.4", + "@rollup/rollup-linux-s390x-gnu": "4.27.4", + "@rollup/rollup-linux-x64-gnu": "4.27.4", + "@rollup/rollup-linux-x64-musl": "4.27.4", + "@rollup/rollup-win32-arm64-msvc": "4.27.4", + "@rollup/rollup-win32-ia32-msvc": "4.27.4", + "@rollup/rollup-win32-x64-msvc": "4.27.4", "fsevents": "~2.3.2" } }, @@ -10322,15 +10183,6 @@ "node": ">=0.6.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -10731,21 +10583,20 @@ } }, "node_modules/vite": { - "version": "5.4.11", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", - "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.0.1.tgz", + "integrity": "sha512-Ldn6gorLGr4mCdFnmeAOLweJxZ34HjKnDm4HGo6P66IEqTxQb36VEdFJQENKxWjupNfoIjvRUnswjn1hpYEpjQ==", "dev": true, - "license": "MIT", "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" + "esbuild": "^0.24.0", + "postcss": "^8.4.49", + "rollup": "^4.23.0" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": "^18.0.0 || >=20.0.0" + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" }, "funding": { "url": "https://github.com/vitejs/vite?sponsor=1" @@ -10754,19 +10605,25 @@ "fsevents": "~2.3.3" }, "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", - "terser": "^5.4.0" + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" }, "peerDependenciesMeta": { "@types/node": { "optional": true }, + "jiti": { + "optional": true + }, "less": { "optional": true }, @@ -10787,6 +10644,12 @@ }, "terser": { "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true } } }, @@ -10813,122 +10676,1078 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/vitest": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.5.tgz", - "integrity": "sha512-P4ljsdpuzRTPI/kbND2sDZ4VmieerR2c9szEZpjc+98Z9ebvnXmM5+0tHEKqYZumXqlvnmfWsjeFOjXVriDG7A==", + "node_modules/vite-node/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/expect": "2.1.5", - "@vitest/mocker": "2.1.5", - "@vitest/pretty-format": "^2.1.5", - "@vitest/runner": "2.1.5", - "@vitest/snapshot": "2.1.5", - "@vitest/spy": "2.1.5", - "@vitest/utils": "2.1.5", - "chai": "^5.1.2", - "debug": "^4.3.7", - "expect-type": "^1.1.0", - "magic-string": "^0.30.12", - "pathe": "^1.1.2", - "std-env": "^3.8.0", - "tinybench": "^2.9.0", - "tinyexec": "^0.3.1", - "tinypool": "^1.0.1", - "tinyrainbow": "^1.2.0", - "vite": "^5.0.0", - "vite-node": "2.1.5", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.1.5", - "@vitest/ui": "2.1.5", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "node_modules/vt-pbf": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/vt-pbf/-/vt-pbf-3.1.3.tgz", - "integrity": "sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==", - "dependencies": { - "@mapbox/point-geometry": "0.1.0", - "@mapbox/vector-tile": "^1.3.1", - "pbf": "^3.2.1" + "node": ">=12" } }, - "node_modules/w3c-xmlserializer": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", - "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "node_modules/vite-node/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "xml-name-validator": "^5.0.0" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=18" - } - }, - "node_modules/warning": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", - "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", - "dependencies": { - "loose-envify": "^1.0.0" - } - }, - "node_modules/wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dev": true, - "dependencies": { - "defaults": "^1.0.3" + "node": ">=12" } }, - "node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "node_modules/vite-node/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "android" + ], "engines": { "node": ">=12" } }, - "node_modules/whatwg-encoding": { - "version": "3.1.1", + "node_modules/vite-node/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite-node/node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/vite-node/node_modules/vite": { + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", + "dev": true, + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vitest": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.5.tgz", + "integrity": "sha512-P4ljsdpuzRTPI/kbND2sDZ4VmieerR2c9szEZpjc+98Z9ebvnXmM5+0tHEKqYZumXqlvnmfWsjeFOjXVriDG7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "2.1.5", + "@vitest/mocker": "2.1.5", + "@vitest/pretty-format": "^2.1.5", + "@vitest/runner": "2.1.5", + "@vitest/snapshot": "2.1.5", + "@vitest/spy": "2.1.5", + "@vitest/utils": "2.1.5", + "chai": "^5.1.2", + "debug": "^4.3.7", + "expect-type": "^1.1.0", + "magic-string": "^0.30.12", + "pathe": "^1.1.2", + "std-env": "^3.8.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.1", + "tinypool": "^1.0.1", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0", + "vite-node": "2.1.5", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "2.1.5", + "@vitest/ui": "2.1.5", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vitest/node_modules/@vitest/mocker": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.5.tgz", + "integrity": "sha512-XYW6l3UuBmitWqSUXTNXcVBUCRytDogBsWuNXQijc00dtnU/9OqpXWp4OJroVrad/gLIomAq9aW8yWDBtMthhQ==", + "dev": true, + "dependencies": { + "@vitest/spy": "2.1.5", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.12" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/vitest/node_modules/vite": { + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", + "dev": true, + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vt-pbf": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vt-pbf/-/vt-pbf-3.1.3.tgz", + "integrity": "sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==", + "dependencies": { + "@mapbox/point-geometry": "0.1.0", + "@mapbox/vector-tile": "^1.3.1", + "pbf": "^3.2.1" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "dev": true, + "dependencies": { + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", "dev": true, @@ -11183,9 +12002,9 @@ "dev": true }, "node_modules/yaml": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz", - "integrity": "sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", + "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", "dev": true, "bin": { "yaml": "bin.mjs" diff --git a/client/package.json b/client/package.json index 261d73e00b4..57320f35540 100644 --- a/client/package.json +++ b/client/package.json @@ -38,7 +38,7 @@ "@types/react-dom": "18.3.1", "@typescript-eslint/eslint-plugin": "7.18.0", "@typescript-eslint/parser": "7.18.0", - "@vitejs/plugin-react": "4.3.3", + "@vitejs/plugin-react": "4.3.4", "@vitest/coverage-v8": "2.1.5", "eslint": "8.57.1", "eslint-config-prettier": "9.1.0", From 2cc3ce421777221e822d979763135db1bba37cd6 Mon Sep 17 00:00:00 2001 From: OTP Bot Date: Wed, 27 Nov 2024 19:20:22 +0000 Subject: [PATCH 163/169] Upgrade debug client to version 2024/11/2024-11-27T19:19 --- application/src/client/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/client/index.html b/application/src/client/index.html index e8872ab33cd..19ee598b816 100644 --- a/application/src/client/index.html +++ b/application/src/client/index.html @@ -5,8 +5,8 @@ OTP Debug Client - - + +

From 669d71f53102b629a2d33ce2544481cf04ce1d24 Mon Sep 17 00:00:00 2001 From: OTP Serialization Version Bot Date: Thu, 28 Nov 2024 11:53:30 +0000 Subject: [PATCH 164/169] Bump serialization version id for #6246 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b42ab78d978..2bc204d7c05 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ - 172 + 173 32.0 2.52 From dee1a4762e88f9e706b1167eaee4a7e36730a4bc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:53:53 +0000 Subject: [PATCH 165/169] fix(deps): update dependency com.fasterxml.jackson.datatype:jackson-datatype-jdk8 to v2.18.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b42ab78d978..100d489a84a 100644 --- a/pom.xml +++ b/pom.xml @@ -62,7 +62,7 @@ 32.0 2.52 - 2.18.1 + 2.18.2 3.1.9 5.11.3 1.13.7 From ace254e3c48b2035d1b45aedb4dd27dbd6b48cb8 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Thu, 28 Nov 2024 14:00:10 +0100 Subject: [PATCH 166/169] Update renovate rules for jackson, dagger [ci skip] --- renovate.json5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renovate.json5 b/renovate.json5 index b46a098392a..d34b8573649 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -145,8 +145,8 @@ { "description": "give some projects time to publish a changelog before opening the PR", "matchPackageNames": [ - "com.google.dagger:", - "com.fasterxml.jackson" + "com.google.dagger:{/,}**", + "com.fasterxml.jackson:{/,}**" ], "minimumReleaseAge": "1 week" }, From db171d254e2b4b5b9576037830e6a9e76310de96 Mon Sep 17 00:00:00 2001 From: Eivind Morris Bakke Date: Thu, 28 Nov 2024 16:04:17 +0100 Subject: [PATCH 167/169] Add a matcher API for filters in the transit service used for serviceJourney lookup (#6207) * Removes some unused functions from TransitService and TripOnServiceDate * Adds filtering logic to the serviceJourneys Transmodel GraphQL query. * Fixes a typo that carried over from a documentation copy. * Resolving merge conflict. * Addresses comments in review - updates naming to reflect clear division between netex and OTP internals. * Applies formatting. * Fixes formatting and some residual merge issues. * Addresses comments in PR. Importantly this creates the CriteriaCollection type which allows for checking features about collections of criteria independently of the collection type. * Applies results from prettier to CriteriaCollectionTest. * Addresses comments from review. Adds formatting to API and md documentation, and adds an exception thrown for invalid calls to values in CriteriaCollection. * Renames methods in CriteriaCollection as discussed in code review. * Addresses comments from code review. * Changes name of CriteriaCollection to FilterValueCollection. * Adds documentation to clarify usage and intent of the FilterValueCollection. * Fixes potential null values in request builders and exception throwing in get() method. * Addresses comments from code review. * Changes name of FilterValueCollection to FilterValues. * Creates the RequiredFilterValues and FilterValuesEmptyIsEverything subclasses of the now abstract FilterValues class. * Apply suggestions from code review Co-authored-by: Thomas Gran * Addresses comments from code review. * Makes a method name change. * asserts that exception strings in the RequiredFilterValuesTest are as expected. * Fixes some issues left over from resolving merge conflicts. --------- Co-authored-by: Thomas Gran --- .../transmodel/TransmodelGraphQLSchema.java | 64 ++++--- .../timetable/DatedServiceJourneyQuery.java | 47 ++++-- .../transit/api/model/FilterValues.java | 86 ++++++++++ .../model/FilterValuesEmptyIsEverything.java | 19 +++ .../api/model/RequiredFilterValues.java | 24 +++ .../api/request/TripOnServiceDateRequest.java | 82 +++++---- .../TripOnServiceDateRequestBuilder.java | 70 +++++--- .../transit/api/request/TripRequest.java | 51 ++++++ .../api/request/TripRequestBuilder.java | 51 ++++++ .../model/filter/expr/ContainsMatcher.java | 2 +- .../model/filter/expr/ExpressionBuilder.java | 11 +- .../filter/transit/TripMatcherFactory.java | 75 +++++++++ .../TripOnServiceDateMatcherFactory.java | 36 ++-- .../model/timetable/TripOnServiceDate.java | 4 - .../service/DefaultTransitService.java | 28 ++-- .../transit/service/TransitService.java | 14 +- .../apis/transmodel/schema.graphql | 10 +- .../FilterValuesEmptyIsEverythingTest.java | 22 +++ .../api/model/RequiredFilterValuesTest.java | 32 ++++ .../transit/TripMatcherFactoryTest.java | 157 ++++++++++++++++++ .../TripOnServiceDateMatcherFactoryTest.java | 71 +++++--- doc/dev/decisionrecords/NamingConventions.md | 11 ++ 22 files changed, 783 insertions(+), 184 deletions(-) create mode 100644 application/src/main/java/org/opentripplanner/transit/api/model/FilterValues.java create mode 100644 application/src/main/java/org/opentripplanner/transit/api/model/FilterValuesEmptyIsEverything.java create mode 100644 application/src/main/java/org/opentripplanner/transit/api/model/RequiredFilterValues.java create mode 100644 application/src/main/java/org/opentripplanner/transit/api/request/TripRequest.java create mode 100644 application/src/main/java/org/opentripplanner/transit/api/request/TripRequestBuilder.java create mode 100644 application/src/main/java/org/opentripplanner/transit/model/filter/transit/TripMatcherFactory.java create mode 100644 application/src/test/java/org/opentripplanner/transit/api/model/FilterValuesEmptyIsEverythingTest.java create mode 100644 application/src/test/java/org/opentripplanner/transit/api/model/RequiredFilterValuesTest.java create mode 100644 application/src/test/java/org/opentripplanner/transit/model/filter/transit/TripMatcherFactoryTest.java diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java b/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java index 1a62ef7f5b1..922f9f5244b 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java @@ -114,6 +114,8 @@ import org.opentripplanner.routing.graphfinder.PlaceAtDistance; import org.opentripplanner.routing.graphfinder.PlaceType; import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; +import org.opentripplanner.transit.api.model.FilterValues; +import org.opentripplanner.transit.api.request.TripRequest; import org.opentripplanner.transit.model.basic.TransitMode; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.transit.model.network.Route; @@ -1261,14 +1263,14 @@ private GraphQLSchema create() { GraphQLFieldDefinition .newFieldDefinition() .name("serviceJourneys") - .description("Get all service journeys") + .description("Get all _service journeys_") .withDirective(TransmodelDirectives.TIMING_DATA) .type(new GraphQLNonNull(new GraphQLList(serviceJourneyType))) .argument( GraphQLArgument .newArgument() .name("lines") - .description("Set of ids of lines to fetch serviceJourneys for.") + .description("Set of ids of _lines_ to fetch _service journeys_ for.") .type(new GraphQLList(Scalars.GraphQLID)) .build() ) @@ -1276,7 +1278,7 @@ private GraphQLSchema create() { GraphQLArgument .newArgument() .name("privateCodes") - .description("Set of ids of private codes to fetch serviceJourneys for.") + .description("Set of ids of _private codes_ to fetch _service journeys_ for.") .type(new GraphQLList(Scalars.GraphQLString)) .build() ) @@ -1284,7 +1286,7 @@ private GraphQLSchema create() { GraphQLArgument .newArgument() .name("activeDates") - .description("Set of ids of active dates to fetch serviceJourneys for.") + .description("Set of _operating days_ to fetch _service journeys_ for.") .type(new GraphQLList(TransmodelScalars.DATE_SCALAR)) .build() ) @@ -1292,45 +1294,37 @@ private GraphQLSchema create() { GraphQLArgument .newArgument() .name("authorities") - .description("Set of ids of authorities to fetch serviceJourneys for.") + .description("Set of ids of _authorities_ to fetch _service journeys_ for.") .type(new GraphQLList(Scalars.GraphQLString)) .build() ) .dataFetcher(environment -> { - List lineIds = mapIDsToDomainNullSafe( - environment.getArgumentOrDefault("lines", List.of()) + var authorities = FilterValues.ofEmptyIsEverything( + "authorities", + mapIDsToDomainNullSafe(environment.getArgument("authorities")) ); - List privateCodes = environment.getArgumentOrDefault("privateCodes", List.of()); - List activeServiceDates = environment.getArgumentOrDefault( + var lineIds = FilterValues.ofEmptyIsEverything( + "lines", + mapIDsToDomainNullSafe(environment.getArgument("lines")) + ); + var privateCodes = FilterValues.ofEmptyIsEverything( + "privateCodes", + environment.>getArgument("privateCodes") + ); + var activeServiceDates = FilterValues.ofEmptyIsEverything( "activeDates", - List.of() + environment.>getArgument("activeDates") ); - // TODO OTP2 - Use FeedScoped ID - List authorities = environment.getArgumentOrDefault("authorities", List.of()); - TransitService transitService = GqlUtil.getTransitService(environment); - return transitService - .listTrips() - .stream() - .filter(t -> lineIds.isEmpty() || lineIds.contains(t.getRoute().getId())) - .filter(t -> - privateCodes.isEmpty() || privateCodes.contains(t.getNetexInternalPlanningCode()) - ) - .filter(t -> - authorities.isEmpty() || - authorities.contains(t.getRoute().getAgency().getId().getId()) - ) - .filter(t -> - ( - activeServiceDates.isEmpty() || - transitService - .getCalendarService() - .getServiceDatesForServiceId(t.getServiceId()) - .stream() - .anyMatch(activeServiceDates::contains) - ) - ) - .collect(Collectors.toList()); + TripRequest tripRequest = TripRequest + .of() + .withAgencies(authorities) + .withRoutes(lineIds) + .withNetexInternalPlanningCodes(privateCodes) + .withServiceDates(activeServiceDates) + .build(); + + return GqlUtil.getTransitService(environment).getTrips(tripRequest); }) .build() ) diff --git a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java index 56267c6992d..2d381140b73 100644 --- a/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java +++ b/application/src/main/java/org/opentripplanner/apis/transmodel/model/timetable/DatedServiceJourneyQuery.java @@ -14,6 +14,7 @@ import org.opentripplanner.apis.transmodel.model.EnumTypes; import org.opentripplanner.apis.transmodel.model.framework.TransmodelScalars; import org.opentripplanner.apis.transmodel.support.GqlUtil; +import org.opentripplanner.transit.api.model.FilterValues; import org.opentripplanner.transit.api.request.TripOnServiceDateRequest; import org.opentripplanner.transit.api.request.TripOnServiceDateRequestBuilder; import org.opentripplanner.transit.model.framework.FeedScopedId; @@ -94,26 +95,46 @@ public static GraphQLFieldDefinition createQuery(GraphQLOutputType datedServiceJ ) .dataFetcher(environment -> { // The null safety checks are not needed here - they are taken care of by the request - // object, but reuse let's use the mapping method and leave this improvement until all APIs + // object, but let's use the mapping method and leave this improvement until all APIs // are pushing this check into the domain request. - var authorities = mapIDsToDomainNullSafe(environment.getArgument("authorities")); - var lines = mapIDsToDomainNullSafe(environment.getArgument("lines")); - var serviceJourneys = mapIDsToDomainNullSafe(environment.getArgument("serviceJourneys")); - var replacementFor = mapIDsToDomainNullSafe(environment.getArgument("replacementFor")); - var privateCodes = environment.>getArgument("privateCodes"); - var operatingDays = environment.>getArgument("operatingDays"); - var alterations = environment.>getArgument("alterations"); + var authorities = FilterValues.ofEmptyIsEverything( + "authorities", + mapIDsToDomainNullSafe(environment.getArgument("authorities")) + ); + var lines = FilterValues.ofEmptyIsEverything( + "lines", + mapIDsToDomainNullSafe(environment.getArgument("lines")) + ); + var serviceJourneys = FilterValues.ofEmptyIsEverything( + "serviceJourneys", + mapIDsToDomainNullSafe(environment.getArgument("serviceJourneys")) + ); + var replacementFor = FilterValues.ofEmptyIsEverything( + "replacementFor", + mapIDsToDomainNullSafe(environment.getArgument("replacementFor")) + ); + var privateCodes = FilterValues.ofEmptyIsEverything( + "privateCodes", + environment.>getArgument("privateCodes") + ); + var operatingDays = FilterValues.ofRequired( + "operatingDays", + environment.>getArgument("operatingDays") + ); + var alterations = FilterValues.ofEmptyIsEverything( + "alterations", + environment.>getArgument("alterations") + ); TripOnServiceDateRequestBuilder tripOnServiceDateRequestBuilder = TripOnServiceDateRequest - .of() - .withOperatingDays(operatingDays) - .withAuthorities(authorities) - .withLines(lines) + .of(operatingDays) + .withAgencies(authorities) + .withRoutes(lines) .withServiceJourneys(serviceJourneys) .withReplacementFor(replacementFor); tripOnServiceDateRequestBuilder = - tripOnServiceDateRequestBuilder.withPrivateCodes(privateCodes); + tripOnServiceDateRequestBuilder.withNetexInternalPlanningCodes(privateCodes); tripOnServiceDateRequestBuilder = tripOnServiceDateRequestBuilder.withAlterations(alterations); diff --git a/application/src/main/java/org/opentripplanner/transit/api/model/FilterValues.java b/application/src/main/java/org/opentripplanner/transit/api/model/FilterValues.java new file mode 100644 index 00000000000..391b2531231 --- /dev/null +++ b/application/src/main/java/org/opentripplanner/transit/api/model/FilterValues.java @@ -0,0 +1,86 @@ +package org.opentripplanner.transit.api.model; + +import com.beust.jcommander.internal.Nullable; +import java.util.Collection; +import java.util.NoSuchElementException; +import org.opentripplanner.transit.model.framework.FeedScopedId; +import org.opentripplanner.transit.service.TransitService; + +/** + * {@link FilterValues} is meant to be used when filtering results from {@link TransitService}. + *

+ * This abstraction over the Collection type lets us keep filter specific functionality separate + * from interpretation of various states of a collection. For instance in which case the filter values + * should match all entities they are meant to filter. + *

+ * @param - The type of the filter values. Typically, String or {@link FeedScopedId}. + */ +public abstract class FilterValues { + + @Nullable + protected final Collection values; + + private final String name; + + FilterValues(String name, @Nullable Collection values) { + this.name = name; + this.values = values; + } + + /** + * Returns a {@link FilterValues} that matches everything if there are no filter values. + *

+ * @param name - The name of the filter. + * @param - The type of the filter values. Typically, String or {@link FeedScopedId}. + * @param values - The {@link Collection} of filter values. + * @return FilterValues + */ + public static FilterValues ofEmptyIsEverything( + String name, + @Nullable Collection values + ) { + return new FilterValuesEmptyIsEverything<>(name, values); + } + + /** + * Returns a {@link RequiredFilterValues} that throws an exception at creation time if the filter + * values is null or empty. + *

+ * @param name - The name of the filter. + * @param - The type of the filter values. Typically, String or {@link FeedScopedId}. + * @param values - The {@link Collection} of filter values. + * @return RequiredFilterValues + */ + public static RequiredFilterValues ofRequired( + String name, + @Nullable Collection values + ) { + return new RequiredFilterValues<>(name, values); + } + + /** + * Returns True if the collection of filter values matches everything that it could filter. If this + * is the case, then the filter values should not be used to filter anything and filtering logic can + * safely ignore it. + *

+ * @return boolean + */ + public abstract boolean includeEverything(); + + /** + * Returns the collection of filter values. If the filter values effectively don't filter anything, + * an exception is thrown. + *

+ * @return Collection - The values of the filter. + */ + public Collection get() { + if (includeEverything()) { + throw new NoSuchElementException( + "Filter values for filter %s effectively don't filter, use includeEverything() before calling this method.".formatted( + name + ) + ); + } + return values; + } +} diff --git a/application/src/main/java/org/opentripplanner/transit/api/model/FilterValuesEmptyIsEverything.java b/application/src/main/java/org/opentripplanner/transit/api/model/FilterValuesEmptyIsEverything.java new file mode 100644 index 00000000000..ebe0af7bccb --- /dev/null +++ b/application/src/main/java/org/opentripplanner/transit/api/model/FilterValuesEmptyIsEverything.java @@ -0,0 +1,19 @@ +package org.opentripplanner.transit.api.model; + +import java.util.Collection; + +/** + * {@link FilterValuesEmptyIsEverything} is a subclass of {@link FilterValues} that includes + * everything if the values are null or empty. + */ +public class FilterValuesEmptyIsEverything extends FilterValues { + + FilterValuesEmptyIsEverything(String name, Collection values) { + super(name, values); + } + + @Override + public boolean includeEverything() { + return values == null || values.isEmpty(); + } +} diff --git a/application/src/main/java/org/opentripplanner/transit/api/model/RequiredFilterValues.java b/application/src/main/java/org/opentripplanner/transit/api/model/RequiredFilterValues.java new file mode 100644 index 00000000000..f4456dcce75 --- /dev/null +++ b/application/src/main/java/org/opentripplanner/transit/api/model/RequiredFilterValues.java @@ -0,0 +1,24 @@ +package org.opentripplanner.transit.api.model; + +import java.util.Collection; + +/** + * {@link RequiredFilterValues} is a subclass of {@link FilterValues} that requires at least one + * value to be included. + */ +public class RequiredFilterValues extends FilterValues { + + RequiredFilterValues(String name, Collection values) { + super(name, values); + if (values == null || values.isEmpty()) { + throw new IllegalArgumentException("Filter %s values must not be empty.".formatted(name)); + } + } + + @Override + public boolean includeEverything() { + // RequiredFilterValues should never include everything. In theory the filter values could be + // exhaustive, but there is no check for that currently. + return false; + } +} diff --git a/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequest.java b/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequest.java index adc7283ee4d..c61bb8ad107 100644 --- a/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequest.java +++ b/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequest.java @@ -1,77 +1,75 @@ package org.opentripplanner.transit.api.request; import java.time.LocalDate; -import java.util.List; +import org.opentripplanner.transit.api.model.FilterValues; +import org.opentripplanner.transit.api.model.RequiredFilterValues; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.transit.model.timetable.TripAlteration; -import org.opentripplanner.utils.collection.ListUtils; +import org.opentripplanner.transit.model.timetable.TripOnServiceDate; -/* +/** * A request for trips on a specific service date. - * - * This request is used to retrieve TripsOnServiceDates that match the provided criteria. + *

+ * This request is used to retrieve {@link TripOnServiceDate}s that match the provided filter values. * At least one operatingDay must be provided. */ public class TripOnServiceDateRequest { - private final List operatingDays; - private final List authorities; - private final List lines; - private final List serviceJourneys; - private final List replacementFor; - private final List privateCodes; - private final List alterations; + private final FilterValues serviceDates; + private final FilterValues agencies; + private final FilterValues routes; + private final FilterValues serviceJourneys; + private final FilterValues replacementFor; + private final FilterValues netexInternalPlanningCodes; + private final FilterValues alterations; protected TripOnServiceDateRequest( - List operatingDays, - List authorities, - List lines, - List serviceJourneys, - List replacementFor, - List privateCodes, - List alterations + RequiredFilterValues serviceDates, + FilterValues agencies, + FilterValues routes, + FilterValues serviceJourneys, + FilterValues replacementFor, + FilterValues netexInternalPlanningCodes, + FilterValues alterations ) { - if (operatingDays == null || operatingDays.isEmpty()) { - throw new IllegalArgumentException("operatingDays must have at least one date"); - } - this.operatingDays = ListUtils.nullSafeImmutableList(operatingDays); - this.authorities = ListUtils.nullSafeImmutableList(authorities); - this.lines = ListUtils.nullSafeImmutableList(lines); - this.serviceJourneys = ListUtils.nullSafeImmutableList(serviceJourneys); - this.replacementFor = ListUtils.nullSafeImmutableList(replacementFor); - this.privateCodes = ListUtils.nullSafeImmutableList(privateCodes); - this.alterations = ListUtils.nullSafeImmutableList(alterations); + this.serviceDates = serviceDates; + this.agencies = agencies; + this.routes = routes; + this.serviceJourneys = serviceJourneys; + this.replacementFor = replacementFor; + this.netexInternalPlanningCodes = netexInternalPlanningCodes; + this.alterations = alterations; } - public static TripOnServiceDateRequestBuilder of() { - return new TripOnServiceDateRequestBuilder(); + public static TripOnServiceDateRequestBuilder of(RequiredFilterValues serviceDates) { + return new TripOnServiceDateRequestBuilder(serviceDates); } - public List authorities() { - return authorities; + public FilterValues agencies() { + return agencies; } - public List lines() { - return lines; + public FilterValues routes() { + return routes; } - public List serviceJourneys() { + public FilterValues serviceJourneys() { return serviceJourneys; } - public List replacementFor() { + public FilterValues replacementFor() { return replacementFor; } - public List privateCodes() { - return privateCodes; + public FilterValues netexInternalPlanningCodes() { + return netexInternalPlanningCodes; } - public List alterations() { + public FilterValues alterations() { return alterations; } - public List operatingDays() { - return operatingDays; + public FilterValues serviceDates() { + return serviceDates; } } diff --git a/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequestBuilder.java b/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequestBuilder.java index 7aa2644fdc9..534557c15d8 100644 --- a/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequestBuilder.java +++ b/application/src/main/java/org/opentripplanner/transit/api/request/TripOnServiceDateRequestBuilder.java @@ -2,64 +2,84 @@ import java.time.LocalDate; import java.util.List; +import org.opentripplanner.transit.api.model.FilterValues; +import org.opentripplanner.transit.api.model.RequiredFilterValues; import org.opentripplanner.transit.model.framework.FeedScopedId; import org.opentripplanner.transit.model.timetable.TripAlteration; public class TripOnServiceDateRequestBuilder { - private List authorities; - private List lines; - private List serviceJourneys; - private List replacementFor; - private List privateCodes; - private List alterations; - private List operatingDays; + private FilterValues agencies = FilterValues.ofEmptyIsEverything( + "agencies", + List.of() + ); + private FilterValues routes = FilterValues.ofEmptyIsEverything("routes", List.of()); + private FilterValues serviceJourneys = FilterValues.ofEmptyIsEverything( + "serviceJourneys", + List.of() + ); + private FilterValues replacementFor = FilterValues.ofEmptyIsEverything( + "replacementFor", + List.of() + ); + private FilterValues netexInternalPlanningCodes = FilterValues.ofEmptyIsEverything( + "netexInternalPlanningCodes", + List.of() + ); + private FilterValues alterations = FilterValues.ofEmptyIsEverything( + "alterations", + List.of() + ); + private RequiredFilterValues serviceDates; - protected TripOnServiceDateRequestBuilder() {} - - public TripOnServiceDateRequestBuilder withOperatingDays(List operatingDays) { - this.operatingDays = operatingDays; - return this; + protected TripOnServiceDateRequestBuilder(RequiredFilterValues serviceDates) { + this.serviceDates = serviceDates; } - public TripOnServiceDateRequestBuilder withAuthorities(List authorities) { - this.authorities = authorities; + public TripOnServiceDateRequestBuilder withAgencies(FilterValues agencies) { + this.agencies = agencies; return this; } - public TripOnServiceDateRequestBuilder withLines(List lines) { - this.lines = lines; + public TripOnServiceDateRequestBuilder withRoutes(FilterValues routes) { + this.routes = routes; return this; } - public TripOnServiceDateRequestBuilder withServiceJourneys(List serviceJourneys) { + public TripOnServiceDateRequestBuilder withServiceJourneys( + FilterValues serviceJourneys + ) { this.serviceJourneys = serviceJourneys; return this; } - public TripOnServiceDateRequestBuilder withReplacementFor(List replacementFor) { + public TripOnServiceDateRequestBuilder withReplacementFor( + FilterValues replacementFor + ) { this.replacementFor = replacementFor; return this; } - public TripOnServiceDateRequestBuilder withPrivateCodes(List privateCodes) { - this.privateCodes = privateCodes; + public TripOnServiceDateRequestBuilder withNetexInternalPlanningCodes( + FilterValues netexInternalPlanningCodes + ) { + this.netexInternalPlanningCodes = netexInternalPlanningCodes; return this; } - public TripOnServiceDateRequestBuilder withAlterations(List alterations) { + public TripOnServiceDateRequestBuilder withAlterations(FilterValues alterations) { this.alterations = alterations; return this; } public TripOnServiceDateRequest build() { return new TripOnServiceDateRequest( - operatingDays, - authorities, - lines, + serviceDates, + agencies, + routes, serviceJourneys, replacementFor, - privateCodes, + netexInternalPlanningCodes, alterations ); } diff --git a/application/src/main/java/org/opentripplanner/transit/api/request/TripRequest.java b/application/src/main/java/org/opentripplanner/transit/api/request/TripRequest.java new file mode 100644 index 00000000000..c73e800582b --- /dev/null +++ b/application/src/main/java/org/opentripplanner/transit/api/request/TripRequest.java @@ -0,0 +1,51 @@ +package org.opentripplanner.transit.api.request; + +import java.time.LocalDate; +import org.opentripplanner.transit.api.model.FilterValues; +import org.opentripplanner.transit.model.framework.FeedScopedId; +import org.opentripplanner.transit.model.timetable.Trip; + +/** + * A request for {@link Trip}s. + *

+ * This request is used to retrieve {@link Trip}s that match the provided filter values. + */ +public class TripRequest { + + private final FilterValues agencies; + private final FilterValues routes; + private final FilterValues netexInternalPlanningCodes; + private final FilterValues serviceDates; + + protected TripRequest( + FilterValues agencies, + FilterValues routes, + FilterValues netexInternalPlanningCodes, + FilterValues serviceDates + ) { + this.agencies = agencies; + this.routes = routes; + this.netexInternalPlanningCodes = netexInternalPlanningCodes; + this.serviceDates = serviceDates; + } + + public static TripRequestBuilder of() { + return new TripRequestBuilder(); + } + + public FilterValues agencies() { + return agencies; + } + + public FilterValues routes() { + return routes; + } + + public FilterValues netexInternalPlanningCodes() { + return netexInternalPlanningCodes; + } + + public FilterValues serviceDates() { + return serviceDates; + } +} diff --git a/application/src/main/java/org/opentripplanner/transit/api/request/TripRequestBuilder.java b/application/src/main/java/org/opentripplanner/transit/api/request/TripRequestBuilder.java new file mode 100644 index 00000000000..3a2f80a3e34 --- /dev/null +++ b/application/src/main/java/org/opentripplanner/transit/api/request/TripRequestBuilder.java @@ -0,0 +1,51 @@ +package org.opentripplanner.transit.api.request; + +import java.time.LocalDate; +import java.util.List; +import org.opentripplanner.transit.api.model.FilterValues; +import org.opentripplanner.transit.model.framework.FeedScopedId; + +public class TripRequestBuilder { + + private FilterValues agencies = FilterValues.ofEmptyIsEverything( + "agencies", + List.of() + ); + private FilterValues routes = FilterValues.ofEmptyIsEverything("routes", List.of()); + private FilterValues netexInternalPlanningCodes = FilterValues.ofEmptyIsEverything( + "netexInternalPlanningCodes", + List.of() + ); + private FilterValues serviceDates = FilterValues.ofEmptyIsEverything( + "serviceDates", + List.of() + ); + + protected TripRequestBuilder() {} + + public TripRequestBuilder withAgencies(FilterValues agencies) { + this.agencies = agencies; + return this; + } + + public TripRequestBuilder withRoutes(FilterValues routes) { + this.routes = routes; + return this; + } + + public TripRequestBuilder withNetexInternalPlanningCodes( + FilterValues netexInternalPlanningCodes + ) { + this.netexInternalPlanningCodes = netexInternalPlanningCodes; + return this; + } + + public TripRequestBuilder withServiceDates(FilterValues serviceDates) { + this.serviceDates = serviceDates; + return this; + } + + public TripRequest build() { + return new TripRequest(agencies, routes, netexInternalPlanningCodes, serviceDates); + } +} diff --git a/application/src/main/java/org/opentripplanner/transit/model/filter/expr/ContainsMatcher.java b/application/src/main/java/org/opentripplanner/transit/model/filter/expr/ContainsMatcher.java index ed3731897ec..1be81ba9e7f 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/filter/expr/ContainsMatcher.java +++ b/application/src/main/java/org/opentripplanner/transit/model/filter/expr/ContainsMatcher.java @@ -50,6 +50,6 @@ public boolean match(S entity) { @Override public String toString() { - return "ContainsMatcher: " + relationshipName + ": " + valueMatcher.toString(); + return "ContainsMatcher: " + relationshipName + ": " + valueMatcher; } } diff --git a/application/src/main/java/org/opentripplanner/transit/model/filter/expr/ExpressionBuilder.java b/application/src/main/java/org/opentripplanner/transit/model/filter/expr/ExpressionBuilder.java index b1b4d5be322..f2910a4c8d2 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/filter/expr/ExpressionBuilder.java +++ b/application/src/main/java/org/opentripplanner/transit/model/filter/expr/ExpressionBuilder.java @@ -1,9 +1,9 @@ package org.opentripplanner.transit.model.filter.expr; import java.util.ArrayList; -import java.util.Collection; import java.util.List; import java.util.function.Function; +import org.opentripplanner.transit.api.model.FilterValues; /** * A builder for creating complex matchers composed of other matchers. @@ -22,12 +22,15 @@ public static ExpressionBuilder of() { return new ExpressionBuilder<>(); } - public ExpressionBuilder or(Collection values, Function> valueProvider) { - if (values.isEmpty()) { + public ExpressionBuilder atLeastOneMatch( + FilterValues filterValues, + Function> matcherProvider + ) { + if (filterValues.includeEverything()) { return this; } - matchers.add(OrMatcher.of(values.stream().map(valueProvider).toList())); + matchers.add(OrMatcher.of(filterValues.get().stream().map(matcherProvider).toList())); return this; } diff --git a/application/src/main/java/org/opentripplanner/transit/model/filter/transit/TripMatcherFactory.java b/application/src/main/java/org/opentripplanner/transit/model/filter/transit/TripMatcherFactory.java new file mode 100644 index 00000000000..1ff33d9928d --- /dev/null +++ b/application/src/main/java/org/opentripplanner/transit/model/filter/transit/TripMatcherFactory.java @@ -0,0 +1,75 @@ +package org.opentripplanner.transit.model.filter.transit; + +import java.time.LocalDate; +import java.util.Set; +import java.util.function.Function; +import org.opentripplanner.transit.api.request.TripRequest; +import org.opentripplanner.transit.model.filter.expr.ContainsMatcher; +import org.opentripplanner.transit.model.filter.expr.EqualityMatcher; +import org.opentripplanner.transit.model.filter.expr.ExpressionBuilder; +import org.opentripplanner.transit.model.filter.expr.Matcher; +import org.opentripplanner.transit.model.framework.FeedScopedId; +import org.opentripplanner.transit.model.timetable.Trip; + +/** + * A factory for creating matchers for {@link Trip} objects. + *

+ * This factory is used to create matchers for {@link Trip} objects based on a request. The + * resulting matcher can be used to filter a list of {@link Trip} objects. + */ +public class TripMatcherFactory { + + /** + * Creates a matcher for {@link Trip} objects based on the given request. + * + * @param request - a {@link TripRequest} object that contains the criteria for the matcher. + * @param serviceDateProvider a function that provides the service dates for a given {@link FeedScopedId} of a {@link Trip}. + * @return a {@link Matcher} to be used for filtering {@link Trip} objects. + */ + public static Matcher of( + TripRequest request, + Function> serviceDateProvider + ) { + ExpressionBuilder expr = ExpressionBuilder.of(); + + expr.atLeastOneMatch(request.agencies(), TripMatcherFactory::agencyId); + expr.atLeastOneMatch(request.routes(), TripMatcherFactory::routeId); + expr.atLeastOneMatch( + request.netexInternalPlanningCodes(), + TripMatcherFactory::netexInternalPlanningCode + ); + expr.atLeastOneMatch( + request.serviceDates(), + TripMatcherFactory.serviceDate(serviceDateProvider) + ); + + return expr.build(); + } + + static Matcher agencyId(FeedScopedId id) { + return new EqualityMatcher<>("agency", id, t -> t.getRoute().getAgency().getId()); + } + + static Matcher routeId(FeedScopedId id) { + return new EqualityMatcher<>("route", id, t -> t.getRoute().getId()); + } + + static Matcher netexInternalPlanningCode(String code) { + return new EqualityMatcher<>( + "netexInternalPlanningCode", + code, + Trip::getNetexInternalPlanningCode + ); + } + + static Function> serviceDate( + Function> serviceDateProvider + ) { + return date -> + new ContainsMatcher<>( + "serviceDates", + t -> serviceDateProvider.apply(t.getServiceId()), + new EqualityMatcher<>("serviceDate", date, (dateToMatch -> dateToMatch)) + ); + } +} diff --git a/application/src/main/java/org/opentripplanner/transit/model/filter/transit/TripOnServiceDateMatcherFactory.java b/application/src/main/java/org/opentripplanner/transit/model/filter/transit/TripOnServiceDateMatcherFactory.java index f86e7a1ff77..7442e2874eb 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/filter/transit/TripOnServiceDateMatcherFactory.java +++ b/application/src/main/java/org/opentripplanner/transit/model/filter/transit/TripOnServiceDateMatcherFactory.java @@ -12,27 +12,33 @@ import org.opentripplanner.transit.model.timetable.TripOnServiceDate; /** - * A factory for creating matchers for TripOnServiceDate objects. + * A factory for creating matchers for {@link TripOnServiceDate} objects. *

- * This factory is used to create matchers for TripOnServiceDate objects based on a request. The - * resulting matcher can be used to filter a list of TripOnServiceDate objects. + * This factory is used to create matchers for {@link TripOnServiceDate} objects based on a request. The + * resulting matcher can be used to filter a list of {@link TripOnServiceDate} objects. */ public class TripOnServiceDateMatcherFactory { public static Matcher of(TripOnServiceDateRequest request) { ExpressionBuilder expr = ExpressionBuilder.of(); - expr.or(request.operatingDays(), TripOnServiceDateMatcherFactory::operatingDay); - expr.or(request.authorities(), TripOnServiceDateMatcherFactory::authorityId); - expr.or(request.lines(), TripOnServiceDateMatcherFactory::routeId); - expr.or(request.serviceJourneys(), TripOnServiceDateMatcherFactory::serviceJourneyId); - expr.or(request.replacementFor(), TripOnServiceDateMatcherFactory::replacementFor); - expr.or(request.privateCodes(), TripOnServiceDateMatcherFactory::privateCode); - expr.or(request.alterations(), TripOnServiceDateMatcherFactory::alteration); + expr.atLeastOneMatch(request.serviceDates(), TripOnServiceDateMatcherFactory::serviceDate); + expr.atLeastOneMatch(request.agencies(), TripOnServiceDateMatcherFactory::agencyId); + expr.atLeastOneMatch(request.routes(), TripOnServiceDateMatcherFactory::routeId); + expr.atLeastOneMatch( + request.serviceJourneys(), + TripOnServiceDateMatcherFactory::serviceJourneyId + ); + expr.atLeastOneMatch(request.replacementFor(), TripOnServiceDateMatcherFactory::replacementFor); + expr.atLeastOneMatch( + request.netexInternalPlanningCodes(), + TripOnServiceDateMatcherFactory::netexInternalPlanningCode + ); + expr.atLeastOneMatch(request.alterations(), TripOnServiceDateMatcherFactory::alteration); return expr.build(); } - static Matcher authorityId(FeedScopedId id) { + static Matcher agencyId(FeedScopedId id) { return new EqualityMatcher<>("agency", id, t -> t.getTrip().getRoute().getAgency().getId()); } @@ -52,16 +58,16 @@ static Matcher replacementFor(FeedScopedId id) { ); } - static Matcher privateCode(String code) { + static Matcher netexInternalPlanningCode(String code) { return new EqualityMatcher<>( - "privateCode", + "netexInternalPlanningCode", code, t -> t.getTrip().getNetexInternalPlanningCode() ); } - static Matcher operatingDay(LocalDate date) { - return new EqualityMatcher<>("operatingDay", date, TripOnServiceDate::getServiceDate); + static Matcher serviceDate(LocalDate date) { + return new EqualityMatcher<>("serviceDate", date, TripOnServiceDate::getServiceDate); } static Matcher alteration(TripAlteration alteration) { diff --git a/application/src/main/java/org/opentripplanner/transit/model/timetable/TripOnServiceDate.java b/application/src/main/java/org/opentripplanner/transit/model/timetable/TripOnServiceDate.java index ee520f9e0f0..1a22ec70000 100644 --- a/application/src/main/java/org/opentripplanner/transit/model/timetable/TripOnServiceDate.java +++ b/application/src/main/java/org/opentripplanner/transit/model/timetable/TripOnServiceDate.java @@ -45,10 +45,6 @@ public List getReplacementFor() { return replacementFor; } - public TripIdAndServiceDate getTripIdAndServiceDate() { - return new TripIdAndServiceDate(trip.getId(), serviceDate); - } - @Override public boolean sameAs(TripOnServiceDate other) { return ( diff --git a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java index 8557ce21440..d35977cae74 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java @@ -35,9 +35,11 @@ import org.opentripplanner.routing.stoptimes.ArrivalDeparture; import org.opentripplanner.routing.stoptimes.StopTimesHelper; import org.opentripplanner.transit.api.request.TripOnServiceDateRequest; +import org.opentripplanner.transit.api.request.TripRequest; import org.opentripplanner.transit.model.basic.Notice; import org.opentripplanner.transit.model.basic.TransitMode; import org.opentripplanner.transit.model.filter.expr.Matcher; +import org.opentripplanner.transit.model.filter.transit.TripMatcherFactory; import org.opentripplanner.transit.model.filter.transit.TripOnServiceDateMatcherFactory; import org.opentripplanner.transit.model.framework.AbstractTransitEntity; import org.opentripplanner.transit.model.framework.Deduplicator; @@ -166,11 +168,6 @@ public TIntSet getServiceCodesRunningForDate(LocalDate serviceDate) { .getOrDefault(serviceDate, new TIntHashSet()); } - @Override - public AreaStop getAreaStop(FeedScopedId id) { - return this.timetableRepository.getSiteRepository().getAreaStop(id); - } - @Override public Agency getAgency(FeedScopedId id) { return this.timetableRepositoryIndex.getAgencyForId(id); @@ -231,12 +228,6 @@ public Collection listStopLocations() { return timetableRepository.getSiteRepository().listStopLocations(); } - @Override - public Collection listRegularStops() { - OTPRequestTimeoutException.checkForTimeout(); - return timetableRepository.getSiteRepository().listRegularStops(); - } - @Override public Collection listGroupStops() { OTPRequestTimeoutException.checkForTimeout(); @@ -594,6 +585,21 @@ public boolean containsTrip(FeedScopedId id) { return this.timetableRepositoryIndex.containsTrip(id); } + /** + * Returns a list of Trips that match the filtering defined in the request. + * + * @param request - A TripRequest object with filtering defined. + * @return - A list Trips + */ + @Override + public List getTrips(TripRequest request) { + Matcher matcher = TripMatcherFactory.of( + request, + this.getCalendarService()::getServiceDatesForServiceId + ); + return listTrips().stream().filter(matcher::match).toList(); + } + /** * TODO OTP2 - This is NOT THREAD-SAFE and is used in the real-time updaters, we need to fix * this when doing the issue #3030. diff --git a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java index 863035950eb..c1bba355cdf 100644 --- a/application/src/main/java/org/opentripplanner/transit/service/TransitService.java +++ b/application/src/main/java/org/opentripplanner/transit/service/TransitService.java @@ -25,6 +25,7 @@ import org.opentripplanner.routing.services.TransitAlertService; import org.opentripplanner.routing.stoptimes.ArrivalDeparture; import org.opentripplanner.transit.api.request.TripOnServiceDateRequest; +import org.opentripplanner.transit.api.request.TripRequest; import org.opentripplanner.transit.model.basic.Notice; import org.opentripplanner.transit.model.basic.TransitMode; import org.opentripplanner.transit.model.framework.AbstractTransitEntity; @@ -128,8 +129,6 @@ public interface TransitService { Collection listStopLocations(); - Collection listRegularStops(); - Collection listGroupStops(); StopLocation getStopLocation(FeedScopedId parseId); @@ -146,9 +145,6 @@ public interface TransitService { StopLocationsGroup getStopLocationsGroup(FeedScopedId id); - @Nullable - AreaStop getAreaStop(FeedScopedId id); - /** * Return the trip for the given id, including trips created in real time. */ @@ -313,6 +309,14 @@ List findTripTimeOnDate( */ List findTripsOnServiceDate(TripOnServiceDateRequest request); + /** + * Returns a list of Trips that match the filtering defined in the request. + * + * @param request - A TripRequest object with filtering defined. + * @return - A list of Trips + */ + List getTrips(TripRequest request); + /** * Checks if a trip with the given ID exists in the model. * diff --git a/application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql b/application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql index ed182473bb6..783cc3e7948 100644 --- a/application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql +++ b/application/src/main/resources/org/opentripplanner/apis/transmodel/schema.graphql @@ -734,15 +734,15 @@ type QueryType { serverInfo: ServerInfo! @timingData "Get a single service journey based on its id" serviceJourney(id: String!): ServiceJourney @timingData - "Get all service journeys" + "Get all _service journeys_" serviceJourneys( - "Set of ids of active dates to fetch serviceJourneys for." + "Set of _operating days_ to fetch _service journeys_ for." activeDates: [Date], - "Set of ids of authorities to fetch serviceJourneys for." + "Set of ids of _authorities_ to fetch _service journeys_ for." authorities: [String], - "Set of ids of lines to fetch serviceJourneys for." + "Set of ids of _lines_ to fetch _service journeys_ for." lines: [ID], - "Set of ids of private codes to fetch serviceJourneys for." + "Set of ids of _private codes_ to fetch _service journeys_ for." privateCodes: [String] ): [ServiceJourney]! @timingData "Get a single situation based on its situationNumber" diff --git a/application/src/test/java/org/opentripplanner/transit/api/model/FilterValuesEmptyIsEverythingTest.java b/application/src/test/java/org/opentripplanner/transit/api/model/FilterValuesEmptyIsEverythingTest.java new file mode 100644 index 00000000000..95e8f2ca292 --- /dev/null +++ b/application/src/test/java/org/opentripplanner/transit/api/model/FilterValuesEmptyIsEverythingTest.java @@ -0,0 +1,22 @@ +package org.opentripplanner.transit.api.model; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.List; +import org.junit.jupiter.api.Test; + +public class FilterValuesEmptyIsEverythingTest { + + @Test + void testEmptyIncludeEverything() { + FilterValues filterValues = FilterValues.ofEmptyIsEverything("null", List.of()); + assertTrue(filterValues.includeEverything()); + } + + @Test + void testNullIncludeEverything() { + List nullList = null; + FilterValues filterValues2 = FilterValues.ofEmptyIsEverything("null", nullList); + assertTrue(filterValues2.includeEverything()); + } +} diff --git a/application/src/test/java/org/opentripplanner/transit/api/model/RequiredFilterValuesTest.java b/application/src/test/java/org/opentripplanner/transit/api/model/RequiredFilterValuesTest.java new file mode 100644 index 00000000000..7c06128c7bf --- /dev/null +++ b/application/src/test/java/org/opentripplanner/transit/api/model/RequiredFilterValuesTest.java @@ -0,0 +1,32 @@ +package org.opentripplanner.transit.api.model; + +import static org.junit.jupiter.api.Assertions.*; + +import java.util.List; +import org.junit.jupiter.api.Test; + +class RequiredFilterValuesTest { + + @Test + void testEmptyIsInvalid() { + IllegalArgumentException e = assertThrows( + IllegalArgumentException.class, + () -> { + FilterValues.ofRequired("empty", List.of()); + } + ); + assertEquals("Filter empty values must not be empty.", e.getMessage()); + } + + @Test + void testNullIsInvalid() { + List nullList = null; + IllegalArgumentException e = assertThrows( + IllegalArgumentException.class, + () -> { + FilterValues.ofRequired("null", nullList); + } + ); + assertEquals("Filter null values must not be empty.", e.getMessage()); + } +} diff --git a/application/src/test/java/org/opentripplanner/transit/model/filter/transit/TripMatcherFactoryTest.java b/application/src/test/java/org/opentripplanner/transit/model/filter/transit/TripMatcherFactoryTest.java new file mode 100644 index 00000000000..ec4b3241dd5 --- /dev/null +++ b/application/src/test/java/org/opentripplanner/transit/model/filter/transit/TripMatcherFactoryTest.java @@ -0,0 +1,157 @@ +package org.opentripplanner.transit.model.filter.transit; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.time.LocalDate; +import java.util.List; +import java.util.Set; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.opentripplanner.transit.api.model.FilterValues; +import org.opentripplanner.transit.api.request.TripRequest; +import org.opentripplanner.transit.model.basic.TransitMode; +import org.opentripplanner.transit.model.filter.expr.Matcher; +import org.opentripplanner.transit.model.framework.FeedScopedId; +import org.opentripplanner.transit.model.network.Route; +import org.opentripplanner.transit.model.organization.Agency; +import org.opentripplanner.transit.model.timetable.Trip; + +public class TripMatcherFactoryTest { + + private Trip tripRut; + private Trip tripRut2; + private Trip tripAkt; + + @BeforeEach + void setup() { + tripRut = + Trip + .of(new FeedScopedId("F", "RUT:route:trip:1")) + .withRoute( + Route + .of(new FeedScopedId("F", "RUT:route:1")) + .withAgency( + Agency + .of(new FeedScopedId("F", "RUT:1")) + .withName("RUT") + .withTimezone("Europe/Oslo") + .build() + ) + .withMode(TransitMode.BUS) + .withShortName("BUS") + .build() + ) + .withServiceId(new FeedScopedId("F", "RUT:route:trip:1")) + .build(); + tripRut2 = + Trip + .of(new FeedScopedId("F", "RUT:route:trip:2")) + .withRoute( + Route + .of(new FeedScopedId("F", "RUT:route:2")) + .withAgency( + Agency + .of(new FeedScopedId("F", "RUT:2")) + .withName("RUT") + .withTimezone("Europe/Oslo") + .build() + ) + .withMode(TransitMode.BUS) + .withShortName("BUS") + .build() + ) + .withServiceId(new FeedScopedId("F", "RUT:route:trip:2")) + .build(); + tripAkt = + Trip + .of(new FeedScopedId("F", "AKT:route:trip:1")) + .withRoute( + Route + .of(new FeedScopedId("F", "AKT:route:1")) + .withAgency( + Agency + .of(new FeedScopedId("F", "AKT")) + .withName("AKT") + .withTimezone("Europe/Oslo") + .build() + ) + .withMode(TransitMode.BUS) + .withShortName("BUS") + .build() + ) + .withServiceId(new FeedScopedId("F", "AKT:route:trip:1")) + .build(); + } + + @Test + void testMatchRouteId() { + TripRequest request = TripRequest + .of() + .withRoutes( + FilterValues.ofEmptyIsEverything("routes", List.of(new FeedScopedId("F", "RUT:route:1"))) + ) + .build(); + + Matcher matcher = TripMatcherFactory.of(request, feedScopedId -> Set.of()); + + assertTrue(matcher.match(tripRut)); + assertFalse(matcher.match(tripRut2)); + assertFalse(matcher.match(tripAkt)); + } + + @Test + void testMatchDefaultAll() { + TripRequest request = TripRequest.of().build(); + + Matcher matcher = TripMatcherFactory.of(request, feedScopedId -> Set.of()); + + assertTrue(matcher.match(tripRut)); + assertTrue(matcher.match(tripRut2)); + assertTrue(matcher.match(tripAkt)); + } + + @Test + void testMatchAgencyId() { + TripRequest request = TripRequest + .of() + .withAgencies( + FilterValues.ofEmptyIsEverything("agencies", List.of(new FeedScopedId("F", "RUT:1"))) + ) + .build(); + + Matcher matcher = TripMatcherFactory.of(request, feedScopedId -> Set.of()); + + assertTrue(matcher.match(tripRut)); + assertFalse(matcher.match(tripRut2)); + assertFalse(matcher.match(tripAkt)); + } + + @Test + void testMatchServiceDates() { + TripRequest request = TripRequest + .of() + .withServiceDates( + FilterValues.ofEmptyIsEverything( + "operatingDays", + List.of(LocalDate.of(2024, 2, 22), LocalDate.of(2024, 2, 23)) + ) + ) + .build(); + + Matcher matcher = TripMatcherFactory.of(request, this::dummyServiceDateProvider); + + assertTrue(matcher.match(tripRut)); + assertTrue(matcher.match(tripRut2)); + assertFalse(matcher.match(tripAkt)); + } + + private Set dummyServiceDateProvider(FeedScopedId feedScopedId) { + if (feedScopedId.equals(new FeedScopedId("F", "RUT:route:trip:1"))) { + return Set.of(LocalDate.of(2024, 2, 22), LocalDate.of(2024, 2, 23)); + } else if (feedScopedId.equals(new FeedScopedId("F", "RUT:route:trip:2"))) { + return Set.of(LocalDate.of(2024, 2, 23)); + } + return Set.of(); + } +} diff --git a/application/src/test/java/org/opentripplanner/transit/model/filter/transit/TripOnServiceDateMatcherFactoryTest.java b/application/src/test/java/org/opentripplanner/transit/model/filter/transit/TripOnServiceDateMatcherFactoryTest.java index b7cb7aa6698..dcfb10b5947 100644 --- a/application/src/test/java/org/opentripplanner/transit/model/filter/transit/TripOnServiceDateMatcherFactoryTest.java +++ b/application/src/test/java/org/opentripplanner/transit/model/filter/transit/TripOnServiceDateMatcherFactoryTest.java @@ -6,6 +6,7 @@ import java.util.List; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.opentripplanner.transit.api.model.FilterValues; import org.opentripplanner.transit.api.request.TripOnServiceDateRequest; import org.opentripplanner.transit.model.basic.TransitMode; import org.opentripplanner.transit.model.filter.expr.Matcher; @@ -25,16 +26,16 @@ class TripOnServiceDateMatcherFactoryTest { void setup() { tripOnServiceDateRut = TripOnServiceDate - .of(new FeedScopedId("RUT:route:trip:date", "123")) + .of(new FeedScopedId("F", "RUT:route:trip:date:1")) .withTrip( Trip - .of(new FeedScopedId("RUT:route:trip", "1")) + .of(new FeedScopedId("F", "RUT:route:trip:1")) .withRoute( Route - .of(new FeedScopedId("RUT:route", "2")) + .of(new FeedScopedId("F", "RUT:route:1")) .withAgency( Agency - .of(new FeedScopedId("RUT", "3")) + .of(new FeedScopedId("F", "RUT:1")) .withName("RUT") .withTimezone("Europe/Oslo") .build() @@ -50,16 +51,16 @@ void setup() { tripOnServiceDateRut2 = TripOnServiceDate - .of(new FeedScopedId("RUT:route:trip:date", "123")) + .of(new FeedScopedId("F", "RUT:route:trip:date:2")) .withTrip( Trip - .of(new FeedScopedId("RUT:route:trip2", "1")) + .of(new FeedScopedId("F", "RUT:route:trip:2")) .withRoute( Route - .of(new FeedScopedId("RUT:route", "2")) + .of(new FeedScopedId("F", "RUT:route:2")) .withAgency( Agency - .of(new FeedScopedId("RUT", "3")) + .of(new FeedScopedId("F", "RUT:2")) .withName("RUT") .withTimezone("Europe/Oslo") .build() @@ -75,16 +76,16 @@ void setup() { tripOnServiceDateAkt = TripOnServiceDate - .of(new FeedScopedId("AKT:route:trip:date", "123")) + .of(new FeedScopedId("F", "AKT:route:trip:date:1")) .withTrip( Trip - .of(new FeedScopedId("AKT:route:trip", "1")) + .of(new FeedScopedId("F", "AKT:route:trip:1")) .withRoute( Route - .of(new FeedScopedId("AKT:route", "2")) + .of(new FeedScopedId("F", "AKT:route:1")) .withAgency( Agency - .of(new FeedScopedId("AKT", "3")) + .of(new FeedScopedId("F", "AKT:1")) .withName("AKT") .withTimezone("Europe/Oslo") .build() @@ -102,8 +103,7 @@ void setup() { @Test void testMatchOperatingDays() { TripOnServiceDateRequest request = TripOnServiceDateRequest - .of() - .withOperatingDays(List.of(LocalDate.of(2024, 2, 22))) + .of(FilterValues.ofRequired("serviceDates", List.of(LocalDate.of(2024, 2, 22)))) .build(); Matcher matcher = TripOnServiceDateMatcherFactory.of(request); @@ -116,11 +116,19 @@ void testMatchOperatingDays() { @Test void testMatchMultiple() { TripOnServiceDateRequest request = TripOnServiceDateRequest - .of() - .withOperatingDays(List.of(LocalDate.of(2024, 2, 22))) - .withAuthorities(List.of(new FeedScopedId("RUT", "3"))) - .withLines(List.of(new FeedScopedId("RUT:route", "2"))) - .withServiceJourneys(List.of(new FeedScopedId("RUT:route:trip", "1"))) + .of(FilterValues.ofRequired("serviceDates", List.of(LocalDate.of(2024, 2, 22)))) + .withAgencies( + FilterValues.ofEmptyIsEverything("agencies", List.of(new FeedScopedId("F", "RUT:1"))) + ) + .withRoutes( + FilterValues.ofEmptyIsEverything("routes", List.of(new FeedScopedId("F", "RUT:route:1"))) + ) + .withServiceJourneys( + FilterValues.ofEmptyIsEverything( + "serviceJourneys", + List.of(new FeedScopedId("F", "RUT:route:trip:1")) + ) + ) .build(); Matcher matcher = TripOnServiceDateMatcherFactory.of(request); @@ -133,12 +141,27 @@ void testMatchMultiple() { @Test void testMatchMultipleServiceJourneyMatchers() { TripOnServiceDateRequest request = TripOnServiceDateRequest - .of() - .withOperatingDays(List.of(LocalDate.of(2024, 2, 22))) - .withAuthorities(List.of(new FeedScopedId("RUT", "3"))) - .withLines(List.of(new FeedScopedId("RUT:route", "2"))) + .of(FilterValues.ofRequired("serviceDates", List.of(LocalDate.of(2024, 2, 22)))) + .withAgencies( + FilterValues.ofEmptyIsEverything( + "agencies", + List.of(new FeedScopedId("F", "RUT:1"), new FeedScopedId("F", "RUT:2")) + ) + ) + .withRoutes( + FilterValues.ofEmptyIsEverything( + "routes", + List.of(new FeedScopedId("F", "RUT:route:1"), new FeedScopedId("F", "RUT:route:2")) + ) + ) .withServiceJourneys( - List.of(new FeedScopedId("RUT:route:trip", "1"), new FeedScopedId("RUT:route:trip2", "1")) + FilterValues.ofEmptyIsEverything( + "serviceJourneys", + List.of( + new FeedScopedId("F", "RUT:route:trip:1"), + new FeedScopedId("F", "RUT:route:trip:2") + ) + ) ) .build(); diff --git a/doc/dev/decisionrecords/NamingConventions.md b/doc/dev/decisionrecords/NamingConventions.md index 6aef8d7f7e1..2cd4ed6d0cf 100644 --- a/doc/dev/decisionrecords/NamingConventions.md +++ b/doc/dev/decisionrecords/NamingConventions.md @@ -77,3 +77,14 @@ trip = Trip.of(id).withName("The Express").build(); // Modify and existing stop stop = stop.copyOf().withPrivateCode("TEX").build(); ``` + +## Referencing Established OTP Terminology in Documentation + +Use emphasis ("_dated service journey_") in markdown documentation, in API, and configuration +documentation. In this kind of documentation we usually talk about the concept, not the implementing +class. Use CamleCase (eg. TripOnServiceDate) if you need to reference the class. + +Use hyphen ("dated-service-journey") in plain text and JavaDoc. In JavaDoc we also use +{@link TripOnServiceDate} the first time we mention a class. Note that sometimes we want to talk +about the concept (dated-service-journey) and sometimes we reference a class +({@link DatedServiceJourney}). \ No newline at end of file From 404279041c62aa7af0c85cbeba4b212798be120c Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Thu, 28 Nov 2024 17:20:32 +0100 Subject: [PATCH 168/169] Also delay jackson datatypes [ci skip] --- renovate.json5 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renovate.json5 b/renovate.json5 index d34b8573649..a5838fb3ff0 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -146,7 +146,8 @@ "description": "give some projects time to publish a changelog before opening the PR", "matchPackageNames": [ "com.google.dagger:{/,}**", - "com.fasterxml.jackson:{/,}**" + "com.fasterxml.jackson:{/,}**", + "com.fasterxml.jackson.datatype::{/,}**" ], "minimumReleaseAge": "1 week" }, From e919778fd2014be25befa3e60fd7887556c1d59a Mon Sep 17 00:00:00 2001 From: OTP Serialization Version Bot Date: Mon, 2 Dec 2024 07:29:00 +0000 Subject: [PATCH 169/169] Bump serialization version id for #6277 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 770525790f7..54d7e21cc78 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ - 173 + 174 32.1 2.52