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.
1 parent f9543e7 commit 8e9352cCopy full SHA for 8e9352c
1 file changed
src/shapefile.py
@@ -3425,9 +3425,7 @@ def shapes(self, bbox: BBox | None = None) -> Shapes:
3425
To only read shapes within a given spatial region, specify the 'bbox'
3426
arg as a list or tuple of xmin,ymin,xmax,ymax.
3427
"""
3428
- shapes = Shapes()
3429
- shapes.extend(self.iterShapes(bbox=bbox))
3430
- return shapes
+ return Shapes(self.iterShapes(bbox=bbox))
3431
3432
def iterShapes(self, bbox: BBox | None = None) -> Iterator[Shape | None]:
3433
"""Returns a generator of shapes in a shapefile. Useful
0 commit comments