Skip to content

NextDepartures is a .NET Library that queries GTFS (General Transit Feed Specification) data sets stored locally or in an Azure SQL Database. The library will work with any well formed GTFS data set.

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

NextDepartures

NextDepartures is a .NET Library that queries GTFS (General Transit Feed Specification) data sets stored locally or in an Azure SQL Database. The library will work with any well formed GTFS data set.

  • Build Status: Build Status
  • NextDepartures.Standard: NuGet Version NextDepartures.Standard on fuget.org
  • NextDepartures.Storage.GTFS: NuGet Version NextDepartures.Storage.GTFS on fuget.org
  • NextDepartures.Storage.SqlServer: NuGet Version NextDepartures.Storage.SqlServer on fuget.org

Local GTFS Usage

Connect to the library:

using NextDepartures.Standard;
using NextDepartures.Storage.GTFS;

Feed feed = await Feed.Load(GTFSStorage.Load([path]));
  • [path] > Path to GTFS data set .zip or directory. Required.

SQL Server Usage

Build the data from the database project:

dotnet run -d [--database] -g [--gtfs]
  • [database] > Database connection string. Required.
  • [gtfs] > Path to GTFS data set .zip or directory. Required.

Connect to the library:

using NextDepartures.Standard;
using NextDepartures.Storage.SqlServer;

Feed feed = await Feed.Load(SqlServerStorage.Load([database]));
  • [database] > Database connection string. Required.

Agencies Endpoints

Once connected to the library:

List<Agency> results = await feed.GetAgenciesByEmailAsync();
List<Agency> results = await feed.GetAgenciesByFareURLAsync();
List<Agency> results = await feed.GetAgenciesByLanguageCodeAsync();
List<Agency> results = await feed.GetAgenciesByPhoneAsync();
List<Agency> results = await feed.GetAgenciesByQueryAsync();
List<Agency> results = await feed.GetAgenciesByTimezoneAsync();
List<Agency> results = await feed.GetAgenciesByURLAsync();

Services Endpoints

Once connected to the library:

List<Service> results = await feed.GetServicesByParentStationAsync();
List<Service> results = await feed.GetServicesByStopAsync();
List<Service> results = await feed.GetServicesByTripAsync();

Stops Endpoints

Once connected to the library:

List<Stop> results = await feed.GetStopsByDescriptionAsync();
List<Stop> results = await feed.GetStopsByLevelAsync();
List<Stop> results = await feed.GetStopsByLocationAsync();
List<Stop> results = await feed.GetStopsByLocationTypeAsync();
List<Stop> results = await feed.GetStopsByParentStationAsync();
List<Stop> results = await feed.GetStopsByPlatformCodeAsync();
List<Stop> results = await feed.GetStopsByQueryAsync();
List<Stop> results = await feed.GetStopsByTimezoneAsync();
List<Stop> results = await feed.GetStopsByURLAsync();
List<Stop> results = await feed.GetStopsByWheelchairBoardingAsync();
List<Stop> results = await feed.GetStopsByZoneAsync();

License

Licensed under the MIT License.

About

NextDepartures is a .NET Library that queries GTFS (General Transit Feed Specification) data sets stored locally or in an Azure SQL Database. The library will work with any well formed GTFS data set.

Topics

Resources

License

Stars

Watchers

Forks

Languages