mapbox / mapbox/tippecanoe

Clustering gives wrong point_count value

Open
#919 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
3.1k
Forks
430
PR merge metrics
No merged PRs in 30d

Description

Hello, I encounter some difficulties with clustering of features.

I gave about 1 millions features to Tippecanoe with the following call:
`tippecanoe --force --no-tile-compression -zg --cluster-distance=60 -r1`

Then with Openlayers I display the value of `point_count` for each feature and when I am zooming in a lot, a lot of features have a wrong `point_count`.

The following image shows a feature wich is alone, so it should not be clustered (so we would not have 3 as `point_count` value) :

![image](https://user-images.githubusercontent.com/14927966/126227675-f1de43d6-6a16-4eaa-9929-cfa6645bcee9.png)

If I use the same geojson to generate vector tiles without clustering, there is indeed only one feature on this position and not 3. This is also not 3 features at the exactly same position.

I have really no ideas and how to fix this but I really need to have the right value on `point_count`.

I saw that you worked on this feature @ericfischer maybe you could help me on this please?

Thank you very much!

Contributor guide

Open the contributing guide

Research direction

Reproduce the report with the supplied tippecanoe command and GeoJSON, then compare clustered and unclustered vector tiles while zooming in. Trace how point_count is produced for clustered features and verify whether the reported count matches the features in each cluster. Done means identifying and correcting the cause, with a regression check showing accurate point_count values.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.