<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Dear Markus,</p>
    <p>I saw that you updated v.patch to ignore the order of columns
      some months ago. However, I updated my grass to version 7.4.2. (on
      Linux Mint 18) and still get "ERROR: Column names differ"</p>
    <p>I am sure that they are the same, only the order is different. <br>
    </p>
    <p>Do you have any suggestions?</p>
    <p>Mira<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 29/10/2018 20:35, Markus Metz wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAG+h=FEv-GfnJrU0_7peLagKrgkERoij+e1RkwcgywQ_snhN6w@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr"><br>
        <br>
        On Mon, Oct 29, 2018 at 6:13 PM Mira Kattwinkel <<a
          href="mailto:kattwinkel-mira@uni-landau.de"
          moz-do-not-send="true">kattwinkel-mira@uni-landau.de</a>>
        wrote:<br>
        ><br>
        > Dear list,<br>
        ><br>
        > I would like to patch two vector maps together and keep
        their attributes<br>
        > (with the same columns but not in identical order) using
        v.patch with<br>
        <div>> flag -e.</div>
        <div><br>
        </div>
        <div>Granted that the two vector maps have attributes in layer 1
          which you want to keep, you can use v.patch -e directly.
          v.patch will change category values of all but the first map
          such that no conflicts with identical categories from
          different input maps arise. There is no need to prepare the
          input maps with v.category.<br>
        </div>
        <div><br>
        </div>
        <div>v.patch takes care of different column ordering.</div>
        <div><br>
        </div>
        <div>HTH,</div>
        <div><br>
        </div>
        <div>Markus M</div>
        <div><br>
        </div>
        ><br>
        > Both maps have cats starting with 1. Hence, I thought I use
        v.category,<br>
        > option 'add' to add a fixed (large enough value) to the
        categories and<br>
        > creating a second layer to keep the attribute values like
        this:<br>
        > v.category input=map1 layer=2 type=line output=map1_cat
        option=add<br>
        > cat=100001<br>
        ><br>
        > Then I add a table to layer 2 with a column for the old
        cat:<br>
        > v.db.addtable map=map1_cat layer=2 columns="cat_lyr1
        integer"<br>
        ><br>
        > Next, I fill this column (I want to use this column to be
        able to later<br>
        > join the attributes from the original maps):<br>
        > v.to.db map=map1_cat layer=2 type=line option=query
        columns=cat_lyr1<br>
        > query_column=cat<br>
        ><br>
        > Finally, I would like to use v.patch with flag e. However,
        this works<br>
        > only for the table in layer 1. Hence, I wanted to use
        v.categroy to<br>
        > change the layer numbers:<br>
        > v.category input=map1_cat layer=2,1 type=line
        output=map1_cat2<br>
        > option=chlayer<br>
        ><br>
        > And get the warning: WARNING: Database connection and
        attribute tables<br>
        > for concerned layers are not changed<br>
        ><br>
        > I tried to first drop the table in layer 1 with:<br>
        > v.db.droptable -f map=map1_cat<br>
        > and then use v.category but that results in the same
        warning as before.<br>
        > Layer 2 is still layer 2.<br>
        ><br>
        > Can anybody please explain to me what is wrong? I am still
        struggling to<br>
        > get my head around categories and layers but I thought I
        found a way to<br>
        > do it correctly.<br>
        ><br>
        > Thanks a lot,<br>
        > Mira<br>
        ><br>
        ><br>
        > --<br>
        > Dr. Mira Kattwinkel<br>
        > Quantitative Landscape Ecology<br>
        > Institute for Environmental Sciences<br>
        > University of Koblenz-Landau<br>
        > Fortstraße 7<br>
        > 76829 Landau<br>
        > Germany<br>
        > Phone: + 49 6341 280-31553<br>
        > Office: Building I, Room 2.02<br>
        ><br>
        > _______________________________________________<br>
        > grass-user mailing list<br>
        > <a href="mailto:grass-user@lists.osgeo.org"
          moz-do-not-send="true">grass-user@lists.osgeo.org</a><br>
        > <a
          href="https://lists.osgeo.org/mailman/listinfo/grass-user"
          moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/grass-user</a></div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Dr. Mira Kattwinkel
Quantitative Landscape Ecology
Institute for Environmental Sciences
University of Koblenz-Landau
Fortstraße 7
76829 Landau
Germany
Phone: + 49 6341 280-31553
Office: Building I, Room 2.02</pre>
  </body>
</html>