| 512 | } |
| 513 | |
| 514 | bool IndexGraph::IsUTurnAndRestricted(Segment const & parent, Segment const & child, bool isOutgoing) const |
| 515 | { |
| 516 | ASSERT(IsUTurn(parent, child), ()); |
| 517 | |
| 518 | uint32_t const featureId = parent.GetFeatureId(); |
| 519 | uint32_t const turnPoint = parent.GetPointId(isOutgoing); |
| 520 | auto const & roadGeometry = GetRoadGeometry(featureId); |
| 521 | |
| 522 | RoadPoint const rp = parent.GetRoadPoint(isOutgoing); |
| 523 | if (m_roadIndex.GetJointId(rp) == Joint::kInvalidId && !roadGeometry.IsEndPointId(turnPoint)) |
| 524 | return true; |
| 525 | |
| 526 | auto const it = m_noUTurnRestrictions.find(featureId); |
| 527 | if (it == m_noUTurnRestrictions.cend()) |
| 528 | return false; |
| 529 | |
| 530 | auto const & uTurn = it->second; |
| 531 | if (uTurn.m_atTheBegin && turnPoint == 0) |
| 532 | return true; |
| 533 | |
| 534 | uint32_t const n = roadGeometry.GetPointsCount(); |
| 535 | ASSERT_GREATER_OR_EQUAL(n, 1, ()); |
| 536 | return uTurn.m_atTheEnd && turnPoint == n - 1; |
| 537 | } |
| 538 | |
| 539 | RouteWeight IndexGraph::CalculateEdgeWeight(EdgeEstimator::Purpose purpose, bool isOutgoing, Segment const & from, |
| 540 | Segment const & to, |
nothing calls this directly
no test coverage detected