hove-io / transit_model

Managing transit data with Rust
GNU Affero General Public License v3.0
53 stars 28 forks source link

gtfs2ntfs : new way to generate prefixes ? #682

Closed Kalmac closed 4 years ago

Kalmac commented 4 years ago

Hello,

since v0.25.0, trip's prefixes are not handled the same way as before :

v0.24.0

gtfs2ntfs -i input/ -o output -c config.json -p cfd

T2C11821953316814874|13934463:T100|13:56:00 -> cfd:T2C11821953316814874|13934463:T100|13:56:00

v0.25.0

gtfs2ntfs -i input/ -o output -c config.json -p cfd

T2C11821953316814874|13934463:T100|13:56:00 -> cfd:clermo:T2C11821953316814874|13934463:T100|13:56:00

gtfs2ntfs adds 6 characters to prefix for trips. It seems inconsistent since stop ids are prefixed only with the prefix given as before.

Seems to be related to this change

ArnaudOggy commented 4 years ago

We have chosen to add a sub-prefix ("clermo" in your example) to some data identifiers. The aim is to segment "schedule" data (e.g.: calendars, trips, trip_properties, frequencies, stop_times) and "referential" data (e.g.: networks, lines, stopareas, stoppoints). Only "schedule" data are now sub-prefixed. This was done to facilitate merging of several datasets with duplicate identifiers (for example a winter circulation set, and a summer one). Some data contributors can indeed (through their graphing tools) fully duplicate a dataset from one season to the next.

An update of gtfs2ntfs specifications (https://github.com/CanalTP/transit_model/blob/master/documentation/gtfs_to_ntfs_specs.md) will be coming soon to clarify this.

Hoping to have answered your question and explained this evolution.

Kalmac commented 4 years ago

Thanks for the clarification.

I'll have to handle this breaking change by myself.

pbougue commented 4 years ago

Hello @Kalmac

Just to let you know that starting from the 0.30 version*, the behavior is changed, introducing a specific parameter to activate or not the subprefix: https://github.com/CanalTP/transit_model/pull/688 So if you don't pass the parameter, the behavior should be the same as in 0.24.

* : 0.X versions are considered majors (breaking) before 1.0.0

Kalmac commented 4 years ago

Hi @pbougue,

Cool ! I will be more carefull waiting the 1.0.0 version :)

thanks