From 8ec1e3e73d3281b8d8948b9b155f47ae6680dbd4 Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 6 Oct 2015 16:14:20 +0100 Subject: [PATCH] geometry_is_simple - fix handling multi-geometries (1.59) --- include/mapnik/geometry_is_simple.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/mapnik/geometry_is_simple.hpp b/include/mapnik/geometry_is_simple.hpp index 002556cf4..868b41afd 100644 --- a/include/mapnik/geometry_is_simple.hpp +++ b/include/mapnik/geometry_is_simple.hpp @@ -105,7 +105,11 @@ struct geometry_is_simple // https://svn.boost.org/trac/boost/ticket/11710 return true; } - return boost::geometry::is_simple(multi_line); + for (auto const& line : multi_line) + { + if (!(*this)(line)) return false; + } + return true; } template result_type operator() (multi_polygon const& multi_poly) const @@ -116,7 +120,11 @@ struct geometry_is_simple // https://svn.boost.org/trac/boost/ticket/11710 return true; } - return boost::geometry::is_simple(multi_poly); + for (auto const& poly : multi_poly) + { + if (!(*this)(poly)) return false; + } + return true; } };