planarnetwork / dtd2mysql

MySQL / MariaDB import for DTD feeds (fares, timetable and routeing)
30 stars 10 forks source link

Critical problem with route_type. Bus and rail trips under one route #61

Closed tafflin closed 3 years ago

tafflin commented 3 years ago

Hi, I found a critical problem which has an impact on companies using atoc rail data to create shapes and in some other cases.

The problem is that the same route can have trips which belong to different route_types.

I looked throught the .MCA file provided by http://data.atoc.org and I can see that the trips of train category OO/XX (route_type=2) and BR (route_type=714) are linked to the same route which has a route_type=2. I checked the data by train_uid and retail_train_id. The result of the issue is that in GTFS we get a mixed mode route.

Impact: Companies using such GTFS files to generate shapes will have problems trying to generate rail shapes for bus trips. The stop locations of such replacement bus stops are far off the rail tracks

linusnorton commented 3 years ago

I thought the route took into account the mode, I'll check

linusnorton commented 3 years ago

@tafflin please try again with release 6.4.1

tafflin commented 3 years ago

@linusnorton hi, thanks for the quick update. I can see that you updated the versions of dependencies. I will let you know asap if that helped

tafflin commented 3 years ago

@linusnorton I compared the new version result and the older version result and they are equal. The bus trip with route_type=714 (according to the source .mca file) still belongs to the route_type=2 in converted GTFS. Here is the file I tried converting: https://drive.google.com/file/d/1yIkGpbC96KGYtGFRfoi_6NdlBW8uWJ57/view?usp=sharing

tafflin commented 3 years ago

Hi @linusnorton , Did you have time to think of a possible solution? It's quite an urgent problem for us. Do you need maybe additional information from my side? I checked the conversion once again today on our server with the new source data and there are still bus trips connected to train routes in GTFS.

linusnorton commented 3 years ago

I haven't had time to take a look. What TUID is causing the problem?

tafflin commented 3 years ago

train_uid=S12059

linusnorton commented 3 years ago

@tafflin this should be fixed in 6.4.2

tafflin commented 3 years ago

@linusnorton thank you. I can see ~500 new routes and the situation with replacement buses looks solved.