lannymac / pyshp

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

DBF file with numeric overflow in value #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open a shapefile in which its dbf has an overflow in a column (such as [1])
2. Read records

What is the expected output? What do you see instead?
It shouldn't crash, it crashes because it cannot convert asterisks to numbers.

What version of the product are you using? On what operating system?
Trunk

Please provide any additional information below.
According to [2] DBf files can contain numeric fields with asterisks. I suppose 
the best way to handle them is as if they where null. Right now pyshp converts 
those to 0. Attached is a patch that handles this issue.

[1] 
http://intgis.montevideo.gub.uy/sit/php/common/datos/generar_zip2.php?nom_tab=v_
uptu_lsv_destinos&tipo=gis
[2] 
http://connect.microsoft.com/SQLServer/feedback/details/648410/sql-reports-an-er
ror-when-querying-standard-dbf-data-via-vfp-ole-db-provider

Original issue reported on code.google.com by felipe.o...@gmail.com on 1 May 2013 at 4:01

Attachments:

GoogleCodeExporter commented 9 years ago

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