mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 16:35:40 +02:00
Add an option to vary the level of line and polygon simplification
This commit is contained in:
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user