Till senaste kommentaren
Detta inlägg är gammalt och kan innehålla inaktuell information.

Vill ni ha rapporter om fel här i forumet eller via annan kanal?

Vill ni ha rapporter om alla konstigheter man hittar? Eller finns det epost för detta för att inte spam:a forumet?
För att kunna animera trips skapar jag approximativa shape_dist_traveled i shapes och stop_times och stöter ibland på konstigheter.

Exempel 1
Data: GTFS3 Sweden, 20230203

Trips med shapes där 1 stop inte hittas i shape (distnotok är antalet stops som inte hittats i shape även med generösa toleranser när jag kopplar ihop dem, enligt https://developers.google.com/transit/gtfs/guides/best-practices ska stop ligga högst 100 m från shape):"agency_id","agency_name","cnt","distnotok","distok","route_id","route_short_name","shape_id","trip_id"
"505000000000000023","Länstrafiken i Jämtland AB","50","1","49","9011023005600000","56","1232300000000001285","232300000000001285"
"505000000000000023","Länstrafiken i Jämtland AB","52","1","51","9011023005600000","56","1232300000000001281","232300000000001281"
"505000000000000023","Länstrafiken i Jämtland AB","58","1","57","9011023005600000","56","1232300000000001283","232300000000001283"
"505000000000000023","Länstrafiken i Jämtland AB","58","1","57","9011023005600000","56","1232300000000001284","232300000000001284"
"505000000000000023","Länstrafiken i Jämtland AB","60","1","59","9011023005600000","56","1232300000000001276","232300000000001276"
"505000000000000023","Länstrafiken i Jämtland AB","60","1","59","9011023005600000","56","1232300000000001282","232300000000001282"
"505000000000000023","Länstrafiken i Jämtland AB","64","1","63","9011023005600000","56","1232300000000001279","232300000000001279"
"505000000000000023","Länstrafiken i Jämtland AB","65","1","64","9011023005600000","56","1232300000000001287","232300000000001287"

Felet är ett extra stop i Korskrogen, nummer 25 i första trip:en ovan, liknande i övriga trips. Ser ut som att shapen följer huvudvägen men stoppet ligger inne i byn.
"departure_time","route_id","shape_dist_traveled","shape_id","stop_lat","stop_lon","stop_name","stop_sequence","trip_id"
"11:30:00","9011023005600000","0","1232300000000001285","61.826556","16.098369","Ljusdals resecentrum","1","232300000000001285"
"11:31:08","9011023005600000","640.6","1232300000000001285","61.829401","16.089780","Ljusdal Riotorget","2","232300000000001285"
"11:32:07","9011023005600000","1198","1232300000000001285","61.828611","16.080910","Ljusdal Åkersta","3","232300000000001285"
...
"11:46:29","9011023005600000","17767.2","1232300000000001285","61.800386","15.799965","Smens","20","232300000000001285"
"11:46:54","9011023005600000","18289.566667","1232300000000001285","61.802234","15.791299","Snasbäcken","21","232300000000001285"
# Korskrogen korrekt
"11:48:39","9011023005600000","19634.9","1232300000000001285","61.810822","15.754556","Korskrogen","22","232300000000001285"
"11:50:21","9011023005600000","23190.15","1232300000000001285","61.839292","15.751451","Töva","23","232300000000001285"
"11:51:44","9011023005600000","25210.85","1232300000000001285","61.856805","15.745645","Steget","24","232300000000001285"
# Korskrogen "extra"
"11:52:26","9011023005600000","null","1232300000000001285","61.810822","15.754556","Korskrogen","25","232300000000001285"
"11:52:47","9011023005600000","26686.866667","1232300000000001285","61.867979","15.730840","Hovra,Vandrarhemmet","26","232300000000001285"
"11:53:38","9011023005600000","27888.3","1232300000000001285","61.876989","15.718310","Hovrahällarna","27","232300000000001285"
...
"13:05:00","9011023005600000","110787.722727","1232300000000001285","62.035648","14.352773","Sveg järnvägsstation","50","232300000000001285"

Korskrogen är stop:et som ligger väst om shapen
Exempel 2
Alla shapes från Snälltåget/505000000000000662 ser felaktiga ut, de återanvänder stops som shape points förutom två shapes som dock är interpolerade punkter längs raka linjer mellan stops. Jag tycker inte att någon av dessa shapes bör tas med eftersom de inte visar en shape (se exempelbild nedan).
Även shapes med en (1) punkt förekommer. Gissningsvis optimeras upprepade punkter i shapes bort och eftersom koordinaterna är (0,0) för platser där information saknas blir det endast en kvar. Jag tycker att shapes med färre än 2 punkter inte bör förekomma.
Shapes med endast 2 punkter bör endast förekomma om de är korrekt återger en shape (osannolikt men kan teoretiskt set förekomma), förekommer även bland andra operatörer.

Trips med shapes som är 1 punkt långa:
"agency_id","agency_name","cnt","distnotok","distok","route_id","route_short_name","shape_id","trip_id"
"505000000000000662","Snälltåget","2","2","null","9011662003700000","BOK","1747400000000001281","747400000000003162"
"505000000000000662","Snälltåget","2","2","null","9011662003700000","BOK","1747400000000001281","747400000000003151"
"505000000000000662","Snälltåget","2","2","null","9011662003900000","BOK","1747400000000001283","747400000000003168"
"505000000000000662","Snälltåget","2","2","null","9011662003900000","BOK","1747400000000001283","747400000000003153"
"505000000000000662","Snälltåget","2","2","null","9011662004000000","BOK","1747400000000001284","747400000000003169"
"505000000000000662","Snälltåget","2","2","null","9011662004000000","BOK","1747400000000001284","747400000000003154"
"505000000000000662","Snälltåget","2","2","null","9011662004100000","BOK","1747400000000001285","747400000000003177"
"505000000000000662","Snälltåget","2","2","null","9011662004100000","BOK","1747400000000001285","747400000000003166"
"505000000000000662","Snälltåget","2","2","null","9011662004100000","BOK","1747400000000001285","747400000000003155"
"505000000000000662","Snälltåget","2","2","null","9011662004200000","BOK","1747400000000001286","747400000000003156"
"505000000000000662","Snälltåget","2","2","null","9011662004300000","BOK","1747400000000001287","747400000000003182"
"505000000000000662","Snälltåget","2","2","null","9011662004300000","BOK","1747400000000001287","747400000000003157"
"505000000000000662","Snälltåget","2","2","null","9011662004400000","BOK","1747400000000001288","747400000000003158"
"505000000000000662","Snälltåget","2","2","null","9011662004500000","BOK","1747400000000001289","747400000000003159"

Exempel för trip 747400000000003162:
"departure_time","route_id","shape_id","stop_id","stop_lat","stop_lon","stop_name","stop_sequence","trip_id"
"10:20:00","9011662003700000","1747400000000001281","9022050067968001","0","0","St Johann im Pongau","1","747400000000003162"
"10:40:00","9011662003700000","1747400000000001281","9022050059747001","0","0","Wagrain, Parkplatz Grafenberg","2","747400000000003162"

"shape_dist_traveled","shape_id","shape_pt_lat","shape_pt_lon","shape_pt_sequence"
"0","1747400000000001281","0","0","1"

Malmö-Duved trip_id 747400000000003142. 13 stops, 13 shape points.

Henrik H

Kommentarer

  • Hej Henrik,

    Tack för den utförliga beskrivningen. Det går bra att dela såna problem här, då det kan vara intressant för andra som upplever samma problem.

    Angående första problemet har vi ett ärende på detta sedan tidigare, men kommer vi försöka att prioritera upp detta. Det kan dock ta ett tag innan grundproblemet (felaktig indata till oss) är löst.

    När det gäller snälltåget kan jag berätta att detta beror på formatet av den data som vi får in. Vi hanterar dessa data dock på samma sätt som data av högre kvalitet, och därför kommer det ut som raka linjer mellan hållplatser.

    Hälsningar,
    Bert
    Bert på Trafiklab
  • Tack, Snälltåget har många problem, ett av de värre exemplen där de verkat blandat in felaktiga stops:
    "departure_time","shape_id","stop_id","stop_lat","stop_lon","stop_name","stop_sequence","trip_id"
    "18:09:00","4747400000000001282","9022050000522002","57.752712","16.629516","Tjustskolan station","1","747400000000003152"
    "18:45:00","4747400000000001282","9022050000509001","0","0","Jenbach","2","747400000000003152"
    "19:09:00","4747400000000001282","9022050000503001","62.197666","14.856193","Ytterhogdal järnvägsstation","3","747400000000003152"
    "19:44:00","4747400000000001282","9022050059788001","0","0","Kitzbuehel","4","747400000000003152"
    "19:54:00","4747400000000001282","9022050059742001","0","0","St Johann in Tirol","5","747400000000003152"
    "20:34:00","4747400000000001282","9022050000320004","58.141861","11.938867","Svenshögens station","6","747400000000003152"
    "21:06:00","4747400000000001282","9022050000312001","56.957335","13.080462","Torup station","7","747400000000003152"
    "21:13:00","4747400000000001282","9022050067968001","0","0","St Johann im Pongau","8","747400000000003152"
    "21:35:00","4747400000000001282","9022050000308003","0","0","Bischofshofen","9","747400000000003152"
    "22:25:00","4747400000000001282","9022050000462001","60.496072","14.959200","Mockfjärd TÅG","10","747400000000003152"
    "24:17:00","4747400000000001282","9022050067967001","0","0","Muenchen Ost","11","747400000000003152"
    "33:25:00","4747400000000001282","9022050059740001","53.553302","10.006403","Hamburg Hbf","12","747400000000003152"
    "37:16:00","4747400000000001282","9022050000083004","58.304682","12.910085","Håkantorp station","13","747400000000003152"
    "37:59:00","4747400000000001282","9022050059750001","55.401502","10.387004","Odense","14","747400000000003152"
    "39:21:00","4747400000000001282","9022050059753001","55.652253","12.300031","Höje Taastrup","15","747400000000003152"
    "40:07:00","4747400000000001282","9022050000003030","55.608777","13.000216","Malmö C","16","747400000000003152
    Henrik H

Kommentera eller skriv ett nytt inlägg

Ditt namn och inlägg kan ses av alla. Din e-post visas aldrig publikt.