From e7e56c984e979ce4ef149071a501287da32734bb Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 30 Jun 2017 16:08:25 +0200 Subject: [PATCH] geobuf.input - fix reading MultiPolygon's --- plugins/input/geobuf/geobuf.hpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/input/geobuf/geobuf.hpp b/plugins/input/geobuf/geobuf.hpp index f3b8ee44f..5f6b90c5e 100644 --- a/plugins/input/geobuf/geobuf.hpp +++ b/plugins/input/geobuf/geobuf.hpp @@ -486,21 +486,17 @@ private: mapnik::geometry::multi_polygon read_multi_polygon(T & pbf, boost::optional> const& lengths) { mapnik::geometry::multi_polygon multi_poly; -#if 0 // FIXME auto size = pbf.varint(); if (!lengths) { - //std::unique_ptr poly(new geometry_type(mapnik::geometry_type::types::Polygon)); - mapnik::geometry::polygon poly; - read_linear_ring(pbf, 0, size, poly, true); - paths.push_back(poly.release()); + auto poly = read_polygon(pbf, lengths); + multi_poly.push_back(std::move(poly)); } else if ((*lengths).size() > 0) { int j = 1; for (int i = 0; i < (*lengths)[0]; ++i) { - //std::unique_ptr poly(new geometry_type(mapnik::geometry_type::types::Polygon)); mapnik::geometry::polygon poly; for (int k = 0; k < (*lengths)[j]; ++k) { @@ -512,7 +508,6 @@ private: j += (*lengths)[j] + 1; } } -#endif return multi_poly; }