We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cba0c99 + 79cc409 commit c86c4f4Copy full SHA for c86c4f4
shapefile.py
@@ -16,6 +16,7 @@
16
import time
17
import array
18
import tempfile
19
+import itertools
20
21
#
22
# Constants for shape types
@@ -567,6 +568,13 @@ def shapeRecords(self):
567
568
return [_ShapeRecord(shape=rec[0], record=rec[1]) \
569
for rec in zip(self.shapes(), self.records())]
570
571
+ def iterShapeRecords(self):
572
+ """Returns a generator of combination geometry/attribute records for
573
+ all records in a shapefile."""
574
+ for shape, record in itertools.izip(self.iterShapes(), self.iterRecords()):
575
+ yield _ShapeRecord(shape=shape, record=record)
576
+
577
578
class Writer:
579
"""Provides write support for ESRI Shapefiles."""
580
def __init__(self, shapeType=None):
0 commit comments