mapbox / tippecanoe

Build vector tilesets from large collections of GeoJSON features.
BSD 2-Clause "Simplified" License
2.73k stars 431 forks source link

Add `point_count_abbreviated` property to clustered features #955

Open Oreilles opened 2 years ago

Oreilles commented 2 years ago

Add point_count_abbreviated property to clustered features to improve consistency with clusters generated by supercluster. The formula used is taken from supercluster/index.js#L377-L379:

    const abbrev =
        count >= 10000 ? `${Math.round(count / 1000)  }k` :
        count >= 1000 ? `${Math.round(count / 100) / 10  }k` : count;
e-n-f commented 2 years ago

Could you please make this PR against https://github.com/felt/tippecanoe instead? The mapbox repo is essentially unmaintained now.

Oreilles commented 2 years ago

Done 👍