Open ericemc3 opened 4 years ago
I agree that -filter-islands
could be improved. I'd like to propose the following changes.
Adding a keep-shapes
option to -filter-islands
, analogous to the keep-shapes
option of the -simplify
command. This would protect each feature's largest ring from removal.
Currently, -filter-islands
only identifies detached rings as islands. It does not detect groups of adjacent rings as islands (like the two-ring island in your example). I think it would be an improvement to detect and remove multi-ring islands.
t seems to me that these changes would help with your use case... if not, please let me know.
Thank you Matt for your explanations, especially regarding point 2. I understand that it makes sense not removing these rings by default, as they are not real islands.
And i am absolutely voting for your keep-shapes option to -filter-islands! It will save time for my work. No need to see that i love mapshaper, which is incredibly fast and handy.
the doc states: "Remove small detached polygon rings (islands)".
i am still confused with how it works: i am expecting it to apply filter on multipolygons only and remove external rings depending on an area threshold. But i can see simple polygons (one single ring) erased and conversely some external rings not erased.
What i would like: prevent shape removal and simplify multipolygons with many islands