From ec8f1620e5459fed5c1e0a5c004fc2df7882a675 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 20 May 2015 14:09:52 -0700 Subject: [PATCH] correct polygons in topojson and osm plugins too --- plugins/input/osm/osm_featureset.cpp | 4 ++-- plugins/input/topojson/topojson_featureset.cpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/input/osm/osm_featureset.cpp b/plugins/input/osm/osm_featureset.cpp index e822bfe49..71c44ec6a 100644 --- a/plugins/input/osm/osm_featureset.cpp +++ b/plugins/input/osm/osm_featureset.cpp @@ -27,8 +27,7 @@ #include #include #include - -// boost +#include #include "osm_featureset.hpp" @@ -91,6 +90,7 @@ feature_ptr osm_featureset::next() } mapnik::geometry::polygon geom; geom.set_exterior_ring(std::move(ring)); + mapnik::geometry::correct(geom); feature->set_geometry(std::move(geom)); } else diff --git a/plugins/input/topojson/topojson_featureset.cpp b/plugins/input/topojson/topojson_featureset.cpp index a5afadd1a..ed53932e8 100644 --- a/plugins/input/topojson/topojson_featureset.cpp +++ b/plugins/input/topojson/topojson_featureset.cpp @@ -26,6 +26,8 @@ #include #include #include +#include + // stl #include #include @@ -263,6 +265,7 @@ struct feature_generator } if (hit) { + mapnik::geometry::correct(polygon); feature->set_geometry(std::move(polygon)); assign_properties(*feature, poly, tr_); } @@ -345,6 +348,7 @@ struct feature_generator } if (hit) { + mapnik::geometry::correct(multi_polygon); feature->set_geometry(std::move(multi_polygon)); assign_properties(*feature, multi_poly, tr_); }