[GRASS-dev] probable v.db.connect -g parsing problem

Hamish hamish_b at yahoo.com
Mon Aug 24 03:50:49 EDT 2009


Hi,

I notice a probable problem parsing v.db.connect's -g output. An
extra term containing the layer-name (if present) is added to the
first data column. e.g. if layer 1 had the name "layer_name"

G> v.db.connect -g fields2 fs='|'
1/layer_name|fields2|cat|.../$MAPSET/dbf/|dbf
   instead of
1|fields2|cat|.../$MAPSET/dbf/|dbf


see v.db.connect/main.c "if (fi->name) { fprintf( ..."

probably the solution is not too bad, just take the .split("/")[0]
term when dealing with column 1 in the GUI code.

I am not an expert in these things so I ask: under what conditions
would a vector DB layer have a name? Is it seen in the wild or is
it just an unused nice idea someone had?


Hamish


More information about the grass-dev mailing list