[Gdal-dev] OGR can't handle Null values in a Date field

Aaron Koning aaronkoning at gmail.com
Fri Jun 16 17:02:36 EDT 2006


I have just started using a newer version of OGR that includes Date support.
(Context: I am importing shapefiles into PostgreSQL using OGR/PHP).
Unfortunately, when I there is a Null value in a Date field of the input
shapefile OGR bails (after successfully inserting non-null values). From
what I can see, it attempts to do an insert with a '00/00/00 00:00:00' value
and PostgreSQL states I may need another Date type for this value.

Is there anyway of getting OGR to output Null values into a Date field when
there is a Null value present in the input Date field? Alternatively, the
previous versions of OGR simply converted Date fields to strings. Is there a
way to revive this action (when I set the output field type to string
instead of bool, it doesn't work).

Aaron

+--------------------------------------------
|  Aaron Koning
|  Information Technologist
|  Prince George, BC, Canada.
+--------------------------------------------
|  http://datashare.gis.unbc.ca/fist/
|  http://datashare.gis.unbc.ca/gctp-js/
+--------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060616/b5cb215f/attachment.html


More information about the Gdal-dev mailing list