Merge pull request #411 from gardster/routing_citycenter_fix

[routing] OSRM candidates filter fix.
This commit is contained in:
Viktor Govako 2015-10-29 17:19:55 +03:00
commit 699ae4f87c
2 changed files with 14 additions and 1 deletions

View file

@ -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);
}

View file

@ -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)
{