it's not enough. You need to defined also categories for layer '2',
see `v.category` for details. This module allows to change layer
number, but unfortunately not to copy categories from one layer to
another.
it's not enough. You need to defined also categories for layer '2',
see `v.category` for details. This module allows to change layer
number, but unfortunately not to copy categories from one layer to
another.
So, if I need to assign different attributes to the objects in the vector
file I need to assign new categories to the objects and store them in a new
layer to be connected to a different table.
But how can I add a new layer to a vector?
v.category seems to produce a new vector map with new category values but
doesn't add a new layer in the input map.
Sure it does. v.category op=add layer=2 ... will create a new map with the old category values preserved in layer 1 and with new category values in layer 2. And as mentioned in a previous mail, in GRASS7 you can simply copy the category values of layer 1 to layer 2 with op=transfer.
But I suppose there is another simpler way to add and fill a new layer as,
for example, to reclass the category numbers of a map and put the reclassed
categories in a new layer to be connected to a new table with new
attributes. Or not?
AFAIK, v.reclass does not allow you to chose the layer of categories in the new map, only which layer to use in the old map.
On Sat, Nov 24, 2012 at 11:31 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:
Sure it does. v.category op=add layer=2 ... will create a new map with the
old category values preserved in layer 1 and with new category values in
layer 2. And as mentioned in a previous mail, in GRASS7 you can simply copy
the category values of layer 1 to layer 2 with op=transfer.
I start to like this function (hint hint
I quickly compared the two main files and it doesn't look like
complicated to backport.
However, I cannot judge if it would have any background complications.