Skip to content

NextDepartures is a .NET Standard 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 Standard 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

Prerequisites

Ensure you already have:

  • Azure SQL Database. You can create a database using the Azure Portal here.
  • GTFS (General Transit Feed Specification) data sets can be downloaded from here.

Usage

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

Feed feed = await Feed.Load(GTFSStorage.Load([path]));
Feed feed = await Feed.Load(SqlServerStorage.Load([database]));
  • If you are working with a UNIX based system and using the NextDepartures.Storage.SqlServer library you may need to include the following setting in your database connection string:
MultipleActiveResultSets=True;

Endpoints

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

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();
using NextDepartures.Standard;
using NextDepartures.Storage.GTFS;
using NextDepartures.Storage.SqlServer;

List<Service> results = await feed.GetServicesByParentStationAsync();
List<Service> results = await feed.GetServicesByStopAsync();
List<Service> results = await feed.GetServicesByTripAsync();
using NextDepartures.Standard;
using NextDepartures.Storage.GTFS;
using NextDepartures.Storage.SqlServer;

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 Standard 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

Languages