-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Implement a feature to remove elements that exceed the max_feature_count limit based on their spatial distribution and density. #993
Comments
For points the label grid size/limit does this. It divides each tile into a grid of a certain size then limits the number of features that can go in each cell. Maybe if we just add the capability for this to apply to small polygons too that would accomplish what you're trying to do? |
My dataset consists of polygon (area) data, not point data. The current issue is that setting min_size=0 results in too many features at lower zoom levels, which increases memory requirements. However, setting min_size=256/4096 causes some areas to be blank, and in such cases, the tile size at lower zoom levels inflates to 20-30MB. Therefore, I hope to have a feature that can evenly sample features within a tile, limit the number of features, and also control the tile size. If source code modification is necessary, I would appreciate any advice you can provide. Thank you very much. |
On each feature you can call Once this is implemented it would be good to rename all of the Feel free to submit a PR, this would be useful for others as well. For example the openmaptiles profile should be limiting mountain_peak linestrings (cliffs and ridges) using label grid like this, but because it's not implemented we just end up with very crowded tiles. |
This comment was marked as outdated.
This comment was marked as outdated.
I have added the following code to calculate the centroid of each feature after executing sliceIntoTiles(). However, after testing, I found that the results did not change, and the label grid functionality is still not implemented as expected. Could you please advise on which other parts need to be modified besides this?
I noticed that parameters related to grid limits are set in the encodeValue method. However, I could not find where the logic to delete features that exceed the limit is implemented. Could you please provide guidance on this?
|
Can you post what you have in a PR and I can test from there? |
It would be helpful to provide a max_feature_count parameter that can remove elements exceeding the limit based on the density within the tile, ensuring a more uniform appearance across the entire tile.
The text was updated successfully, but these errors were encountered: