[routing] In decoder mode, snap to segment endpoints (no partial segments)

Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
mvglasow
2025-11-11 00:56:48 +02:00
parent 5c2cedb19a
commit 8fcf00b0ca
12 changed files with 80 additions and 29 deletions

View File

@@ -143,9 +143,10 @@ void FeaturesRoadGraphBase::ForEachFeatureClosestToCross(m2::PointD const & cros
}
void FeaturesRoadGraphBase::FindClosestEdges(m2::RectD const & rect, uint32_t count,
vector<pair<Edge, geometry::PointWithAltitude>> & vicinities) const
vector<pair<Edge, geometry::PointWithAltitude>> & vicinities,
bool snapToEnds) const
{
NearestEdgeFinder finder(rect.Center(), nullptr /* IsEdgeProjGood */);
NearestEdgeFinder finder(rect.Center(), nullptr /* IsEdgeProjGood */, snapToEnds);
m_dataSource.ForEachStreet([&](FeatureType & ft)
{