forked from organicmaps/organicmaps
Merge pull request #411 from gardster/routing_citycenter_fix
[routing] OSRM candidates filter fix.
This commit is contained in:
commit
699ae4f87c
2 changed files with 14 additions and 1 deletions
|
@ -44,7 +44,7 @@ void Point2PhantomNode::operator()(FeatureType const & ft)
|
|||
|
||||
FindNearestSegment(ft, m_point, res);
|
||||
|
||||
if (res.m_fid != kInvalidFid)
|
||||
if (res.m_fid != kInvalidFid && !m_routingMapping.m_segMapping.GetNodeIdByFid(res.m_fid).empty())
|
||||
m_candidates.push_back(res);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,19 @@ using namespace routing;
|
|||
|
||||
namespace
|
||||
{
|
||||
// Node filtering test. SVO has many restricted service roads that absent in a OSRM index.
|
||||
UNIT_TEST(MoscowToSVOAirport)
|
||||
{
|
||||
integration::CalculateRouteAndTestRouteLength(
|
||||
integration::GetOsrmComponents(),
|
||||
MercatorBounds::FromLatLon(55.75100, 37.61790), {0., 0.},
|
||||
MercatorBounds::FromLatLon(55.97310, 37.41460), 30470.);
|
||||
integration::CalculateRouteAndTestRouteLength(
|
||||
integration::GetOsrmComponents(),
|
||||
MercatorBounds::FromLatLon(55.97310, 37.41460), {0., 0.},
|
||||
MercatorBounds::FromLatLon(55.75100, 37.61790), 30470.);
|
||||
}
|
||||
|
||||
// Restrictions tests. Check restrictions generation, if there are any errors.
|
||||
UNIT_TEST(RestrictionTestNeatBaumanAndTTK)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue