[GRASS-user] Setting GRASS environment variable in a C program
- step two
Glynn Clements
glynn at gclements.plus.com
Wed May 26 19:59:29 EDT 2010
rabotin wrote:
> > std::cout << driver << std::endl;
> And I got a zero value return . So my driver isn't set ?
> Is the problem from the following lines :
> setenv("DBF_DRIVER","dbf",1);
> setenv("DB_DATABASE","$GISDBASE/$LOCATION_NAME/$MAPSET/dbf",1);
These will be ignored. The default DBMI settings are taken from the
VAR file, not the environment. But you're use the settings from an
existing vector map.
> I didn't write but I use grass 6.4 on ubuntu 9.10.
> Do you know other commands to test or to set the dbf driver than
> db_start_driver command ?
The code looks okay. Can you access the map's attribute table using
existing GRASS modules, e.g."v.db.connect -p ..."?
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list