[routing] OSM tag based time and turn penalties

Signed-off-by: Henry Sternberg <dev@bluelightmaps.com>
Co-Authored-By: eisa01 <eisa01@gmail.com>
Co-Authored-By: x7z4w <x7z4w@noreply.codeberg.org>
Co-Authored-By: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
Henry Sternberg
2025-07-28 17:48:44 +01:00
committed by x7z4w
parent daf2a7d8e7
commit c59b63d784
29 changed files with 1301 additions and 45 deletions

View File

@@ -163,7 +163,7 @@ public:
// maxSpeedKMpH doesn't matter, but should be greater then any road speed in all tests.
// offroadSpeedKMpH doesn't matter, but should be > 0 and <= maxSpeedKMpH.
explicit WeightedEdgeEstimator(std::map<Segment, double> const & segmentWeights)
: EdgeEstimator(1e10 /* maxSpeedKMpH */, 1.0 /* offroadSpeedKMpH */)
: EdgeEstimator(VehicleType::Count, 1e10 /* maxSpeedKMpH */, 1.0 /* offroadSpeedKMpH */)
, m_segmentWeights(segmentWeights)
{}
@@ -174,6 +174,8 @@ public:
EdgeEstimator::Purpose purpose) const override;
double GetUTurnPenalty(Purpose purpose) const override;
double GetTurnPenalty(Purpose purpose, double angle, RoadGeometry const & from_road, RoadGeometry const & to_road,
bool is_left_hand_traffic = false) const override;
double GetFerryLandingPenalty(Purpose purpose) const override;
private: