Fix PointSequence.__init__() when passed no points

This commit is contained in:
XANTRONIX 2025-03-22 14:47:20 -04:00
parent 559c1caa7b
commit 8cdf97164c

View file

@ -27,13 +27,14 @@ class PointSequence(list):
self.poly = None
for point in points:
typeof = type(point)
if points is not None:
for point in points:
typeof = type(point)
if typeof is tuple:
self.add(*point)
elif typeof is shapely.Point:
self.append(point)
if typeof is tuple:
self.add(*point)
elif typeof is shapely.Point:
self.append(point)
def add(self, lon: float, lat: float):
self.append(shapely.Point(lon, lat))