A utility package to read the contents of a GTFS Schedule dataset.
Features
- GTFS Schedule
-
Files
xagency.txtxstops.txtxroutes.txtxtrips.txtxstop_times.txtxcalendar.txtxcalendar_dates.txt
Unsupported files (WIP)
fare_attributes.txtfare_rules.txttimeframes.txtfare_media.txtfare_products.txtfare_leg_rules.txtfare_leg_join_rules.txtareas.txtstop_areas.txtnetworks.txtroute_networks.txtshapes.txtfrequencies.txttransfers.txtpathways.txtlevels.txtlocation_groups.txtlocation_group_stops.txtlocations.geojsonbooking_rules.txttranslations.txtfeed_info.txtattributions.txt
-
Features
xLoad data from any supported file using query parametersxList services for one or more daysxWorks with streamed dataxList directions for a routexSee next departures from a stop
-
GTFS Realtime
Getting started
Add this package to your Dart/Flutter project :
dart pub add gtfs_bindings
flutter pub add gtfs_bindings
Usage
Schedule
Construct a GTFSDataset, populate (load in memory) its primary bindings, enjoy.
import 'package:gtfs_bindings/schedule.dart';
import 'package:path_provider/path_provider.dart';
Future<void> main() async {
final dataset = DownloadableDataset(uri); // Place the URL to the dataset here.
await dataset.pipe(tempDir: await getTemporaryDirectory()); // Will download and cache the dataset (do not fill tempDir while on Web).
await dataset.populateList(dataset.primaryBindings); // Will load the main small files into memory for faster access.
}
Additional information
WIP: THIS IS NOT STABLE. The API may change at any instant. Please wait for 1.0.0 to start deeply integrating any function. The actual APIs to query data are stable
Libraries
- schedule
- Support for doing something awesome.
- schedule_fast_seek