On 08/09/08 18:46, Michael Barton wrote:
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.

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.

Moritz
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to