Polygon grid features shifting with --coalesce-fraction-as-needed
wisesselo opened this issue · 2 comments
I'm trying to coalesce a grid of hexagons. My issue is that some of the coalesced polygons are shifting vertically. I confirmed this by checking feature ids before and after coalescing. I read in the docs that "the polygons to which nested polygons are coalesced may not necessarily be the immediately enclosing features." I'm not sure if this is what I'm observing, or if there is a way to control this. Any help is appreciated!
This is the command that resulted in the screenshots below:
tippecanoe -o file.mbtiles filenotnull.json --force --maximum-zoom=8 --coalesce-fraction-as-needed
Other things I tried:
--include=_solar_1_mean
--accumulate-attribute=_solar_1_mean:mean
--accumulate-attribute=_solar_1_mean:max
Last zoom level before coalescing occurs:
First zoom level where coalescing occurs:
Further zoomed out:
Thanks for the report. The --coalesce-fraction-as-needed
coalescing coalesces features by quadkey or Hilbert curve adjacency rather than actual two-dimensional adjacency, which I think probably explains the problem you are seeing. Please try the --hilbert
option, which should generally be a better approximation to actual adjacency. If that isn't enough, I can try to look into how to improve it further.