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?
Michael
______________________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Tempe, AZ 85287-2402
USA
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
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.
And, v.db.connect does accept fully qualified in grass7:
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:
v.db.connect -g P079214
WARNING: 'vector/P079214' was found in more mapsets (also found in
PERMANENT).
WARNING: using 'P079214@martin'.
1/VEG_TREE_BL P079214 cat /home/martin/grassdata/nc_spm_08/martin/dbf/ dbf
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.
v.info is good candidate for this work, see menuform.py ...
You are correct. This didn't seem to work when I tested it last night. v.info -c is a problem because it does not give a list of defined layers; you have to know which layer you want to look at and tell it.
Michael
______________________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Tempe, AZ 85287-2402
USA
v.db.connect -g P079214
WARNING: 'vector/P079214' was found in more mapsets (also found in
PERMANENT).
WARNING: using 'P079214@martin'.
1/VEG_TREE_BL P079214 cat /home/martin/grassdata/nc_spm_08/martin/dbf/ dbf
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.
No. It will only do this in the case that the table connected to the vector has the same name as the map _and_ that the current database connection parameters defined by db.connect are identical to those of the specific vector. Both of these are not guaranteed, so one should never rely on them (ISTR that some other modules do - mostly scripts, which IMHO is a bug).
As I said, there is no link to _maps_ in db.connect.