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

Wrong edge costs after collapsing edges? #47

Closed aheld84 closed 1 year ago

aheld84 commented 1 year ago

Dear pfaedle developers,

Could it be the case that edge costs are calculated from beeline distances (start node to end node distance) instead of the real line string length here https://github.com/ad-freiburg/pfaedle/blob/646707628fd576dbfc849545fc4b06bdb855f216/src/pfaedle/osm/OsmBuilder.cpp#L1122 after collapsing the edges?

Or did I misunderstand the concept of the edge cost? My understanding is that the edge cost should be proportional to the travel time, so the real length should be used .

All the best Alex

patrickbr commented 1 year ago

Indeed - this seems to have been introduced last year. Previously, the logic here was to first compute the costs on the uncollapsed edges, and adding them up during the subsequent collapsing.

This explains some strange results I noticed during the last months. Thanks for pointing that out!

Fixed in 5c1ad4579fe104bd1a425a88ab7ac6fa48f750b1