[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

@@ -88,9 +88,16 @@ public:
{
auto ft = m_featureGetter.GetFeatureByIndex(featureID);
CHECK(ft, (featureID));
CHECK(ft->GetGeomType() == feature::GeomType::Line, (featureID));
// Converison should work with the same logic as in WayNodesMapper::EncodePoint.
// Skip non-line features (e.g., barriers on area boundaries)
if (ft->GetGeomType() != feature::GeomType::Line)
{
// Use LDEBUG to reduce log spam for features processed multiple times per vehicle type
LOG(LDEBUG, ("Skipping non-line feature", featureID, "for node penalty mapping"));
continue;
}
// Conversion should work with the same logic as in WayNodesMapper::EncodePoint.
auto const mercatorPt = PointUToPointD(pt, kPointCoordBits, fullRect);
double minSquareDist = 1.0E6;