<div dir="ltr"><br><br>On Fri, Mar 8, 2019 at 9:22 PM Ken Mankoff <<a href="mailto:mankoff@gmail.com">mankoff@gmail.com</a>> wrote:<br>><br>> Hello,<br>><br>> I'm trying to gain proficiency w/ GRASS vectors & layers. I've read <a href="https://grass.osgeo.org/grass76/manuals/vectorintro.html">https://grass.osgeo.org/grass76/manuals/vectorintro.html</a> and <a href="https://grasswiki.osgeo.org/wiki/Vector_Database_Management">https://grasswiki.osgeo.org/wiki/Vector_Database_Management</a> a few times, but am still not clear on how to create layers.<br>><br>> I have three vector layers: BASINS, STREAMS, and OUTLETS. All basins have outlets. All streams have outlets. Not all basins have streams (some small basins have no streams but still have an outlet).<br>><br>> I can merge these three with v.patch, but they're all in one layer. I thought it might make sense for each to exist on its own layer. Or perhaps my misconception is that they cannot - it is the attribute tables that exist on separate layers?<br>><br><div>> If someone can provide an example how to combine these there vectors, or link to a tutorial, I would be grateful.</div><div><br></div><div>In this example, there are three vectors, each with one layer which is probably for all layer number 1.</div><div><br></div><div>If you want to patch these three vectors together such that each input vector with one layer ends up in one individual layer in the output vector, you need to do some preparation, e.g.:</div><div><br></div><div>Keep vector layer 1 for BASINS.</div><div><br></div><div>Change vector layer 1 for STREAMS to layer 2 with</div><div>v.category in=STREAMS out=STREAMS_l2 op=chlayer layer=1,2<br></div><div><br></div><div><div>Change vector layer 1 for OUTLETS to layer 3 with</div><div>v.category in=OUTLETS out=OUTLETS_l3 op=chlayer layer=1,3</div><div><br></div><div>patch them together with</div><div>v.patch in=BASINS,STREAMS_l2,OUTLETS_l3 out=...</div><div><br></div><div>In order to copy attributes, you need to copy the attributeĀ  tables of the input vectors BASINS, STREAMS, and OUTLETS.<br></div><div><br></div><div>The attribute tables linked to the original input vectors are printed with v.db.connect -p or v.db.connect -g.</div><div><br></div><div>Now copy the tables with db.copy and link them to corresponding layer of the patched output using v.db.connect.</div><div><br></div><div>HTH,</div><div><br></div><div>Markus M<br></div><br></div></div>