Fix PointSequence.__init__() when passed no points
This commit is contained in:
parent
559c1caa7b
commit
8cdf97164c
1 changed files with 7 additions and 6 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue