<div dir="ltr"><br><br>On Sat, Oct 27, 2018 at 10:00 AM Frank David <<a href="mailto:frank.david@geophom.fr">frank.david@geophom.fr</a>> wrote:<br>><br>><br>> Le 26/10/2018 à 21:11, Markus Metz a écrit :<br>><br>><br>><br>> On Fri, Oct 26, 2018 at 7:17 PM Frank David <<a href="mailto:frank.david@geophom.fr">frank.david@geophom.fr</a>> wrote:<br>><br>> > If you want to preserve attribute values, use v.patch -e, otherwise don't use the -e flag, but then you might get duplicate category values.<br>><br>> >  v.patch -c should not work because -c is not a recognised flag. Which GRASS version did you use with v.patch -c?<br>><br>> I'm sorry, when I wrote -c it was -e of course ! I'm using Grass 7.4.1<br>><br><div>> But even with -e, as I wrote, the cat of the second file is shift by one... (?)</div><div><br></div><div>This is correct because it is needed to preserve attributes.<br></div>><br><div>> I have used -e because I need to add my attribute table from both file. But I had imagine to keep cat relation with data, but it's may be better to add a id field ? is there any way to increment a unique key automatically when data are appended ?</div><div><br></div><div>This unique key is automatically incremented when data are appended and attribute values need to be preserved. The unique key (more generally: the object identifier that determines to which category an object belongs) is the category value.</div><div><br></div><div>I am sure the output with shifted category values is exactly the output you want when preserving attribute values.</div><div><br></div><div>Markus M</div><div><br></div>><br>> Frank<br>><br>><br>> Markus M<br>> ><br>> > Frank<br>> ><br>> > Le 26/10/2018 à 18:44, Markus Metz a écrit :<br>> ><br>> ><br>> ><br>> > On Fri, Oct 26, 2018 at 2:26 PM Frank David <<a href="mailto:frank.david@geophom.fr">frank.david@geophom.fr</a>> wrote:<br>> > ><br>> > > I reply to myself,<br>> > ><br>> > > I mistook, if I append, I see a cat shift too. The fisrt cat of the<br>> > > second map is shift by one. It's strange no ?<br>> ><br>> > Suppose there is a feature with cat 1 in map A and a feature also with cat 1 in map B, but corresponding attribute values for cat 1 are different between map A and map B. In order to avoid such conflicts, v.patch shifts category values and updates the resultant attribute table accordingly, such that attributes for each feature are preserved.<br>> ><br>> > Markus M<br>> > ><br>> > > Frank<br>> > ><br>> > > Le 26/10/2018 à 14:17, Frank David a écrit :<br>> > ><br>> > > > Hi Stephan,<br>> > > ><br>> > > > If I add two vector in a new one with :<br>> > > ><br>> > > > v.patch -c input=map1,map2 out=map3<br>> > > ><br>> > > > I notice the map3 first cat start at 2 instead of 1, so all cat are<br>> > > > shifted by one. Do you have an idea of the reason ?<br>> > > ><br>> > > > If I append my map1 with map2 :<br>> > > ><br>> > > > v.patch -c -a input=map2 output=map1 --overwrite it works well<br>> > > ><br>> > > > Thank you<br>> > > ><br>> > > > Frank<br>> > > ><br>> > > > Le 26/10/2018 à 12:01, Stefan Blumentrath a écrit :<br>> > > >> Hi,<br>> > > >><br>> > > >> Try:<br>> > > >> v.patch -a<br>> > > >> <a href="https://grass.osgeo.org/grass76/manuals/v.patch.html">https://grass.osgeo.org/grass76/manuals/v.patch.html</a><br>> > > >><br>> > > >> (assuming attribute tables are equal).<br>> > > >><br>> > > >> Cheers<br>> > > >> Stefan<br>> > > >><br>> > > >> -----Original Message-----<br>> > > >> From: grass-user<<a href="mailto:grass-user-bounces@lists.osgeo.org">grass-user-bounces@lists.osgeo.org</a>>  On Behalf Of Frank David<br>> > > >> Sent: fredag 26. oktober 2018 11:39<br>> > > >> <a href="mailto:To%3Agrass-user@lists.osgeo.org">To:grass-user@lists.osgeo.org</a><br>> > > >> Subject: [GRASS-user] append data after a v.in.ascii import<br>> > > >><br>> > > >> Hello,<br>> > > >><br>> > > >> I wonder what is the best way to append a vector map and his attribute data created with v.in.ascii  ?<br>> > > >><br>> > > >> Thanks<br>> > > >><br>> > > >> Frank<br>> > > >><br>> > > >> _______________________________________________<br>> > > >> grass-user mailing list<br>> > > >> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> > > >> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>> > > ><br>> > > > _______________________________________________<br>> > > > grass-user mailing list<br>> > > > <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> > > > <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>> > > _______________________________________________<br>> > > grass-user mailing list<br>> > > <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> > > <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a></div>