Skip to content

Commit

Permalink
Compute costs based on collapsed edge geometry length, not on distanc…
Browse files Browse the repository at this point in the history
…e between adjacent nodes, fixing a regression introduced last year. Fixes #47
  • Loading branch information
patrickbr committed Sep 6, 2023
1 parent 6467076 commit 5c1ad45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pfaedle/osm/OsmBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ void OsmBuilder::writeGeoms(Graph* g, const OsmReadOpts& opts) {
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()]));
}
}
Expand Down

0 comments on commit 5c1ad45

Please sign in to comment.