I've solved my needs about the creation of a new layer, but I feel that the mechanism a bit counter-intuitive.<div>A new layer can be created *only* through an intemediary vector</div><div><br></div><div>>> v.category input=rivers output=rivers_tmp layer=2</div>
<div>>> g.remove vect=rivers</div><div>>> g.rename vect=rivers_tmp,rivers</div><div><br></div><div>Directly creating a new connection on a new layer produces the new layer, but the categories are not attached:</div>
<div><br></div><div>>> v.db.connect map=rivers table=rivers_clone layer=2
</div><div><br></div><div>and the vector *seems* to have a new layer, but it cannot be used.</div><div>I see the same results if I create a new layer through the wxGUI (vector attributes window -> new layer). A new layer is shown, but it cannot be used (eg cannot be displayed). I will open a ticket on this.</div>
<div><br></div><div>giovanni</div><div><br></div><div><br><div class="gmail_quote">2011/11/20 G. Allegri <span dir="ltr"><<a href="mailto:giohappy@gmail.com">giohappy@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I'm having some doubts on the layer mechanism.<br>Two questions in this point.<br><br>1) Creating a new layer (ie a new connection between a vector and a DB table)<br>I've imported a vector (rivers) through v.in.ogr, then I've cloned the original table:<br>
>> db.copy from_table=rivers to_table=rivers_clone<br>I've created a new connection:<br>>> v.db.connect map=rivers table=rivers_clone layer=2<br><br>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:<br>
>> v.category input=rivers layer=2 option=print<br>no categories are displyed (while they are listed if I choose layer 1)<br><br>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?<br>
<br>2) I haven't understood the purpose of v.category chlayer option.<br>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<br>
<br>Help :)<br>thx,<br>giovanni<br>
</blockquote></div><br></div>