On 17/11/12 11:42, Aldo Clerici wrote:
GRASS user,
I'm having some problem in connecting tables to a map.
This is the procedure (in order to simplify I used the same table but
with different names) :
g.copy vect=roads,roads1
g.copy vect=roads,roads2
The two tables are in the table list.
db.tables -p
v.db.connect map=roads1 table=roads2 layer=2
The connections seem ok:
v.db.connect -p map=roads1
Vector map <roads1@esercizi> is connected by:
layer <1> table <roads1> in database
</home/clerici/GRASSdata/spearfish60/esercizi/dbf/> through driver <dbf>
with key <cat>
layer <2> table <roads2> in database
</home/clerici/GRASSdata/spearfish60/esercizi/dbf/> through driver <dbf>
with key <cat>
Contrary to common belief (and unfortunately some parameter descriptions
in man pages still support that belief) layers are not connections to
tables as such. You can, however, connect features that have category
values in a given layer to a table. Please read the section on layers in
the introduction to vector data processing in the man pages [1].
In your case, no feature has a category value in layer 2 so layer 2 is
"empty" in terms of vector features. You first have to add category
values to layer 2 in the vector file in order to be able to visualise
them and to connect them to attributes in a table.
Moritz
[1] http://grass.fbk.eu/grass64/manuals/html64_user/vectorintro.html
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user