[GRASS-dev] [GRASS GIS] #2618: v.vector option=transfer does not copy multiple cat values

#2618: v.vector option=transfer does not copy multiple cat values
---------------------------------+------------------------------------------
Reporter: ulf | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Vector | Version: 7.0.0
Keywords: v.category transfer | Platform: Linux
      Cpu: x86-64 |
---------------------------------+------------------------------------------
v.vector with option=transfer only copies one category value when a
feature has multiple category values in the same layer. An example to
explain what I mean:

{{{
echo "100|100|1" | v.in.ascii output=test input=-
fid=$(v.edit --quiet layer=1 map=test tool=select cat=1)
v.edit map=test layer=1 tool=catadd ids=${fid} cats=2
}}}
Now,

{{{
v.category option=print layer=1 input=test2
}}}
outputs "1/2", but

{{{
v.category option=print layer=2 input=test2
}}}
outputs "1". I would expect "1/2"...

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2618&gt;
GRASS GIS <http://grass.osgeo.org>

#2618: v.vector option=transfer does not copy multiple cat values
---------------------------------+------------------------------------------
Reporter: ulf | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Vector | Version: 7.0.0
Keywords: v.category transfer | Platform: Linux
      Cpu: x86-64 |
---------------------------------+------------------------------------------

Comment(by ulf):

One row disappeared from my example - to create map {{{test2}}} i did the
following:
{{{
echo "100|100|1" | v.in.ascii output=test input=-
fid=$(v.edit --quiet layer=1 map=test tool=select cat=1)
v.edit map=test layer=1 tool=catadd ids=${fid} cats=2
v.category option=transfer layer=1,2 input=test output=test2
}}}
Sorry about that,
Ulf

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2618#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2618: v.category option=transfer does not copy multiple cat values
---------------------------------+------------------------------------------
Reporter: ulf | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Vector | Version: 7.0.0
Keywords: v.category transfer | Platform: Linux
      Cpu: x86-64 |
---------------------------------+------------------------------------------

Comment(by mmetz):

Fixed in r64825,6 (trunk, relbr70).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2618#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2618: v.category option=transfer does not copy multiple cat values
---------------------+---------------------------------
  Reporter: ulf | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.1
Component: Vector | Version: 7.0.0
Resolution: | Keywords: v.category transfer
       CPU: x86-64 | Platform: Linux
---------------------+---------------------------------

Comment (by mlennert):

Can this be closed ?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2618#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2618: v.category option=transfer does not copy multiple cat values
---------------------+---------------------------------
  Reporter: ulf | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.1
Component: Vector | Version: 7.0.0
Resolution: | Keywords: v.category transfer
       CPU: x86-64 | Platform: Linux
---------------------+---------------------------------

Comment (by wenzeslaus):

I added the commands as a Bash test case in r65485 but I actually don't
understand what the output means here (why it is the same for `layer=1`
and `layer=2`?) and what `option=transfer` does. It would be good if
somebody can review it and/or comment in the test.

Side note: The Bash script tests (test cases, test files) are really easy
to create. Just look at r65485. They have a lot of problems and the
solution is not scalable but it is better than no test!

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2618#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>