[GRASS-dev] no cats in map but adding table says 1 is there

Take a simple vector map - 3 points, each having an unique category:

$ v.info -t rndv
nodes=3
points=3
lines=0
boundaries=0
centroids=0
areas=0
islands=0
faces=0
kernels=0
primitives=3
map3d=0

$ v.category opt=print in=rndv
(no output, i.e. no categories)

Why does v.db.addtable say "1 categories read from map" when adding table to it?:

$ v.db.addtable rndv col='cat int, elev double'
Using vector map name as table name: rndv
Creating new DB connection based on default mapset settings...
Creating table with columns (cat integer, elev double)
The table <rndv> is now part of vector map <rndv> and may be deleted or overwritten by GRASS modules
Select privileges were granted on the table
Aktualizacja bazy danych...
  100%
1 categories read from map <--- ???!
0 records updated/inserted
Current attribute table links:
Vector map <rndv@PERMANENT> is connected by:
layer <1> table <rndv> in database </home/grassdata/caves_utm33/PERMANENT/dbf/> through driver <dbf> with key <cat>

Since the vector map has no categories, I would expect "0 categories read from map"...

Maciek

--
Maciej Sieczka
www.sieczka.org

Hi,

2008/12/6 Maciej Sieczka <msieczka@sieczka.org>:

Why does v.db.addtable say "1 categories read from map" when adding table to
it?:

it's because v.to.db groups all features without category into cat
'-1'. Fixed (not reported) in r34751.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *

Martin Landa pisze:

Hi,

2008/12/6 Maciej Sieczka <msieczka@sieczka.org>:

Why does v.db.addtable say "1 categories read from map" when adding table to
it?:

it's because v.to.db groups all features without category into cat
'-1'. Fixed (not reported) in r34751.

Thanks for q quick fix.

Best,
Maciek

--
Maciej Sieczka
www.sieczka.org