[GRASS-dev] g.copy vect/DBF problem & suggestion

Markus Neteler neteler at itc.it
Wed Apr 25 18:23:39 EDT 2007


Hi,

copying a vector map into a mapset where the DBF driver
is defined but the dbf/ directory still absent (for
whatsoever reason), g.copy bails out with

g.copy vect=zipcodes_wake,myzipcodes_wake
Copy vector <zipcodes_wake at PERMANENT> to current mapset as
<myzipcodes_wake>
DBMI-DBF driver error:
Cannot open dbf database: /home/neteler/grassdata/nc_spm_04/neteler/dbf/


WARNUNG: Cannot open database
         '/home/neteler/grassdata/nc_spm_04/neteler/dbf/'
no database is open
WARNUNG: Cannot copy table
WARNUNG: Cannot copy <zipcodes_wake at PERMANENT> to current mapset as
         <myzipcodes_wake>

In db/drivers/dbf/db.c, I suggest to add a test around line 89 with
# pseudocode
if LOCATION/MAPSET/dbf/ does not exist
   create it

How to implement this in a portable way?

Markus




More information about the grass-dev mailing list