[GRASS-user] two questions on setting a new layer for for a vector

G. Allegri giohappy at gmail.com
Sun Nov 20 08:11:36 EST 2011


I'm having some doubts on the layer mechanism.
Two questions in this point.

1) Creating a new layer (ie a new connection between a vector and a DB
table)
I've imported a vector (rivers) through v.in.ogr, then I've cloned the
original table:
>> db.copy from_table=rivers to_table=rivers_clone
I've created a new connection:
>> v.db.connect map=rivers table=rivers_clone layer=2

At this point I supposed that the last command had created all the needed
structures and fields for the new layer (2), but if I print the categories:
>> v.category input=rivers layer=2 option=print
no categories are displyed (while they are listed if I choose layer 1)

Question: I thought that a new connection used the same vector categories,
but it seems I was wrong. How to make the layer 2 use the same vactor
categories from layer 1?

2) I haven't understood the purpose of v.category chlayer option.
The manual says that the commands change layer numbers. If I understand it
correctly, it changes the numbering of the vector-db connections, right?
Whatever it means I wonder why a new vector is created. If I have a vector
with layers 1,2 I thought that chlayer let me swap the numbers, but if it
creates a new vector it doesn't change the layer numbers, it creates a new
layer with the new layer number... I'm confused

Help :)
thx,
giovanni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20111120/163f6f38/attachment.html


More information about the grass-user mailing list