<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Moritz,<div class=""><br class=""></div><div class="">v.db.connect -p c34_patch<br class="">Vector map <c34_patch> is connected by:<br class="">layer <1/c34_patch> table <c34_patch> in database </Users/pete/grassdata/<FOO>/project_area/sqlite/sqlite.db> through driver <sqlite> with key <cat></div><div class=""><br class=""></div><div class="">So it seems that only layer 1 is connected.</div><div class=""><br class=""></div><div class="">When try to connect layer 2:</div><div class=""><br class=""></div><div class="">v.db.connect map=c34_patch@project_area table=c34_patch layer=2<br class="">ERROR: Use -o to overwrite existing link for layer <2></div><div class=""><br class=""></div><div class="">I’m little unclear on the ‘table’ argument, maybe that should be a now table?<br class=""><div><br class=""></div><div>Thanks very much.</div><div><br class=""></div><div>Peter</div><div><blockquote type="cite" class=""><div class="">On Dec 6, 2017, at 10:27 AM, Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be" class="">mlennert@club.worldonline.be</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Am 6. Dezember 2017 18:42:22 MEZ schrieb Peter Tittmann <</span><a href="mailto:ptittmann@gmail.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">ptittmann@gmail.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">>:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Thank you, Moritz.<br class=""><br class="">I'm pretty familiar with SQL but can’t figure out how layer 2 is stored<br class="">in the database. When I `pragma table_info(<vector>)` I only see the<br class="">layer 1 attributes.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">v.db.connect -p (or grass.script.vector_db() )will show you all connections between the map and database tables.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Moritz</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class="">I’ll work with the GRASS approach you suggested.<br class=""><br class="">Best,<br class="">Peter<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Dec 1, 2017, at 11:53 PM, Moritz Lennert<br class=""></blockquote><<a href="mailto:mlennert@club.worldonline.be" class="">mlennert@club.worldonline.be</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">On 02/12/17 02:03, Peter Tittmann wrote:<br class=""><blockquote type="cite" class="">Hi,<br class="">I have a vector (`POINT`) which has two layers containing relevant<br class=""></blockquote></blockquote>attributes (’strata’ and ’stand’). I would like to concatenate the two<br class="">values into a new attribute for Layer 1 (’<STRATA>_<STAND>’). I’ve been<br class="">struggling to sort this out for too long and am tapping out. Its<br class="">probably blatantly obvious but it has escaped me.<br class=""><blockquote type="cite" class=""><br class=""><br class="">Probably the easiest way if your not very familiar with SQL:<br class=""><br class="">- Create a new column in layer 1 where you can put the info from<br class=""></blockquote>layer 2<br class=""><blockquote type="cite" class="">- Fill this column with v.to.db option=query query_layer=2, etc<br class="">- Create a second new column to hold the concatenation<br class="">- v.db.update to update this new column with the concatenation of the<br class=""></blockquote>two others (something like qcol = "STRATA || '_' || STAND")<br class=""><blockquote type="cite" class=""><br class="">Otherwise, if there is a common key in both tables, you can just<br class=""></blockquote>create a new column and use db.execute to launch a UPDATE TABLE<br class="">directly, grabbing the info from the two table and concatenating it<br class="">directly in the query.<br class=""><blockquote type="cite" class=""><br class="">Moritz<br class=""><br class=""><br class=""><blockquote type="cite" class="">Thank you!<br class="">Here are some specifics.<br class="">east, north: 651849.842735, 6604949.78485<br class="">c34_patch@project_area:<br class=""> Type: Point<br class=""> Id: 21622<br class=""> Layer: 1<br class=""> Category: 21623<br class=""> Driver: sqlite<br class=""> Database:<br class=""></blockquote></blockquote>/Users/pete/grassdata/PortGraham/project_area/sqlite/sqlite.db<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""> Table: c34_patch<br class=""> Key_column: cat<br class=""> Attributes:<br class="">   cat: 21623<br class="">*strata: 3  — STRATA*<br class="">c34_patch@project_area:<br class=""> Type: Point<br class=""> Id: 21622<br class=""> Layer: 2<br class="">*Category: 10  — STAND*<br class="">_______________________________________________<br class="">grass-user mailing list<br class=""><a href="mailto:grass-user@lists.osgeo.org" class="">grass-user@lists.osgeo.org</a><span class="Apple-converted-space"> </span><<a href="mailto:grass-user@lists.osgeo.org" class="">mailto:grass-user@lists.osgeo.org</a>><br class=""><a href="https://lists.osgeo.org/mailman/listinfo/grass-user" class="">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br class=""></blockquote></blockquote><<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" class="">https://lists.osgeo.org/mailman/listinfo/grass-user</a>></blockquote></div></blockquote></div><br class=""></div></body></html>