Made LineString.__iter__() return iter() from internal GEOSCoordSeq both for simplicity and performance.
This commit is contained in:
parent
1a742ea33b
commit
138a78ec8c
|
@ -92,8 +92,7 @@ class LineString(LinearGeometryMixin, GEOSGeometry):
|
|||
|
||||
def __iter__(self):
|
||||
"Allow iteration over this LineString."
|
||||
for i in range(len(self)):
|
||||
yield self[i]
|
||||
return iter(self._cs)
|
||||
|
||||
def __len__(self):
|
||||
"Return the number of points in this LineString."
|
||||
|
|
Loading…
Reference in New Issue