[GRASS-user] simple way to join some attribute data w/o geometries

Markus Neteler neteler at osgeo.org
Tue Jan 8 10:20:43 EST 2008


On Jan 8, 2008 3:36 PM, Benjamin Ducke <benjamin.ducke at ufg.uni-kiel.de> wrote:
> Markus Neteler wrote:
> > On Jan 8, 2008 1:58 PM, Moritz Lennert <mlennert at club.worldonline.be> 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


More information about the grass-user mailing list