Compute costs based on collapsed edge geometry length, not on distance between adjacent nodes, fixing a regression introduced last year. Fixes #47

This commit is contained in:
Patrick Brosi 2023-09-06 12:13:46 +02:00
parent 646707628f
commit 5c1ad4579f

View file

@ -1119,7 +1119,7 @@ void OsmBuilder::writeGeoms(Graph* g, const OsmReadOpts& opts) {
e->pl().addPoint(*e->getTo()->pl().getGeom()); e->pl().addPoint(*e->getTo()->pl().getGeom());
} }
e->pl().setCost(costToInt(dist(e->getFrom(), e->getTo()) / e->pl().setCost(costToInt(e->pl().getLength() /
opts.levelDefSpeed[e->pl().lvl()])); opts.levelDefSpeed[e->pl().lvl()]));
} }
} }