zhikrullah / pyshp

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

No iterator method for large file sizes #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download a shapefile of 100+ mb
2. Run the .shapes() method

What version of the product are you using? On what operating system?
Mac OSX Lion, pyshp 1.1.6-beta

Please provide any additional information below.

Created an iterator class within the reader class, to allow for large file 
processing. Method to use iterator is Reader.shapes_iter()

Original issue reported on code.google.com by jaysquar...@gmail.com on 9 Jul 2012 at 5:34

Attachments:

GoogleCodeExporter commented 8 years ago
This is a great patch, and allows for instant processing of features. It would 
be great to have an iterator for the associated records too, available via the 
records and shapeRecords functions. 

Original comment by geograph...@gmail.com on 27 Jul 2012 at 2:24

GoogleCodeExporter commented 8 years ago

Original comment by jlawh...@geospatialpython.com on 2 May 2013 at 5:00

GoogleCodeExporter commented 8 years ago
Fixed in version 1.1.7.  Added shapefile.Reader.iterShapes() and 
shapefile.Reader.iterRecords() methods which iterate instead of reading the 
entire data set into memory. The individual Reader.shape() and Reader.record() 
methods also use these iterators to find records.  The Reader.shape() method 
will try to use the shx index file first if available. 

Original comment by geospati...@gmail.com on 23 Jun 2013 at 7:52