[GRASS-user] append data after a v.in.ascii import
Frank David
frank.david at geophom.fr
Tue Oct 30 02:55:34 PDT 2018
Le 28/10/2018 à 22:33, Markus Metz a écrit :
>
>
> On Sat, Oct 27, 2018 at 10:00 AM Frank David <frank.david at geophom.fr
> <mailto:frank.david at geophom.fr>> wrote:
> >
> >
> > Le 26/10/2018 à 21:11, Markus Metz a écrit :
> >
> >
> >
> > On Fri, Oct 26, 2018 at 7:17 PM Frank David <frank.david at geophom.fr
> <mailto:frank.david at geophom.fr>> wrote:
> >
> > > 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... (?)
>
> This is correct because it is needed to preserve attributes.
> >
> > 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 ?
>
> 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.
>
> I am sure the output with shifted category values is exactly the
> output you want when preserving attribute values.
>
> Markus M
Thank you Markus.
I have to learn more about topology I think... I believe understand that
cat value take care off all object of the vector map even those who are
not connected to the attribute table... Thanks.
Cheers
Frank
>
> >
> > 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
> <frank.david at geophom.fr <mailto:frank.david at geophom.fr>> 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<grass-user-bounces at lists.osgeo.org
> <mailto:grass-user-bounces at lists.osgeo.org>> On Behalf Of Frank David
> > > > >> Sent: fredag 26. oktober 2018 11:39
> > > > >> To:grass-user at lists.osgeo.org
> <mailto:To%3Agrass-user at lists.osgeo.org>
> > > > >> 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
> > > > >> grass-user at lists.osgeo.org <mailto:grass-user at lists.osgeo.org>
> > > > >> https://lists.osgeo.org/mailman/listinfo/grass-user
> > > > >
> > > > > _______________________________________________
> > > > > grass-user mailing list
> > > > > grass-user at lists.osgeo.org <mailto:grass-user at lists.osgeo.org>
> > > > > https://lists.osgeo.org/mailman/listinfo/grass-user
> > > > _______________________________________________
> > > > grass-user mailing list
> > > > grass-user at lists.osgeo.org <mailto:grass-user at lists.osgeo.org>
> > > > https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20181030/a21a5eca/attachment.html>
More information about the grass-user
mailing list