Duplicate vertices

Geometry

Consecutive repeated coordinates (zero-length segments) in a ring can produce degenerate edges that break area and intersection calculations.

Detection

Scan ring coordinates for consecutive points with distance approximately 0.

Mitigation

  • Dedupe consecutive identical coordinates before processing
  • Run through a geometry-repair pass (e.g. GEOS makeValid) prior to filling

Affected conversions

  • PolygonH3 (intersects)
  • PolygonH3 (coverage threshold)
  • Line/corridorH3