Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --cluster-maxzoom option #75

Merged
merged 5 commits into from
Feb 25, 2023
Merged

Add --cluster-maxzoom option #75

merged 5 commits into from
Feb 25, 2023

Conversation

e-n-f
Copy link
Collaborator

@e-n-f e-n-f commented Feb 24, 2023

Originally #33:

This PR adds the option to set the maximum zoom level at which features should be clustered. Syntax taken from the updated docs:

  • -k zoom or --cluster-maxzoom=zoom: Max zoom on which to cluster points if clustering is enabled.
  • -kg or --cluster-maxzoom=g: Set --cluster-maxzoom= to maxzoom - 1 so that all features are visible at the maximum zoom level.

I just picked the letter k as it was available, but this could be change to anything else if needed.

An alternative solution would be to use the already existing --base-zoom option to prevent clustering above the specified zoom. While possible, it could lead to unexpected result when using both -zg and -Bg, as the zoom at which most feature would be become distinct could be much higher than the one at which a tile crosses the 50k feature limit.

Fixes mapbox/tippecanoe#934 and mapbox/tippecanoe#799.
This PR, alongside mapbox/tippecanoe#940 and #32 would bring feature parity and improved consistency with the supercluster library used to generate clusters in mapbox-gl-js.

@e-n-f e-n-f marked this pull request as ready for review February 24, 2023 23:56
@e-n-f e-n-f merged commit 329dd86 into main Feb 25, 2023
@e-n-f e-n-f deleted the cluster-maxzoom branch February 25, 2023 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

clustering except for max zoom
2 participants