diff --git a/lib/xmet/geo.py b/lib/xmet/geo.py index 50c0509..e9cc4ef 100644 --- a/lib/xmet/geo.py +++ b/lib/xmet/geo.py @@ -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))