Loosen simplification factor to 1/20 of pixel

This commit is contained in:
Sandro Santilli 2012-12-13 17:40:29 +01:00
parent 41a650e568
commit c921a67fd4

View file

@ -655,7 +655,10 @@ featureset_ptr postgis_datasource::features(const query& q) const
s << "\"" << geometryColumn_ << "\"";
if (simplify_geometries_) {
const double tolerance = std::min(px_gw, px_gh) / 2.0;
// 1/20 of pixel seems to be a good compromise to avoid
// drop of collapsed polygons.
// See https://github.com/mapnik/mapnik/issues/1639
const double tolerance = std::min(px_gw, px_gh) / 20.0;
s << ", " << tolerance << ")";
}