Interactive publicationBack to Geo-Interop KB
Nested holes
GeometryA hole containing an island (hole-in-hole-in-fill) violates simple-polygon assumptions; naive ring parity gets the interior/exterior classification backwards.
Detection
Ring nesting depth > 2 (exterior -> hole -> island -> hole...) detected via point-in-ring containment tests between rings.
Mitigation
- Flatten to a single fill/hole pair per nesting level via GEOS/turf union
- Validate with even-odd or nonzero winding rule before filling
- Reject geometries with nesting depth > 3 pending manual review
Affected conversions
- PolygonH3 (center-contained)
- PolygonH3 (fully-contained)
- PolygonH3 (intersects)
