<html style="direction: ltr;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;">
<p><font size="4">You do not have any ID column for each class in
the original shapefiles, so there is no information to maintain.
You should add an ID column, and edit this column such that it
contains either text or a number to indicate the class. (There's
no need for two separate shapefiles: just one with a column
containing the ID.)</font></p>
<p><font size="4">You can do this either in the other software, or
directly in GRASS.</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4">If you want to accomplish this in GRASS with the
existing point layers, then:</font></p>
<ol>
<li>Add a column for the class_id to both using:</li>
<ul>
<li>v.db.addcolumn <bare map> column="class_id INTEGER"</li>
<li>v.db.addcolumn <woody map> column="class_id INTEGER"<br>
</li>
</ul>
<li>Update this column for both: <br>
</li>
<ul>
<li>v.db.update <bare map> column="class_id" value=0 #
for the bare</li>
<li>v.db.update <woody map> column=class_id value=1 # for
the woody points</li>
</ul>
<li>Now merge:</li>
<ul>
<li>v.patch -e input="woody,bare" output=training<br>
</li>
</ul>
</ol>
<div class="moz-cite-prefix">On 18/02/2022 00:00, Daniel Jeffrey
Kozar via grass-user wrote:<br>
</div>
<blockquote type="cite"
cite="mid:SN6PR08MB51997F6A3238F77DF5170E8FBC369@SN6PR08MB5199.namprd08.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Hi everyone, </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
I am generating a workflow for object-based image classification
of drone imagery and am getting tripped up when utilizing
vectors for training data. I have ".shp" files for each class
created in another software and am trying to join them to create
one vector file with an ID column corresponding to the class. I
have been trying to use the command v.patch, which does join
them, but doesn't seem to allow for maintaining information
about the class. Does anyone have any recommendations to do
this? Any help would be greatly appreciated. Ive attached two
example ".shp" files for reference. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Best, </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Daniel</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
</body>
</html>