zhikrullah / pyshp

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

pyshp will not notify you if your .dbf file is incomplete #44

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Unzip the attached zip file.
2. reader = Reader('bedrock.shp')
3. reader.shape(2)
4. reader.record(2) => generates error

What is the expected output? What do you see instead?
The attached shapefile is missing the last record in the .dbf.  I think the 
code should compare the actual file size against the expected file size
using fields in the .dbf header (fs = headerlen + nrecords*recordlen).  If they 
don't match, throw an exception from the __init__() method.

What version of the product are you using? On what operating system?
1.1.4, on Mac OS 10.7.5

Please provide any additional information below.

Original issue reported on code.google.com by mhearne...@gmail.com on 6 Feb 2013 at 12:22

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by jlawh...@geospatialpython.com on 2 May 2013 at 4:55