in src/h3/_h3shape.py [0:0]
def __init__(self, outer, *holes):
loops = [outer] + list(holes)
for loop in loops:
if len(loop) in (1, 2):
raise ValueError('Non-empty LatLngPoly loops need at least 3 points.')
point_dimensions = set(map(len, loop))
# empty set is possible for empty polygons, so we check if a subset
if not (point_dimensions <= {2}):
raise ValueError('LatLngPoly only accepts 2D points: lat/lng.')
self.outer = tuple(_open_ring(outer))
self.holes = tuple(
_open_ring(hole)
for hole in holes
)