On Jan 8, 2008 3:36 PM, Benjamin Ducke <[EMAIL PROTECTED]> wrote: > Markus Neteler wrote: > > On Jan 8, 2008 1:58 PM, Moritz Lennert <[EMAIL PROTECTED]> wrote: > >> On Tue, January 8, 2008 13:04, Benjamin Ducke wrote: > > ... > >> no: db.in.ogr with the cvs driver, but this entails that the user create a > >> .cvst file with column definitions. > >> > >> You could maybe patch the ogr cvs driver to allow automatic type > >> recognition. > > > > Grab that as C code here from my old home page :) > > > > http://mpa.fbk.eu/markus/cvs2sql/ > > Great! Looks like some hacking in the evening ... > > Question is: > > Patch the actual OGR sources or the stuff in grass6/db/drivers/ogr or > the db.in.ogr module itself? Where would be the best place to put the > type recognition?
db.in.ogr simply calls v.in.ogr which calls OGR lib which calls OGR-CSV driver... the best place is there: - if .csvt is there, use it - if .csvt is absent, try recognition. Have env var to disable/enable this. - if .csvt is absent and recognition disable, proceed as usual Or rewrite db.in.ogr as C program... Markus _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user