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 self.poly = None
for point in points: if points is not None:
typeof = type(point) for point in points:
typeof = type(point)
if typeof is tuple: if typeof is tuple:
self.add(*point) self.add(*point)
elif typeof is shapely.Point: elif typeof is shapely.Point:
self.append(point) self.append(point)
def add(self, lon: float, lat: float): def add(self, lon: float, lat: float):
self.append(shapely.Point(lon, lat)) self.append(shapely.Point(lon, lat))