correct polygons in topojson and osm plugins too

This commit is contained in:
Dane Springmeyer 2015-05-20 14:09:52 -07:00
parent 84e4d8bf22
commit ec8f1620e5
2 changed files with 6 additions and 2 deletions

View file

@ -27,8 +27,7 @@
#include <mapnik/feature_factory.hpp>
#include <mapnik/debug.hpp>
#include <mapnik/unicode.hpp>
// boost
#include <mapnik/geometry_correct.hpp>
#include "osm_featureset.hpp"
@ -91,6 +90,7 @@ feature_ptr osm_featureset<filterT>::next()
}
mapnik::geometry::polygon<double> geom;
geom.set_exterior_ring(std::move(ring));
mapnik::geometry::correct(geom);
feature->set_geometry(std::move(geom));
}
else

View file

@ -26,6 +26,8 @@
#include <mapnik/json/topology.hpp>
#include <mapnik/util/variant.hpp>
#include <mapnik/geometry_adapters.hpp>
#include <mapnik/geometry_correct.hpp>
// stl
#include <string>
#include <vector>
@ -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_);
}