wqjzzgci / pyshp

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

Date fields with empty days fails #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open a shape file with a date field that has an empty string for the day - 
example: geocommunicator.gov township files

I wrote a simple patch to split on a regex and fail silently if the 
day/month/year cannot be coerced to int.

Original issue reported on code.google.com by kee...@gmail.com on 18 Mar 2011 at 2:41

Attachments:

GoogleCodeExporter commented 8 years ago
I found similar problems with extracting data from a shape file. In my case the 
'D' type was specified for a field that did not include a date. I wrote a patch 
where the method would revert to the default behaviour if no date was found.

Original comment by tomas.to...@gmail.com on 26 May 2011 at 4:55

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you for pointing these dbf issues out.  Both are good fixes.  I 
implemented the solution from Tomas.  This technique covers more cases and 
provides an equally good solution for a variety of improper date formatting 
situations.

Original comment by geospati...@gmail.com on 5 Sep 2011 at 8:04