[Gdal-dev] DBF-Column type boolen and date?

Markus Neteler neteler at itc.it
Mon Jun 19 07:39:04 EDT 2006


On Sun, Jun 18, 2006 at 12:56:37PM -0400, Frank Warmerdam wrote:
> Markus Neteler wrote:
> >Hi,
> >
> >while updating the DBF driver in GRASS to the latest
> >shapelib version, I came across this proposal:
> >
> >  [postgis-devel] DBF-Column type boolen and date
> >  strk at refractions.net strk at refractions.net
> >  Wed Jan 11 09:59:54 PST 2006
> >  http://postgis.refractions.net/pipermail/postgis-devel/2006-January/001940.html
> >  "Attached is a patch that will implement
> >   support for Date and Bool DBF<->pgsql transfer.
> >   ...
> >  "
> >
> >which was also committed later:
> >  http://postgis.refractions.net/pipermail/postgis-devel/2006-January/001948.html
> >
> >Could this be added to SHAPELIB/OGR as well?
> 
> Markus,
> 
> OGR does not have a boolean field type, so for now we just map boolean 
> fields
> to ... umm, string I guess.  Dates are properly handled in the shapefile
> driver using the native field type api i shapelib.
> 
> There was a proposed patch to add date (and boolean?) support in the 
> shapelib
> bugzilla, but I closed it since this can now be accomplished using the
> native type shapelib functions.
> 
> Did you have a specific requirement for boolean fields?

Frank,

I was thinking moreover about the DATE support in the
GRASS DBF driver:

 http://freegis.org/cgi-bin/viewcvs.cgi/grass6/db/drivers/dbf/globals.h?rev=HEAD&content-type=text/vnd.viewcvs-markup

Currently only FTString, FTInteger, FTDouble are used and
date is mapped to char since FTDate isn't there (but was proposed
by strk). That's why I brought up the issue here.

I am not sure how to change the GRASS DBF driver to better implement
date support (mayeb there is nothing to change?). See line 313 in
http://freegis.org/cgi-bin/viewcvs.cgi/grass6/db/drivers/dbf/dbfexe.c?annotate=1.36

Best regards
 Markus



More information about the Gdal-dev mailing list