hove-io / navitia

The open source software to build cool stuff with locomotion
https://www.navitia.io/
GNU Affero General Public License v3.0
434 stars 126 forks source link

Broken GeoJSON geometries #2479

Closed JanJakes closed 6 years ago

JanJakes commented 6 years ago

I've tried to import London transport using https://github.com/CommuteStream/tflgtfs. I works well but in some cases I get broken line geometries.

Example (requested departure at 12:00):

screen shot 2018-07-27 at 15 56 54

Exactly the same route with requested departure 4 minutes later (12:04):

screen shot 2018-07-27 at 15 56 46

For the blue sections I get exactly the same data in both cases - metro Piccadilly, 17 stops, 49 minutes. The only difference is departure time (the first one leaves at 12:08, the second one at 12:17) and the (in the first case) broken GeoJSON.

pbougue commented 6 years ago

This looks like a data issue at first sight... I'd look at the geometries of the trip, then route, then line used : field geometry_id in respective files (then geometries.txt file). If my memory doesn't fail me, Navitia completes geometry (projecting stops) of a trip by adding real stops locations to be sure they appear on the path drawn. If the data only contains the route (or line) geometry in one case, it might lead to that behaviour : line geometry describes the main path, but if the service vary we get weird results. If the data contains the exact trip geometry in the other case, we should have better results drawing it.

Hope that helps you debug!

Nota: not sure tflgtfs is supporting every feature of GTFS but the project is nice (so is the language used :crab: ).

JanJakes commented 6 years ago

Thanks, I'll try to inspect the data on Monday. What's curious though is that sometimes exactly the same line is correct and the next ride a few minutes later is not. I'll let you know what I find in the data.

JanJakes commented 6 years ago

I looked to the data and it seems the wrong routes have the following shape:

screen shot 2018-08-08 at 16 57 54

But it also seems the list of stops is the same for both the good and broken routes. So I guess this is a data/tflgtfs bug?

pbougue commented 6 years ago

Sorry for the holidays' delay. Yes it looks like it's a data bug... So I close the issue, please reopen it if you discover something new!