Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream merge 2025-01-10 #243

Merged
merged 89 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
12b4995
make all polling updater wait for graph update finish
miklcct Nov 19, 2024
5edfd73
Merge branch 'dev-2.x' into fix-update-lag
miklcct Nov 26, 2024
ed778da
Merge branch 'dev-2.x' into fix-update-lag
miklcct Nov 27, 2024
901f96a
Add SIRI light
leonardehrenfried Nov 20, 2024
1b824ac
Update logger name
leonardehrenfried Nov 26, 2024
9eed5be
Improve documentation
leonardehrenfried Nov 26, 2024
96b8f1e
Update docs
leonardehrenfried Nov 26, 2024
8fdebbb
Make spelling of SIRI consistent across docs
leonardehrenfried Nov 27, 2024
af138ab
Add metrics to SIRI light
leonardehrenfried Nov 27, 2024
240c70e
Add SIRI SX
leonardehrenfried Nov 27, 2024
24bcf97
Add documentation about SIRI SX
leonardehrenfried Nov 27, 2024
464ca30
Move config interfaces into updaters
leonardehrenfried Nov 27, 2024
0124153
Small cleanup of the SIRI code
leonardehrenfried Nov 27, 2024
30e12f9
Add test and example
leonardehrenfried Nov 27, 2024
6703d62
Skip updater in main docs
leonardehrenfried Nov 27, 2024
86a447f
Change spelling from 'Light' to 'Lite'
leonardehrenfried Dec 4, 2024
f7e30ec
Change package name
leonardehrenfried Dec 4, 2024
ee0e79d
More spelling correction
leonardehrenfried Dec 4, 2024
c74c9e5
Merge branch 'dev-2.x' into fix-update-lag
miklcct Dec 4, 2024
be21d1a
Fix spelling of 'Lite'
leonardehrenfried Dec 9, 2024
6e17055
Update application/src/main/java/org/opentripplanner/updater/siri/upd…
leonardehrenfried Dec 11, 2024
4974223
Update application/src/main/java/org/opentripplanner/updater/siri/upd…
leonardehrenfried Dec 11, 2024
ed76a4d
Don't use getClass()
leonardehrenfried Dec 11, 2024
3b06b85
Use shorter name for parameters
leonardehrenfried Dec 11, 2024
71fae3d
Use shorter name for SIRI-SX
leonardehrenfried Dec 11, 2024
790bdc6
Build SIRI loader in factory, inject into source
leonardehrenfried Dec 11, 2024
ebcaca2
Merge remote-tracking branch 'upstream/dev-2.x' into siri-light
leonardehrenfried Dec 11, 2024
ec9e724
Fix spelling of SIRI-ET
leonardehrenfried Dec 11, 2024
0944921
extract future handling logic to a new method
miklcct Dec 12, 2024
4df65a1
add feature flag
miklcct Dec 12, 2024
d8a34dd
refactor update graph logic to PollingGraphUpdater
miklcct Dec 12, 2024
69ac485
add test for desired feature flag
miklcct Dec 12, 2024
0037b5a
implement feature flag
miklcct Dec 12, 2024
defdf5f
Introduce factory
leonardehrenfried Dec 13, 2024
2ce1a6d
Merge branch 'dev-2.x' into fix-update-lag
miklcct Dec 17, 2024
fd0b1fe
Update protobuf, OSM parser and Google cloud tools
leonardehrenfried Dec 17, 2024
de1e23d
Re-enable file loader for SIRI-SX
leonardehrenfried Dec 18, 2024
5cc6812
Specify version in parent pom
leonardehrenfried Dec 19, 2024
48ccd36
fix(deps): update dependency org.entur:siri-java-model to v1.28
renovate[bot] Dec 20, 2024
7f4ee90
fix(deps): update lucene.version to v10
renovate[bot] Jan 1, 2025
9a3fec8
Update code to Lucene 10
leonardehrenfried Jan 3, 2025
1518e38
Apply review feedback
leonardehrenfried Jan 3, 2025
df53a35
Merge pull request #6284 from leonardehrenfried/siri-light
leonardehrenfried Jan 3, 2025
509094c
Add changelog entry for #6284 [ci skip]
Jan 3, 2025
249b01b
Update list of GTFS Fares v2 classes
leonardehrenfried Jan 3, 2025
21f15bd
Update to latest OBA
leonardehrenfried Jan 3, 2025
c0f7a3f
Merge branch 'dev-2.x' into fix-update-lag
miklcct Jan 7, 2025
af5fe63
Merge pull request #6347 from opentripplanner/renovate/siri-java-mode…
vpaturet Jan 7, 2025
5d4911b
fix(deps): update micrometer to v1.14.2
renovate[bot] Jan 7, 2025
f3ed454
Merge remote-tracking branch 'upstream/dev-2.x' into upgrade-protobuf
leonardehrenfried Jan 7, 2025
d61504a
Merge pull request #6364 from opentripplanner/renovate/micrometer
vpaturet Jan 7, 2025
fb9bad6
Merge remote-tracking branch 'upstream/dev-2.x' into upgrade-protobuf
leonardehrenfried Jan 7, 2025
51080a8
fix(deps): update dependency com.google.guava:guava to v33.4.0-jre
renovate[bot] Jan 7, 2025
72019c0
Add a matcher API for filters in the transit service used for regular…
eibakke Jan 7, 2025
1ebb855
Add changelog entry for #6234 [ci skip]
Jan 7, 2025
f8b51d9
Fix spelling of SIRI [ci skip]
leonardehrenfried Jan 8, 2025
0fb152d
Merge pull request #6354 from opentripplanner/renovate/major-lucene.v…
leonardehrenfried Jan 9, 2025
1bfc833
Fix ScheduledTransitAlertBuilder
leonardehrenfried Jan 8, 2025
665a2d2
Merge remote-tracking branch 'upstream/dev-2.x' into upgrade-protobuf
leonardehrenfried Jan 9, 2025
74241bd
Merge branch 'dev-2.x' into fix-update-lag
miklcct Jan 9, 2025
e439f87
Merge pull request #6366 from opentripplanner/renovate/guava-monorepo
vpaturet Jan 9, 2025
b0b8661
Merge pull request #6262 from Jnction/fix-update-lag
t2gran Jan 9, 2025
7163f6a
Add changelog entry for #6262 [ci skip]
Jan 9, 2025
be21661
Merge pull request #6358 from leonardehrenfried/faresv2-classes
leonardehrenfried Jan 9, 2025
2bf1fde
Merge remote-tracking branch 'upstream/dev-2.x' into upgrade-protobuf
leonardehrenfried Jan 9, 2025
98d8fd8
Remove unused import
leonardehrenfried Jan 9, 2025
f53245f
Fix formatting
leonardehrenfried Jan 9, 2025
0b8b82b
Merge pull request #6342 from leonardehrenfried/upgrade-protobuf
leonardehrenfried Jan 9, 2025
81d6c9b
fix(deps): update jersey monorepo to v3.1.10
renovate[bot] Jan 9, 2025
ffa99ab
Automerge patch version of jersey [ci skip]
leonardehrenfried Jan 9, 2025
969fb44
Merge pull request #6369 from opentripplanner/renovate/jersey-monorepo
leonardehrenfried Jan 9, 2025
edc3a7f
Automerge protobuf only once a month [ci skip]
leonardehrenfried Jan 9, 2025
c5d1183
Move TestDataFetcherDecorator to correct package path
cedarbaum Jan 10, 2025
872dbb3
Add explicit cast when calling createFromDocumentedEnum
cedarbaum Jan 10, 2025
e23144b
Add type annotation to OccupancyStatus instead of explicit cast
cedarbaum Jan 10, 2025
025e4c4
Merge pull request #6374 from cedarbaum/fix_lsp_errors
leonardehrenfried Jan 10, 2025
6a540d1
Remove testower from reviewers of jersey [ci skip]
leonardehrenfried Jan 10, 2025
86bb4b8
Merge remote-tracking branch 'upstream/dev-2.x' into upstream-merge-2…
leonardehrenfried Jan 10, 2025
35482d5
Re-enable Denver smoke tests
leonardehrenfried Jan 10, 2025
7dc4986
Skip SEPTA smoke tests
leonardehrenfried Jan 10, 2025
1eb0556
chore(deps): update dependency jsdom to v26
renovate[bot] Jan 10, 2025
8e1da42
Fix SEPTA smoke test
leonardehrenfried Jan 10, 2025
953d6c0
Merge pull request #6376 from opentripplanner/renovate/jsdom-26.x
leonardehrenfried Jan 10, 2025
77e2908
fix(deps): update debug ui dependencies (non-major)
renovate[bot] Jan 10, 2025
b297d9a
Merge pull request #6359 from opentripplanner/renovate/debug-ui-depen…
leonardehrenfried Jan 11, 2025
71bb5fa
Upgrade debug client to version 2025/01/2025-01-11T19:23
Jan 11, 2025
5d02122
Merge pull request #6368 from leonardehrenfried/fix-alerts
leonardehrenfried Jan 13, 2025
0312487
Add changelog entry for #6368 [ci skip]
Jan 13, 2025
53249fb
Merge remote-tracking branch 'upstream/dev-2.x' into upstream-merge-2…
leonardehrenfried Jan 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
sleep: 15
- name: houston
sleep: 30
#- name: denver
# sleep: 15
- name: septa
- name: denver
sleep: 15
#- name: septa
# sleep: 15
- name: portland
# have to sleep longer since computing geofencing zones takes a while
sleep: 125
Expand Down
8 changes: 4 additions & 4 deletions application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
<dependency>
<groupId>org.onebusaway</groupId>
<artifactId>onebusaway-gtfs</artifactId>
<version>4.3.0</version>
<version>5.0.0</version>
</dependency>
<!-- Processing is used for the debug GUI (though we could probably use just Java2D) -->
<dependency>
Expand All @@ -318,9 +318,9 @@
</dependency>
<!-- OpenStreetMap protobuf (PBF) definitions and parser -->
<dependency>
<groupId>org.openstreetmap.osmosis</groupId>
<artifactId>osmosis-osm-binary</artifactId>
<version>0.48.3</version>
<groupId>org.openstreetmap.pbf</groupId>
<artifactId>osmpbf</artifactId>
<version>1.6.0</version>
</dependency>
<!-- Command line parameter parsing -->
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions application/src/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<link rel="icon" type="image/svg+xml" href="/img/otp-logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OTP Debug</title>
<script type="module" crossorigin src="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2025/01/2025-01-02T15:56/assets/index-DODY0n0n.js"></script>
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2025/01/2025-01-02T15:56/assets/index-BDL0-veX.css">
<script type="module" crossorigin src="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2025/01/2025-01-11T19:23/assets/index-D--h-dOg.js"></script>
<link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/gh/opentripplanner/debug-client-assets@main/2025/01/2025-01-11T19:23/assets/index-BDL0-veX.css">
</head>
<body>
<div id="root"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.PostingsFormat;
import org.apache.lucene.codecs.lucene912.Lucene912Codec;
import org.apache.lucene.codecs.lucene101.Lucene101Codec;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field.Store;
import org.apache.lucene.document.StoredField;
Expand All @@ -34,7 +34,7 @@
import org.apache.lucene.search.FuzzyQuery;
import org.apache.lucene.search.PrefixQuery;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.suggest.document.Completion912PostingsFormat;
import org.apache.lucene.search.suggest.document.Completion101PostingsFormat;
import org.apache.lucene.search.suggest.document.CompletionAnalyzer;
import org.apache.lucene.search.suggest.document.ContextQuery;
import org.apache.lucene.search.suggest.document.ContextSuggestField;
Expand Down Expand Up @@ -203,8 +203,8 @@ private StopCluster toStopCluster(Document document) {

static IndexWriterConfig iwcWithSuggestField(Analyzer analyzer, final Set<String> suggestFields) {
IndexWriterConfig iwc = new IndexWriterConfig(analyzer);
Codec filterCodec = new Lucene912Codec() {
final PostingsFormat postingsFormat = new Completion912PostingsFormat();
Codec filterCodec = new Lucene101Codec() {
final PostingsFormat postingsFormat = new Completion101PostingsFormat();

@Override
public PostingsFormat getPostingsFormatForField(String field) {
Expand Down Expand Up @@ -285,7 +285,7 @@ private Stream<Document> matchingDocuments(
.stream(topDocs.scoreDocs)
.map(scoreDoc -> {
try {
return searcher.doc(scoreDoc.doc);
return searcher.storedFields().document(scoreDoc.doc);
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -330,7 +330,7 @@ private Stream<Document> matchingDocuments(
.stream(topDocs.scoreDocs)
.map(scoreDoc -> {
try {
return searcher.doc(scoreDoc.doc);
return searcher.storedFields().document(scoreDoc.doc);
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public ParkAndRideResource(
// - serverContext.graphFinder(). This needs at least a comment!
// - This can be replaced with a search done with the SiteRepository
// - if we have a radius search there.
this.graphFinder = new DirectGraphFinder(serverContext.transitService()::findRegularStops);
this.graphFinder = new DirectGraphFinder(serverContext.transitService()::findRegularStopsByBoundingBox);
}

/** Envelopes are in latitude, longitude format */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public List<ApiStopShort> getStopsInRadius(

radius = Math.min(radius, MAX_STOP_SEARCH_RADIUS);

return new DirectGraphFinder(serverContext.transitService()::findRegularStops)
return new DirectGraphFinder(serverContext.transitService()::findRegularStopsByBoundingBox)
.findClosestStops(new Coordinate(lon, lat), radius)
.stream()
.map(it -> StopMapper.mapToApiShort(it.stop, it.distance))
Expand All @@ -221,10 +221,9 @@ public List<ApiStopShort> getStopsInRadius(
new Coordinate(maxLon, maxLat)
);

var stops = transitService().findRegularStops(envelope);
var stops = transitService().findRegularStopsByBoundingBox(envelope);
return stops
.stream()
.filter(stop -> envelope.contains(stop.getCoordinate().asJtsCoordinate()))
.map(StopMapper::mapToApiShort)
.toList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public StopsLayerBuilder(

protected List<Geometry> getGeometries(Envelope query) {
return transitService
.findRegularStops(query)
.findRegularStopsByBoundingBox(query)
.stream()
.filter(filter)
.map(stop -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,8 @@ public DataFetcher<Iterable<Object>> stopsByBbox() {
);

Stream<RegularStop> stopStream = getTransitService(environment)
.findRegularStops(envelope)
.stream()
.filter(stop -> envelope.contains(stop.getCoordinate().asJtsCoordinate()));
.findRegularStopsByBoundingBox(envelope)
.stream();

if (args.getGraphQLFeeds() != null) {
List<String> feedIds = args.getGraphQLFeeds();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static java.lang.Boolean.TRUE;
import static java.util.Collections.emptyList;
import static org.opentripplanner.apis.transmodel.mapping.SeverityMapper.getTransmodelSeverity;
import static org.opentripplanner.apis.transmodel.mapping.TransitIdMapper.mapIDToDomain;
import static org.opentripplanner.apis.transmodel.mapping.TransitIdMapper.mapIDsToDomainNullSafe;
import static org.opentripplanner.apis.transmodel.model.EnumTypes.FILTER_PLACE_TYPE_ENUM;
import static org.opentripplanner.apis.transmodel.model.EnumTypes.MULTI_MODAL_MODE;
Expand Down Expand Up @@ -115,6 +116,7 @@
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.FindRegularStopsByBoundingBoxRequest;
import org.opentripplanner.transit.api.request.TripRequest;
import org.opentripplanner.transit.model.basic.TransitMode;
import org.opentripplanner.transit.model.framework.FeedScopedId;
Expand Down Expand Up @@ -439,10 +441,7 @@ private GraphQLSchema create() {
.build()
)
.dataFetcher(env ->
StopPlaceType.fetchStopPlaceById(
TransitIdMapper.mapIDToDomain(env.getArgument("id")),
env
)
StopPlaceType.fetchStopPlaceById(mapIDToDomain(env.getArgument("id")), env)
)
.build()
)
Expand Down Expand Up @@ -576,7 +575,7 @@ private GraphQLSchema create() {
.dataFetcher(environment ->
GqlUtil
.getTransitService(environment)
.getStopLocation(TransitIdMapper.mapIDToDomain(environment.getArgument("id")))
.getStopLocation(mapIDToDomain(environment.getArgument("id")))
)
.build()
)
Expand Down Expand Up @@ -610,7 +609,7 @@ private GraphQLSchema create() {
}
TransitService transitService = GqlUtil.getTransitService(environment);
return ((List<String>) environment.getArgument("ids")).stream()
.map(id -> transitService.getStopLocation(TransitIdMapper.mapIDToDomain(id)))
.map(id -> transitService.getStopLocation(mapIDToDomain(id)))
.collect(Collectors.toList());
}
if (environment.getArgument("name") == null) {
Expand Down Expand Up @@ -661,15 +660,22 @@ private GraphQLSchema create() {
.build()
)
.argument(
GraphQLArgument.newArgument().name("authority").type(Scalars.GraphQLString).build()
GraphQLArgument
.newArgument()
.name("authority")
.deprecate(
"This is the Transmodel namespace or the GTFS feedID - avoid using this. Request a new field if necessary."
)
.type(Scalars.GraphQLString)
.build()
)
.argument(
GraphQLArgument
.newArgument()
.name("filterByInUse")
.description("If true only quays with at least one visiting line are included.")
.type(Scalars.GraphQLBoolean)
.defaultValue(Boolean.FALSE)
.defaultValueProgrammatic(Boolean.FALSE)
.build()
)
.dataFetcher(environment -> {
Expand All @@ -683,24 +689,19 @@ private GraphQLSchema create() {
environment.getArgument("maximumLatitude")
)
);

var authority = environment.<String>getArgument("authority");
var filterInUse = environment.<Boolean>getArgument("filterByInUse");

FindRegularStopsByBoundingBoxRequest findRegularStopsByBoundingBoxRequest = FindRegularStopsByBoundingBoxRequest
.of(envelope)
.withFeedId(authority)
.filterByInUse(filterInUse)
.build();

return GqlUtil
.getTransitService(environment)
.findRegularStops(envelope)
.stream()
.filter(stop -> envelope.contains(stop.getCoordinate().asJtsCoordinate()))
.filter(stop ->
environment.getArgument("authority") == null ||
stop.getId().getFeedId().equalsIgnoreCase(environment.getArgument("authority"))
)
.filter(stop -> {
boolean filterByInUse = TRUE.equals(environment.getArgument("filterByInUse"));
boolean inUse = !GqlUtil
.getTransitService(environment)
.findPatterns(stop, true)
.isEmpty();
return !filterByInUse || inUse;
})
.collect(Collectors.toList());
.findRegularStopsByBoundingBox(findRegularStopsByBoundingBoxRequest);
})
.build()
)
Expand Down Expand Up @@ -1438,7 +1439,7 @@ private GraphQLSchema create() {
.build()
)
.dataFetcher(environment -> {
var bikeParkId = TransitIdMapper.mapIDToDomain(environment.getArgument("id"));
var bikeParkId = mapIDToDomain(environment.getArgument("id"));
return GqlUtil
.getVehicleParkingService(environment)
.listBikeParks()
Expand Down Expand Up @@ -1573,7 +1574,7 @@ private GraphQLSchema create() {
return GqlUtil
.getTransitService(environment)
.getTransitAlertService()
.getAlertById(TransitIdMapper.mapIDToDomain(situationNumber));
.getAlertById(mapIDToDomain(situationNumber));
})
.build()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,8 @@ public static Collection<MonoOrMultiModalStation> fetchStopPlaces(
);

Stream<Station> stations = transitService
.findRegularStops(envelope)
.findRegularStopsByBoundingBox(envelope)
.stream()
.filter(stop -> envelope.contains(stop.getCoordinate().asJtsCoordinate()))
.map(StopLocation::getParentStation)
.filter(Objects::nonNull)
.distinct();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private static LayerBuilder<?> createLayerBuilder(
case RegularStop -> new StopLayerBuilder<>(
layerParameters,
locale,
e -> context.transitService().findRegularStops(e)
e -> context.transitService().findRegularStopsByBoundingBox(e)
);
case AreaStop -> new StopLayerBuilder<>(
layerParameters,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ public enum OTPFeature {
false,
"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."
),
WaitForGraphUpdateInPollingUpdaters(
true,
false,
"Make all polling updaters wait for graph updates to complete before finishing. " +
"If this is not enabled, the updaters will finish after submitting the task to update the graph."
),
Co2Emissions(false, true, "Enable the emissions sandbox module."),
DataOverlay(
false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public StraightLineNearbyStopFinder(TransitService transitService, Duration dura
// We need to accommodate straight line distance (in meters) but when streets are present we
// use an earliest arrival search, which optimizes on time. Ideally we'd specify in meters,
// but we don't have much of a choice here. Use the default walking speed to convert.
this.directGraphFinder = new DirectGraphFinder(transitService::findRegularStops);
this.directGraphFinder = new DirectGraphFinder(transitService::findRegularStopsByBoundingBox);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.onebusaway.csv_entities.EntityHandler;
import org.onebusaway.gtfs.impl.GtfsRelationalDaoImpl;
import org.onebusaway.gtfs.model.Agency;
import org.onebusaway.gtfs.model.Area;
import org.onebusaway.gtfs.model.FareAttribute;
import org.onebusaway.gtfs.model.FareLegRule;
import org.onebusaway.gtfs.model.FareMedium;
Expand All @@ -27,7 +28,7 @@
import org.onebusaway.gtfs.model.ServiceCalendarDate;
import org.onebusaway.gtfs.model.ShapePoint;
import org.onebusaway.gtfs.model.Stop;
import org.onebusaway.gtfs.model.StopArea;
import org.onebusaway.gtfs.model.StopAreaElement;
import org.onebusaway.gtfs.model.Trip;
import org.onebusaway.gtfs.serialization.GtfsReader;
import org.onebusaway.gtfs.services.GenericMutableDao;
Expand Down Expand Up @@ -66,7 +67,8 @@ public class GtfsModule implements GraphBuilderModule {
FareTransferRule.class,
RiderCategory.class,
FareMedium.class,
StopArea.class
StopAreaElement.class,
Area.class
);

private static final Logger LOG = LoggerFactory.getLogger(GtfsModule.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ protected ScheduledTransitLeg(ScheduledTransitLegBuilder<?> builder) {
getDistanceFromCoordinates(
List.of(transitLegCoordinates.getFirst(), transitLegCoordinates.getLast())
);
this.transitAlerts.addAll(builder.alerts());
}

public ZoneId getZoneId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.HashSet;
import java.util.Set;
import org.opentripplanner.model.transfer.ConstrainedTransfer;
import org.opentripplanner.routing.alertpatch.TransitAlert;
import org.opentripplanner.transit.model.network.TripPattern;
import org.opentripplanner.transit.model.timetable.TripOnServiceDate;
import org.opentripplanner.transit.model.timetable.TripTimes;
Expand All @@ -23,6 +26,7 @@ public class ScheduledTransitLegBuilder<B extends ScheduledTransitLegBuilder<B>>
private ConstrainedTransfer transferToNextLeg;
private int generalizedCost;
private Float accessibilityScore;
private Set<TransitAlert> alerts = new HashSet<>();

public ScheduledTransitLegBuilder() {}

Expand All @@ -40,6 +44,7 @@ public ScheduledTransitLegBuilder(ScheduledTransitLeg original) {
generalizedCost = original.getGeneralizedCost();
accessibilityScore = original.accessibilityScore();
zoneId = original.getZoneId();
alerts = original.getTransitAlerts();
}

public B withTripTimes(TripTimes tripTimes) {
Expand Down Expand Up @@ -159,6 +164,10 @@ public Float accessibilityScore() {
return accessibilityScore;
}

public Set<TransitAlert> alerts() {
return alerts;
}

public ScheduledTransitLeg build() {
return new ScheduledTransitLeg(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.opentripplanner.osm;

import crosby.binary.BinaryParser;
import crosby.binary.Osmformat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.openstreetmap.osmosis.osmbinary.BinaryParser;
import org.openstreetmap.osmosis.osmbinary.Osmformat;
import org.opentripplanner.graph_builder.module.osm.OsmDatabase;
import org.opentripplanner.osm.model.OsmMemberType;
import org.opentripplanner.osm.model.OsmNode;
Expand Down
Loading
Loading