You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -469,6 +469,8 @@ the same layer, enclose them in an `all` expression so they will all be evaluate
469
469
*`-al` or `--drop-lines`: Let "dot" dropping at lower zooms apply to lines too
470
470
*`-ap` or `--drop-polygons`: Let "dot" dropping at lower zooms apply to polygons too
471
471
*`-K`_distance_ or `--cluster-distance=`_distance_: Cluster points (as with `--cluster-densest-as-needed`, but without the experimental discovery process) that are approximately within _distance_ of each other. The units are tile coordinates within a nominally 256-pixel tile, so the maximum value of 255 allows only one feature per tile. Values around 10 are probably appropriate for typical marker sizes. See `--cluster-densest-as-needed` below for behavior.
472
+
*`-k`_zoom_ or `--cluster-maxzoom=`_zoom_: Max zoom on which to cluster points if clustering is enabled.
473
+
*`-kg` or `--cluster-maxzoom=g`: Set `--cluster-maxzoom=` to `maxzoom - 1` so that all features are visible at the maximum zoom level.
472
474
473
475
### Dropping a fraction of features to keep under tile size limits
@@ -1995,7 +1996,7 @@ int read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzo
1995
1996
changed = true;
1996
1997
}
1997
1998
if (changed) {
1998
-
printf("Choosing a maxzoom of -z%d to keep most features distinct with cluster distance %d\n", maxzoom, cluster_distance);
1999
+
printf("Choosing a maxzoom of -z%d to keep most features distinct with cluster distance %d and cluster maxzoom %d\n", maxzoom, cluster_distance, cluster_maxzoom);
1999
2000
}
2000
2001
}
2001
2002
@@ -2033,6 +2034,11 @@ int read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzo
2033
2034
}
2034
2035
}
2035
2036
2037
+
if (cluster_maxzoom >= maxzoom && guess_cluster_maxzoom) {
2038
+
cluster_maxzoom = maxzoom - 1;
2039
+
fprintf(stderr, "Choosing a cluster maxzoom of -k%d to make all features visible at maximum zoom %d\n", cluster_maxzoom, maxzoom);
2040
+
}
2041
+
2036
2042
if (basezoom < 0 || droprate < 0) {
2037
2043
structtile {
2038
2044
unsigned x;
@@ -2478,6 +2484,7 @@ int main(int argc, char **argv) {
2478
2484
constchar *prefilter = NULL;
2479
2485
constchar *postfilter = NULL;
2480
2486
bool guess_maxzoom = false;
2487
+
bool guess_cluster_maxzoom = false;
2481
2488
2482
2489
std::set<std::string> exclude, include;
2483
2490
std::map<std::string, int> attribute_types;
@@ -2549,6 +2556,7 @@ int main(int argc, char **argv) {
0 commit comments