[GRASS5] db.connect and auto-creation of dbf/ directory
Radim Blazek
blazek at itc.it
Thu Apr 21 09:54:03 EDT 2005
Markus Neteler wrote:
> Hi,
>
> when using db.connect to define in a new mapset the DB connection,
> I face following non-feature:
>
> db.connect driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'
> db.connect -p
> driver:dbf
> database:$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
> schema:(null)
> group:(null)
>
> So far so nice. But:
>
> g.copy vect=ammprv,pat_ammprv
> COPY [ammprv at PERMANENT] to current mapset as [pat_ammprv]
> DBMI-DBF driver error:
> Cannot open dbf database: /ssi0/ssi/neteler/grassdata/pat/export/dbf/
>
> WARNING: Cannot open database '/ssi0/ssi/neteler/grassdata/pat/export/dbf/'
> no database is open
> WARNING: Cannot copy table
> WARNING: Cannot copy ammprv at PERMANENT to current mapset as pat_ammprv
>
> Yes, I know, that the user has to create this directory first. But
> this could also be done by the program.
The directory is created automatically if no driver/databvase is defined
and a vector module has to write a new table.
If a user takes the responsability to define the database, he must also
create it.
> So, where to apply a code modification:
> - db.connect - when using dbf driver?
> - g.copy/g.rename - when using dbf driver ?
Nowhere, I believe.
Radim
More information about the grass-dev
mailing list