Version | Release Date | Contributors |
---|---|---|
0.5 | 21st Feb, 2022 | Nirmal Rajeevan |
None
A simple BPP implementation that converts GTFS data into a beckn catalog. Discovery flow is implemented here. Transfers are currently not supported.
This application reads static GTFS data from gtfs-data folder and returns catalog of available fare products between stations including the schedule and fare.
You can find exact mappings of GTFS to beckn schema here.
You can find a general how it works document here.
This application can be installed just like any other NodeJS application by running,
npm install
To build this application, just run
npm run build
Run the following command :
docker build . -t gtfs-bpp
To run the built image run the command :
docker run -p 8000:8000 --name gtfs-bpp-image --env MAPS_KEY=< key > gtfs-bpp
The following environment variables should be set.
MAPS_KEY
: Google maps API key for location matrix APIsign_public_key
: Signing public keysign_private_key
: Signing public keybpp_id
bpp_uri
registry_url
unique_key_id
country
: Default value set as "IND"domain
: Default value set as "nic2004:60212"city
: Default value set as ""core_version
: Default value set as "0.9.3"ENABLE_LOCATION_SERVICES
: Iftrue
will take in the start and end GPS coordinates, finds the closest stations to the coordinates and returns ticket information for trips between the them. Else will return a list of all stops if GPS coordinates are passed.
THRESHOLD_DISTANCE_KM
: Threshold to select next closest station (default: 0.50)MAX_STATIONS
: Maximum number of nearest stations to return for a location (default:2)DISTANCE_LIMIT_KM
: Maximum distance from which closest station should be returned (default:15)