[GRASS-dev] [GRASS GIS] #2641: Copy cat value to a new layer does not work

#2641: Copy cat value to a new layer does not work
-------------------------+--------------------------------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.1
Component: Default | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
I have a vector map with layer=1 linked to attribute table and layer=2
providing the number of overlapping categories. Aim is to create a third
layer with unique values for each feature/polygon. The third step below,
uploading the cat values from layer 2 to layer 3 doesn't work.

# Add layer 3 to the vector layer test

# add attribute table
v.category test op=add layer=3 type=centroid out=test2
v.db.addtable test2 layer=3 column="cat2 integer"

# Upload cat from layer 2 to layer 3
v.to.db test2 layer=3 query_layer=2 op=cat columns=cat2

Error message:

...
WARNING: Record (cat 75456) already exists (not inserted)
WARNING: Record (cat 75457) already exists (not inserted)
WARNING: Record (cat 75458) already exists (not inserted)
WARNING: Record (cat 75459) already exists (not inserted)
WARNING: Record (cat 75460) already exists (not inserted)
  100%
75460 categories read from vector map (layer 3)
75460 records selected from table (layer 2)
75460 categories read from vector map exist in selection from table
0 records updated/inserted (layer 3)

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