Ported simplify() to XS and removed dependency on Boost::Geometry::Utils

This commit is contained in:
Alessandro Ranellucci 2013-11-22 16:01:50 +01:00
parent df8d889481
commit 132d170f73
8 changed files with 25 additions and 12 deletions

View file

@ -56,11 +56,11 @@ MultiPoint::is_valid() const
}
Points
MultiPoint::_douglas_peucker(Points &points, double tolerance)
MultiPoint::_douglas_peucker(const Points &points, const double tolerance)
{
Points results;
double dmax = 0;
int index = 0;
size_t index = 0;
Line full(points.front(), points.back());
for (Points::const_iterator it = points.begin() + 1; it != points.end(); ++it) {
double d = it->distance_to(full);