Class GTFSParser
java.lang.Object
rgu.transport.geospatial.multimodal.gtfs.GTFSParser
Utility class to load GTFS data files as a TransitNetwork.
- Author:
- Lee A. Christie
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidload(GTFSDataSource source, TransitNetwork.Builder builder, Range<LocalDate> dateRange, Predicate<GeoLocation> locationFilter, boolean allowBrokenRoutes, GTFSProgressListener progress, AtomicReference<Runnable> cancel, BiConsumer<GeoLocation, GeoLocation> edgeLocationConsumer) Loads the specified GTFS data source.
-
Method Details
-
load
public static void load(GTFSDataSource source, TransitNetwork.Builder builder, Range<LocalDate> dateRange, Predicate<GeoLocation> locationFilter, boolean allowBrokenRoutes, GTFSProgressListener progress, AtomicReference<Runnable> cancel, BiConsumer<GeoLocation, GeoLocation> edgeLocationConsumer) throws IOException, InterruptedException Loads the specified GTFS data source.- Parameters:
source- the data source, not nullbuilder- the network builder, not nulldateRange- the data range, not nulllocationFilter- the location filter, not nullallowBrokenRoutes- if true, routes can be split up if there are missing stop coordinates, not nullprogress- the progress listener, not nullcancel- the cancel operation to pass to the progress listener, no nulledgeLocationConsumer- a consumer for pairs of geolocations connected by an edge- Throws:
IOException- if an error was encountered in parsing the data sourceInterruptedException- if the thread was interrupted
-