GTFS-RT Import does not apply the prefix.
Hello,
As the title says the GTFS-RT import does not apply the prefix when it imports the data to the DB.
I am refering to the updateGtfsRealtime() function.
This causes problems because ids dont match between GTFS and GTFS-RT data if only one of them applies the prefix.
Hi,
The updateGtfsRealtime function should be applying any prefixes specified in config.json.
Can you share with me your config.json that you are using?
Sure, here it goes:
`import { Config } from "gtfs"
const gtfsConfig: Config = { sqlitePath: "./db/gtfs.db",
ignoreDuplicates: false, agencies: [ { url: "https://opendata.euskadi.eus/transport/moveuskadi/dbus/gtfs_dbus.zip", prefix: "dbus", realtimeTripUpdates: { url: "https://opendata.euskadi.eus/transport/moveuskadi/dbus/gtfsrt_dbus_trip_updates.pb", }, }, { url: "https://opendata.euskadi.eus/transport/moveuskadi/euskotren/gtfs_euskotren.zip", prefix: "euskotren", realtimeTripUpdates: { url: "https://opendata.euskadi.eus/transport/moveuskadi/euskotren/gtfsrt_euskotren_trip_updates.pb", }, }, ], }
export { gtfsConfig } `
Thank you for looking into this.
Thanks for sharing.
Can you tell me which version of node-gifs you are using? If part of a project, check your node_modules/gtfs/package.json file to see what version is actually installed.
Hi, sorry for the delay in my response.
I am using version 4.16.0
Thanks!
This prefixing issue was fixed in node-gifs version 4.17.1. Try updating to the latest version and it should work as expected.