ad-freiburg / pfaedle

Precise map-matching for public transit feeds. Generates high-quality GTFS shapes from OSM data.
GNU General Public License v3.0
208 stars 29 forks source link

Feature request fallback info #52

Closed Ge-Rag closed 9 months ago

Ge-Rag commented 10 months ago

I'm working on a trainspotter app. https://trainspotter.ragaz.net Pfaedle is a the best tool to generate shapes. In the last year of working on this project I have found that I hardly ever was happy with the shapes delivered by some agencies so I rebuild all shapes with pfaedle.

Now I found that most gtfs feeds in one or the other way have stations that are far off the railway tracks. In France there are several such cases where bus stations are included as railway stations (included in route_type 2). (possibly train to bus replacements) Here is one example, with the resulting pfaedle tracks. grafik

In other cases the station coordinates are too far away resulting also in pfaedle creating fallback connections.

What I would appreciate as an additional feature, is some info logged to stats from pfaedle that helps me identify fallback tracks easily, so that I can then deal with the problem.

patrickbr commented 9 months ago

With the latest master, you should now be able to add the -W flag. It will output additional warning messages, in particular messages like this:

[2024-01-30 12:50:49.710] WARN : No viable hop found between stops 'Freiburg, Emil-Gött-Straße' (de:08311:30303:0:2) and 'Freiburg, Hasemannstraße' (de:08311:30302:0:2) for trip 1006.T0.11-1-I-j24-1.8.R of type 'tram' (and 81 similar trips), falling back to straight line

Ge-Rag commented 9 months ago

Fantastic! Works like a charm. Thank you very much Patrick.