Le 26/10/2018 à 21:11, Markus Metz a écrit :
On Fri, Oct 26, 2018 at 7:17 PM Frank David <[email protected]
<mailto:[email protected]>> wrote:
>
> Thank you Markus,
>
> Is a feature could be created without a row data ?, because the two
maps have been created with a v.in.ascii from a text file, so it means
that one object by row has been created. For both of my two maps.
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.
v.patch -c should not work because -c is not a recognised flag. Which
GRASS version did you use with v.patch -c?
I'm sorry, when I wrote -c it was -e of course ! I'm using Grass 7.4.1
But even with -e, as I wrote, the cat of the second file is shift by
one... (?)
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 ?
Frank
Markus M
>
> Frank
>
> Le 26/10/2018 à 18:44, Markus Metz a écrit :
>
>
>
> On Fri, Oct 26, 2018 at 2:26 PM Frank David <[email protected]
<mailto:[email protected]>> wrote:
> >
> > I reply to myself,
> >
> > I mistook, if I append, I see a cat shift too. The fisrt cat of the
> > second map is shift by one. It's strange no ?
>
> 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.
>
> Markus M
> >
> > Frank
> >
> > Le 26/10/2018 à 14:17, Frank David a écrit :
> >
> > > Hi Stephan,
> > >
> > > If I add two vector in a new one with :
> > >
> > > v.patch -c input=map1,map2 out=map3
> > >
> > > I notice the map3 first cat start at 2 instead of 1, so all cat are
> > > shifted by one. Do you have an idea of the reason ?
> > >
> > > If I append my map1 with map2 :
> > >
> > > v.patch -c -a input=map2 output=map1 --overwrite it works well
> > >
> > > Thank you
> > >
> > > Frank
> > >
> > > Le 26/10/2018 à 12:01, Stefan Blumentrath a écrit :
> > >> Hi,
> > >>
> > >> Try:
> > >> v.patch -a
> > >> https://grass.osgeo.org/grass76/manuals/v.patch.html
> > >>
> > >> (assuming attribute tables are equal).
> > >>
> > >> Cheers
> > >> Stefan
> > >>
> > >> -----Original Message-----
> > >> From: grass-user<[email protected]
<mailto:[email protected]>> On Behalf Of Frank David
> > >> Sent: fredag 26. oktober 2018 11:39
> > >> To:[email protected]
<mailto:to%[email protected]>
> > >> Subject: [GRASS-user] append data after a v.in.ascii import
> > >>
> > >> Hello,
> > >>
> > >> I wonder what is the best way to append a vector map and his
attribute data created with v.in.ascii ?
> > >>
> > >> Thanks
> > >>
> > >> Frank
> > >>
> > >> _______________________________________________
> > >> grass-user mailing list
> > >> [email protected] <mailto:[email protected]>
> > >> https://lists.osgeo.org/mailman/listinfo/grass-user
> > >
> > > _______________________________________________
> > > grass-user mailing list
> > > [email protected] <mailto:[email protected]>
> > > https://lists.osgeo.org/mailman/listinfo/grass-user
> > _______________________________________________
> > grass-user mailing list
> > [email protected] <mailto:[email protected]>
> > https://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user