Interactive publication
Back to the catalogueGeometryCase 07 of 13
Nested holes
A hole containing an island (hole-in-hole-in-fill) violates simple-polygon assumptions; naive ring parity gets the interior/exterior classification backwards.
Class
Case to account for
Affects
3 conversions
01
Detection
Ring nesting depth > 2 (exterior -> hole -> island -> hole...) detected via point-in-ring containment tests between rings.
02
Mitigation
01
Flatten to a single fill/hole pair per nesting level via GEOS/turf union
02
Validate with even-odd or nonzero winding rule before filling
03
Reject geometries with nesting depth > 3 pending manual review
03
Affected conversions
PolygonH3 (center-contained)
OPENPolygonH3 (fully-contained)
OPENPolygonH3 (intersects)
OPEN