From 3b8b50a68cead752c2cd858f3840b0d8a17217a9 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Wed, 27 Jul 2016 15:36:24 +0300 Subject: Logging min altitude while mwm generation. --- routing/nearest_edge_finder.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'routing') diff --git a/routing/nearest_edge_finder.cpp b/routing/nearest_edge_finder.cpp index fc6ebd0090..fc70555492 100644 --- a/routing/nearest_edge_finder.cpp +++ b/routing/nearest_edge_finder.cpp @@ -41,12 +41,15 @@ void NearestEdgeFinder::AddInformationSource(FeatureID const & featureId, IRoadG feature::TAltitude projPointAlt = feature::kDefaultAltitudeMeters; if (segLenM == 0.0) { - ASSERT(false, (featureId)); + LOG(LWARNING, ("Length of segment", i, " of feature", featureId, "is zero.")); projPointAlt = startAlt; } - double const distFromStartM = MercatorBounds::DistanceOnEarth(segStart.GetPoint(), pt); - ASSERT_LESS_OR_EQUAL(distFromStartM, segLenM, (featureId)); - projPointAlt = startAlt + static_cast((endAlt - startAlt) * distFromStartM / segLenM); + else + { + double const distFromStartM = MercatorBounds::DistanceOnEarth(segStart.GetPoint(), pt); + ASSERT_LESS_OR_EQUAL(distFromStartM, segLenM, (featureId)); + projPointAlt = startAlt + static_cast((endAlt - startAlt) * distFromStartM / segLenM); + } res.m_dist = d; res.m_fid = featureId; -- cgit v1.2.3