Add an option to vary the level of line and polygon simplification

This commit is contained in:
Eric Fischer
2016-07-12 16:51:56 -07:00
parent cb45f1c3bd
commit 9908db5e56
9 changed files with 4059 additions and 11 deletions
+2 -2
View File
@@ -1050,7 +1050,7 @@ drawvec impose_tile_boundaries(drawvec &geom, long long extent) {
return out;
}
drawvec simplify_lines(drawvec &geom, int z, int detail, bool mark_tile_bounds) {
drawvec simplify_lines(drawvec &geom, int z, int detail, bool mark_tile_bounds, double simplification) {
int res = 1 << (32 - detail - z);
long long area = 1LL << (32 - z);
@@ -1081,7 +1081,7 @@ drawvec simplify_lines(drawvec &geom, int z, int detail, bool mark_tile_bounds)
geom[j - 1].necessary = 1;
if (j - i > 1) {
douglas_peucker(geom, i, j - i, res);
douglas_peucker(geom, i, j - i, res * simplification);
}
i = j - 1;
}