[GRASS-user] grass default db driver

Hamish hamish_b at yahoo.com
Thu Apr 4 02:01:54 PDT 2013


Vincent wrote:
> I was writing a message suggesting to switch default dbmi
> from dbf to sqlite. Before posting, I had a glance at grass70
> documentation, and...
> you know what !
> 
> Well, for grass64 users, is there a simple way to change the
> default db driver, I mean a system wide solution, effective
> when creating new locations ?

to change to sqlite system-wide, you'd have to edit include/dbmi.h
and change

#define DB_DEFAULT_DRIVER "dbf"
 to be
#define DB_DEFAULT_DRIVER "sqlite"

then 'make distclean' and rebuild grass from source code.
It remains as dbf for backwards-compatibility reasons, but
I suppose something could be added to allow that constant to
be overridden if a certain environment or g.gisenv variable
exists.


To change the default db within the current mapset of course is
simply done with 'db.connect' or by writing a little script to
change/replace the mapset's VAR file.


Hamish


More information about the grass-user mailing list