From 83734a0d41ea1f0f351cb3f76ce7c3452a77f99f Mon Sep 17 00:00:00 2001 From: Viktor Govako Date: Wed, 18 Aug 2021 14:50:31 +0300 Subject: [PATCH] [generator] Added warnings on bad area geometry. Signed-off-by: Viktor Govako --- generator/geometry_holder.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/generator/geometry_holder.hpp b/generator/geometry_holder.hpp index 72b0f2260c..8504f8abb5 100644 --- a/generator/geometry_holder.hpp +++ b/generator/geometry_holder.hpp @@ -124,12 +124,14 @@ public: // See IsPolygonCCW_DataSet tests for more details. // ASSERT(IsPolygonCCW(points.begin(), points.end()), (points)); if (!IsPolygonCCW(points.begin(), points.end())) + { + // Usually, it is a bad polygon in OSM. + LOG(LWARNING, ("GeometryHolder: Degenerated polygon", m_fb.GetMostGenericOsmId())); return false; + } } - size_t const index = FindSingleStrip( - count, IsDiagonalVisibleFunctor(points.begin(), points.end())); - + size_t const index = FindSingleStrip(count, IsDiagonalVisibleFunctor(points.begin(), points.end())); if (index == count) { // can't find strip