[GRASS-user] 'ARNing: Cannot open driver 'dbf"

I have installed GRASS 6.1 CVS and using the grass61.bat. However when
I run certain DB related command like g.copy, it also returns
“:No such driver available
'ARNing: Cannot open driver 'dbf”
do I need to do something in the GRASS settings?

Thanks

Raymond

Send instant messages to your online friends http://uk.messenger.yahoo.com

Raymond Fu wrote:

I have installed GRASS 6.1 CVS and using the grass61.bat. However when
I run certain DB related command like g.copy, it also returns
":No such driver available
'ARNing: Cannot open driver 'dbf"
  do I need to do something in the GRASS settings?

try testing/connecting to a database driver with the db.connect module.

Hamish

thanks a lot, but the following driver error is still prompted as follows:

GRASS 6.1.cvs (spearfish60):~>v.db.connect -p map=roads driver=dbf
Vector map is connected by:
layer <1> table in database <home/xxx/spearfish60/PERMENANT/dbf/>
hoguh driver with key
GRASS 6.1.cvs (spearfish60):~>g.copy vect=roads,roads_local
COPY [roads@PERMANENT] to current mapset as [roads_local]
DBMI-DBF driver error:
Cannot open dbf database: roads

WARNING: Cannot open database ‘roads’
no database is open
WARNING: Cannot copy table
WARNING: Cannot copy roads@PERMANENT to current mapset as roads_local

Hamish hamish_nospam@yahoo.com wrote:

Raymond Fu wrote:

I have installed GRASS 6.1 CVS and using the grass61.bat. However when
I run certain DB related command like g.copy, it also returns
“:No such driver available
'ARNing: Cannot open driver 'dbf”
do I need to do something in the GRASS settings?

try testing/connecting to a database driver with the db.connect module.

Hamish

Send instant messages to your online friends http://uk.messenger.yahoo.com

Raymond Fu wrote:

  
  GRASS 6.1.cvs (spearfish60):~>v.db.connect -p map=roads driver=dbf
  Vector map <roads> is connected by:
  layer <1> table <roads> in database <home/xxx/spearfish60/PERMENANT/dbf/>
  hoguh driver <dbf> with key <cat>
  GRASS 6.1.cvs (spearfish60):~>g.copy vect=roads,roads_local
  COPY [roads@PERMANENT] to current mapset as [roads_local]
  DBMI-DBF driver error:
  Cannot open dbf database: roads
   
  WARNING: Cannot open database 'roads'
  no database is open
  WARNING: Cannot copy table
  WARNING: Cannot copy roads@PERMANENT to current mapset as roads_local

Does the database exist on the disk?

g.gisenv
cd $MAPSET
ls dbf/

?

Hamish

hi,
actually, it is sample from spearfish60.
when I type
GRASS 6.1.cvs(spearfish60):~>g.gisenv
it display:
GISDBASE=/home/xxx
LOCATION_NAME=spearfish60
MAPSET=user1
MONITOR=x1
GRASS_GUI=tcltk
GRASS 6.1.cvs(spearfish60):~>cd$MAPSET
GRASS 6.1.cvs(spearfish60):~>

it change back to current directory.

do I need to set something before running the command?

Thank a lot.

Raymond

Hamish hamish_nospam@yahoo.com wrote:

Raymond Fu wrote:

GRASS 6.1.cvs (spearfish60):~>v.db.connect -p map=roads driver=dbf
Vector map

Send instant messages to your online friends http://uk.messenger.yahoo.com

Raymond Fu wrote:

  actually, it is sample from spearfish60.
  when I type
  GRASS 6.1.cvs(spearfish60):~>g.gisenv
  it display:
  GISDBASE=/home/xxx
  LOCATION_NAME=spearfish60
  MAPSET=user1
  MONITOR=x1
  GRASS_GUI=tcltk
  GRASS 6.1.cvs(spearfish60):~>cd$MAPSET
  GRASS 6.1.cvs(spearfish60):~>
   
  it change back to current directory.
   
  do I need to set something before running the command?

$MAPSET is empty, so "cd$MAPSET" is the same as "cd"
(shell variables vs. GRASS variables)

try:

eval `g.gisenv`
cd "$GISDBASE/$LOCATION_NAME/$MAPSET"
ls dbf/

Hamish

hi,

I tried
GRASS 6.1.cvw(spearfish60):~ > eval ‘g.gisenv’
GISDBASE=/home/f1fuser
LOCATION_NAME=spearfish60
MAPSET=user1
MONITOR=x1
GRASS_GUI=tcltk
GRASS 6.1.cvs (spearfish60):~>cd “$GISDBASE/$LOCATION_NAME/$MAPSET”
GRASS 6.1.cvs (spearfish60):// >ls dbf/

nothing appears even the prompt “GRASS 6.1.cvs (spearfish60):// >” untill I click “Ctrl C”.

Anything wrong?

Thanks in advance.

Raymond

Hamish hamish_nospam@yahoo.com wrote:

Raymond Fu wrote:

actually, it is sample from spearfish60.
when I type
GRASS 6.1.cvs(spearfish60):~>g.gisenv
it display:
GISDBASE=/home/xxx
LOCATION_NAME=spearfish60
MAPSET=user1
MONITOR=x1
GRASS_GUI=tcltk
GRASS 6.1.cvs(spearfish60):~>cd$MAPSET
GRASS 6.1.cvs(spearfish60):~>

it change back to current directory.

do I need to set something before running the command?

$MAPSET is empty, so “cd$MAPSET” is the same as “cd”
(shell variables vs. GRASS variables)

try:

eval g.gisenv
cd “$GISDBASE/$LOCATION_NAME/$MAPSET”
ls dbf/

Hamish

Send instant messages to your online friends http://uk.messenger.yahoo.com

Raymond Fu wrote:

I tried
  GRASS 6.1.cvw(spearfish60):~ > eval 'g.gisenv'

that's

  eval `g.gisenv`

using back-quotes (`) (for me that's on the same key as the ~)

echo $MAPSET

Hamish

hi,

The result is as follows:
GRASS 6.1.cvs(spearfish60):~>eval g.gisenv
GRASS 6.1.cvs(spearfish60):~>echo $MAPSET
user1
GRASS 6.1.cvs(spearfish60):~>cd “$GISBASE/$LOCATION_NAME/$MAPSET”
GRASS 6.1.cvs(spearfish60):~/spearfish60/user1> ls dbf
ls: cannot access dbf: No such file or directory.

I guess the reason is because the road is orginally in PERMENANT Mapset. What I am trying to do to copy the road from PERMENANT to user1 Mapset using g.copy command.

do you have any idea?

Thanks a lot,

Raymond
Hamish <hamish_nospam@yahoo.com> wrote:
Raymond Fu wrote:

I tried
GRASS 6.1.cvw(spearfish60):~ > eval ‘g.gisenv’

that’s
eval g.gisenv
using back-quotes (`) (for me that’s on the same key as the ~)
echo $MAPSET

Hamish

Hamish hamish_nospam@yahoo.com wrote:

Raymond Fu wrote:

I tried
GRASS 6.1.cvw(spearfish60):~ > eval ‘g.gisenv’

that’s

eval g.gisenv

using back-quotes (`) (for me that’s on the same key as the ~)

echo $MAPSET

Hamish

Send instant messages to your online friends http://uk.messenger.yahoo.com

Raymond Fu wrote:

  
  The result is as follows:
  GRASS 6.1.cvs(spearfish60):~>eval `g.gisenv`
  GRASS 6.1.cvs(spearfish60):~>echo $MAPSET
  user1
  GRASS 6.1.cvs(spearfish60):~>cd "$GISBASE/$LOCATION_NAME/$MAPSET"
  GRASS 6.1.cvs(spearfish60):~/spearfish60/user1> ls dbf
  ls: cannot access dbf: No such file or directory.
   
I guess the reason is because the road is orginally in PERMENANT
Mapset. What I am trying to do to copy the road from PERMENANT to
user1 Mapset using g.copy command.

sorry,

eval `g.gisenv`
cd "$GISBASE/$LOCATION_NAME/PERMANENT"
ls dbf/

?
I am interested to know if the DBF file works.

d.rast roads
d.what.vect
?

Hamish

hi,
Today I try again.
GRASS 6.1.cvs(spearfish60):~> eval g.gisenv
GRASS 6.1.cvs(spearfish60):~> echo $MAPSET
user1
GRASS 6.1.cvs(spearfish60):~>cd “$GISBASE/$LOCATION_NAME/$MAPSET”
bash: cd: /usr/local/grass6.1.cvs/spearfish60/user1: No such file or directory.

I try to exame the location from window explorer, and I can found the road.dbf in c:\cwgin\home\xxx\spearfish60\PERMANENT\dbf\

Both command d.rast roads, d.what.vect works fine. The road can be displayed and I can use mouse to read the features attributes from a prompt window.

Thanks.

Raymond

Hamish hamish_nospam@yahoo.com wrote:

Raymond Fu wrote:

The result is as follows:
GRASS 6.1.cvs(spearfish60):~>eval g.gisenv
GRASS 6.1.cvs(spearfish60):~>echo $MAPSET
user1
GRASS 6.1.cvs(spearfish60):~>cd “$GISBASE/$LOCATION_NAME/$MAPSET”
GRASS 6.1.cvs(spearfish60):~/spearfish60/user1> ls dbf
ls: cannot access dbf: No such file or directory.

I guess the reason is because the road is orginally in PERMENANT
Mapset. What I am trying to do to copy the road from PERMENANT to
user1 Mapset using g.copy command.

sorry,

eval g.gisenv
cd “$GISBASE/$LOCATION_NAME/PERMANENT”
ls dbf/

?
I am interested to know if the DBF file works.

d.rast roads
d.what.vect
?

Hamish

Send instant messages to your online friends http://uk.messenger.yahoo.com

Raymond Fu wrote:

  I try to exame the location from window explorer, and I can found
  the road.dbf in c:\cwgin\home\xxx\spearfish60\PERMANENT\dbf\
   
  Both command d.rast roads, d.what.vect works fine. The road can be
  displayed and I can use mouse to read the features attributes from a
  prompt window.

if d.what.vect can read the DBF file ok, but g.copy can't, I'm not sure
why. Does your user name (\home\xxx ?) have a space or non
alpha-numberic character in it?

Can anyone else copy vector maps in windows?

Hamish

Hamish wrote on 12/07/2006 07:05 AM:

Raymond Fu wrote:
  

  I try to exame the location from window explorer, and I can found
  the road.dbf in c:\cwgin\home\xxx\spearfish60\PERMANENT\dbf\
   
  Both command d.rast roads, d.what.vect works fine. The road can be
  displayed and I can use mouse to read the features attributes from a
  prompt window.
    
if d.what.vect can read the DBF file ok, but g.copy can't, I'm not sure
why. Does your user name (\home\xxx ?) have a space or non
alpha-numberic character in it?

Can anyone else copy vector maps in windows?
  
Hamish,

in manage/lib/do_copy.c, 'mkdir' is used which IMHO needs a special
treatment
on Windows. See for example lib/gis/mapset_msc.c

Markus

hi,

Sorry, I work in a user level, and know not much about C. Can you suggest me what the “special treatment” and how to make the “special treatment” by command line or other ways so that the g.copy can be run without error?

Thanks in advance.

Raymond

Markus Neteler neteler@itc.it wrote:

Hamish wrote on 12/07/2006 07:05 AM:

Raymond Fu wrote:

I try to exame the location from window explorer, and I can found
the road.dbf in c:\cwgin\home\xxx\spearfish60\PERMANENT\dbf\

Both command d.rast roads, d.what.vect works fine. The road can be
displayed and I can use mouse to read the features attributes from a
prompt window.

if d.what.vect can read the DBF file ok, but g.copy can’t, I’m not sure
why. Does your user name (\home\xxx ?) have a space or non
alpha-numberic character in it?

Can anyone else copy vector maps in windows?

Hamish,

in manage/lib/do_copy.c, ‘mkdir’ is used which IMHO needs a special
treatment
on Windows. See for example lib/gis/mapset_msc.c

Markus

Send instant messages to your online friends http://uk.messenger.yahoo.com

Raymond Fu wrote:

Sorry, I work in a user level, and know not much about C. Can you
suggest me what the "special treatment" and how to make the
"special treatment" by command line or other ways so that the g.copy
can be run without error?

(it's probably a bug in the code, you'll have to wait for a new version?)

they quick & very dirty way to copy a vector map is to go into
$MAPSET/vector/ and just copy the folder with the vector to something
named something else, then do the same with $MAPSET/dbf/$MAPNAME.dbf
using the same name, and finally update the $MAPSET/vector/$MAPNAME/dbln
file in a text editor.

Hamish

Hamish wrote:

Raymond Fu wrote:
  

  I try to exame the location from window explorer, and I can found
  the road.dbf in c:\cwgin\home\xxx\spearfish60\PERMANENT\dbf\
     Both command d.rast roads, d.what.vect works fine. The road can be
  displayed and I can use mouse to read the features attributes from a
  prompt window.
    
if d.what.vect can read the DBF file ok, but g.copy can't, I'm not sure
why. Does your user name (\home\xxx ?) have a space or non
alpha-numberic character in it?

Can anyone else copy vector maps in windows?

If it is still useful, I successfully copied and displayed a couple of vectors (with DBF table) using cygwin/grass6.1.cvs
Regards,
Luigi

Thanks. But my problem is that “copy” is an example of errors encountered. It ocurrs for many operations in GRASS such as query, import.

Here is another example.
GRASS 6.1.cvs (spearfish60):~>v.db.connect -p map-roads driver=dbf
Vector map is connected by:
layer <1> table in database </home/xxx/spearfish60/PERMANENT/dbf/> through driver with key
GRASS 6.1.cvs (spearfish60):~> echo “select * from roads”|db.select
DBMI-DBF driver error:
cannot open dbf database: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/

I am using GRASS version 6.1.CVS(grass-cvs) from http://geni.ath.cx/grass.html

any idea?

Thanks in advance.

Raymond

Hamish hamish_nospam@yahoo.com wrote:

Raymond Fu wrote:

Sorry, I work in a user level, and know not much about C. Can you
suggest me what the “special treatment” and how to make the
“special treatment” by command line or other ways so that the g.copy
can be run without error?

(it’s probably a bug in the code, you’ll have to wait for a new version?)

they quick & very dirty way to copy a vector map is to go into
$MAPSET/vector/ and just copy the folder with the vector to something
named something else, then do the same with $MAPSET/dbf/$MAPNAME.dbf
using the same name, and finally update the $MAPSET/vector/$MAPNAME/dbln
file in a text editor.

Hamish

Send instant messages to your online friends http://uk.messenger.yahoo.com

Raymond Fu wrote:

  any idea?

..

I am using GRASS version 6.1.CVS(grass-cvs) from
http://geni.ath.cx/grass.html

does the cygwin version work if you are using the "native" MSys version?
or vice versa?

In the past Glynn asked if anyone would make a 6.2.0 version for Cygwin?
(now 6.2.1rc1) Non-native, but much more stable vs 6.2.0+Msys as Msys
stuff is still in active development in the 6.3 line.

Hamish

hi

does the cygwin version work if you are using the “native” MSys version?
or vice versa?
I am using XP Window. Would you please tell me more information about that version? Where can I get the version? How to install the version?

Raymond

Hamish hamish_nospam@yahoo.com wrote:

Raymond Fu wrote:

any idea?

I am using GRASS version 6.1.CVS(grass-cvs) from
http://geni.ath.cx/grass.html

does the cygwin version work if you are using the “native” MSys version?
or vice versa?

In the past Glynn asked if anyone would make a 6.2.0 version for Cygwin?
(now 6.2.1rc1) Non-native, but much more stable vs 6.2.0+Msys as Msys
stuff is still in active development in the 6.3 line.

Hamish

Send instant messages to your online friends http://uk.messenger.yahoo.com

> does the cygwin version work if you are using the "native" MSys
> version? or vice versa?

I am using XP Window. Would you please tell me more information
about that version? Where can I get the version? How to install
the version?

Are you using the 6.1.cvs (April 17, 2006) Cygwin version or the 6.3.cvs
(Sept 17, 2006) MSys version?

both from http://geni.ath.cx/grass.html

Hamish