zhikrullah / pyshp

Automatically exported from code.google.com/p/pyshp
MIT License
0 stars 0 forks source link

Added a new iterator method for retrieving combined shapes and records #58

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am using a larger SHP file and was unsatisfied with the performance of
'shapeRecords' method in the Reader class so I created a new method called 
'iterShapeRecords' which is an iterator backed version of 'shapeRecords'. 

Please see the attached patch and consider including this new method for others 
to use in a future version.

pyshp 1.2.0 on Ubuntu 64bit, Python 2.7+

Original issue reported on code.google.com by kris.neu...@gmail.com on 24 Sep 2013 at 1:15

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
What a coincident! I was just about to post the exact same suggestion when I 
read your issue suggestion. Full support on this idea and hope it makes it into 
the next version.

In the meanwhile, I actually just created a new fork of the PyShp library (see 
link below) where I added several new features, one of which is the suggested 
iterShapeRecords method (though slightly different from your code it is the 
same idea). 

Link: https://github.com/karimbahgat/pyshp-fork-speedup-and-geojson-write

Original comment by karim.ba...@gmail.com on 16 Jan 2014 at 2:28