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:
parent
646707628f
commit
5c1ad4579f
1 changed files with 1 additions and 1 deletions
|
@ -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()]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue