mapbox / tippecanoe

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

Multipolygon missing holes #903

Open laijackylai opened 3 years ago

laijackylai commented 3 years ago

I took some data and constructed a geojson and used tippecannoe to convert it into vector tiles and visualize it in deckgl. However the holes are missing

here is the result without anything and with the --use-source-polygon-winding tag use source polygon winding

here is the result when i used the --reverse-source-polygon-winding tag (the white dots the results, because they are too small) reverse source polygon winding

here is what that patch should look like as shown using the geojson-vt debug website: http://mapbox.github.io/geojson-vt/debug/ correct2

and I double checked that part of my geojson with https://geojsonlint.com/ correct

I have use the geojson_rewind library for python before dumping the geojson

the command I am currently using to generate the mbtiles is: tippecanoe -z 5 -ae -pf -pk -pg -ps -pS -pn -pt --use-source-polygon-winding --force --read-parallel -o /data/test/{filename}.mbtiles /data/test/{filename}.geojson'

the geojson is attached in the zip file below S_NWC_CT_HIMA08_20S55N-80E150E-NR_20210206T000000Z.zip

please help thank you

laijackylai commented 3 years ago

when i dumped the geojson into https://geojson.io/, this showed up im quite confused now, whether the winding of the orientation is correct or not geojson io

thot-experiment commented 1 year ago

I have this exact issue and it presents exactly the same in the various sites you tested in, did you ever figure out a solution?

e-n-f commented 1 year ago

There was an area calculation overflow that affected polygon winding that I have since fixed in https://github.com/felt/tippecanoe. It looks like this now there:

Screen Shot 2023-09-05 at 8 05 53 PM

➤ tippecanoe -z 5 -ae -pf -pk -pg -ps -pS -pn -pt --use-source-polygon-winding --force --read-parallel -o foo.mbtiles <(unzip -p /Users/enf/Downloads/S_NWC_CT_HIMA08_20S55N-80E150E-NR_20210206T000000Z.zip )
For layer 0, using name "63"
19378 features, 983400 bytes of geometry, 11 bytes of separate metadata, 9 bytes of string pool
  99.9%  5/27/11  
➤ tippecanoe --version
tippecanoe v2.9.0

Please let me know if this is still not correct.