felt / tippecanoe

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

Need advice for generating PMTiles without changing the value of polygons #252

Open virgilxw opened 3 months ago

virgilxw commented 3 months ago

Hi! I am working on the visualisation on this website: https://morphometric-explorer-v2.netlify.app/

The website currently takes the "cluster" variable of each polygon and displays it - but while it is able to simplify and gamma out polygons to make everything fit, the cluster value keeps changing between zoom levels.

I am running the following command:

    tippecanoe -o "$output_file" "$file" -zg -pn --minimum-detail=9 --force -aD -P --increase-gamma-as-needed --preserve-input-order --order-by=cluster --no-tiny-polygon-reduction

Would anyone have any advice on how to preserve the cluster values on different zoom level? The raw GeoJSON file is 3gb, so some level of simplification and sparsification is needed.

e-n-f commented 3 months ago

The gamma code is pretty ancient and I had no idea anyone was making serious use of it. I made some recent changes (https://github.com/felt/tippecanoe/pull/247) to improve the consistency of coalesce-densest-as-needed across zoom levels, so make sure you have a recent version of tippecanoe. If you share a sample of your data I can take a look at what specifically is going on in your case.

virgilxw commented 3 months ago

Hi! Here's the dataset

https://strath-my.sharepoint.com/:f:/r/personal/reuben_xianwei_wang_strath_ac_uk/Documents/New%20folder?csf=1&web=1&e=bUoP5P