[GRASS-dev] no way to ID table columns outside of working mapset?

Michael Barton michael.barton at asu.edu
Mon Sep 8 12:46:35 EDT 2008


Thanks Moritz,


On Sep 8, 2008, at 9:07 AM, Moritz Lennert wrote:

> On 08/09/08 17:43, Michael Barton wrote:
>> I'm working on a fix for vector attribute column selection in the  
>> wxGUI and discovered that I can't find a way to get the columns for  
>> an attribute table for a vector not in the current working mapset.  
>> v.db.connect and db.columns won't accept fully qualified map names.  
>> Is this something that needs to be fixed or is there a workaround  
>> that I didn't see?
>
> Martin already gave you v.info, but db.columns is not related to a  
> mapset (not even necessarily related to vector attribute tables) and  
> thus works with any table,database,driver combination you give it.

v.info will probably do the trick.

db.columns will return simply the columns without specifying the  
database and driver if it is for a vector whose connection is already  
set. Otherwise, it's not particularly easy to find out the database  
and driver for an attribute table connected to a vector that is not in  
the current working mapset because the commands will not accept a  
fully qualified name.

>
>
> And, v.db.connect does accept fully qualified in grass7:

Can this be backported to 6.4?

Michael

>
>
> GRASS 7.0.svn (nc_spm_06):~ > g.mapsets -p
> user2 user1 PERMANENT
>
> GRASS 7.0.svn (nc_spm_06):~ > v.db.connect -p mygeodetic_pts at sqlite
> Vector map <mygeodetic_pts at sqlite> is connected by:
> layer <1> table <mygeodetic_pts> in database </home/mlennert/GRASS/ 
> DATA/nc_spm_06/sqlite/sqlite.db> through driver <sqlite> with key  
> <cat>
>
> Can't test 6.4 right now...but I guess this is linked to Glynn's  
> recent changes.
>
> Moritz



More information about the grass-dev mailing list