[GRASS-user] How to copy attributes from one layer to another?

Markus Metz markus.metz.giswork at gmail.com
Wed Nov 22 23:34:58 PST 2017


On Thu, Nov 23, 2017 at 12:13 AM, Eric Patton <thepattonian at gmail.com>
wrote:
>
> Is there an easy way to copy all attributes from layer 2 of a vector
points map to layer one (which doesn't currently exist - is will need to be
created)?
>
> Alternatively, maybe all I really need is a way to rename layer 2 to
layer 1 while keeping all attributes intact.

You need to distinguish between category values of the vector points and
attribute tables linked to a particular layer.

You can change the layer number of category values from layer 2 to layer 1
with

v.category option=chlayer layer=2,1

Now you need to reconnect the attribute table from layer 2 to layer 1 with
v.db.connect

HTH,

Markus M

>
> Background: I need to move all the attributes to layer 1 in my point map
in order to patch vector maps together with v.patch.
>
> Thanks,
>
> --
> Eric Patton <thepattonian at gmail.com>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20171123/cb97156a/attachment-0001.html>


More information about the grass-user mailing list