[GRASS-dev] Re: [GRASS-user] weird dbf file in GRASS 6.4

QGIS and GRASS devs,

Below I'm forwarding you a QGIS-GRASS issue. It seems to be somewhat
related to https://trac.osgeo.org/qgis/ticket/554#comment:7.

maning sambale pisze:

I am editing a dbf file of a GRASS vector in QGIS. When I launch the
open attribute table in QGIS it shows a long table of over a thousand
records, but when I open the file in OpenOffice Calc 3.0 it only shows
me 30 records which was the 30 classes I initially converted from
raster to vector.

Using:

r.to.vect -v input=x output=x_vect feature=area --overwrite --verbose

My plan is to edit the class categoris of each vector polygon in
OOCalc. Any ideas why is it like this? I don't have problems with my
previous vector files when I am using 6.3

You used the '-v' switch which means: "Use raster values as categories
instead of unique sequence". Thus, it is normal that the output table
has only that many rows, as many unique cell values were there in the
input raster map. Multiple polygons are linked to the same table row (by
having the same category), so there are more polygons than rows in the
table indeed.

QGIS table editor does not present a GRASS vector map table as it really
is, but treats each vector feature separately. This has the pro that you
can access individual polygons from the table editor, no matter that
multiple polygons have the same category. The con is that it's not the
real table as it is, which confuses some users. Best if QGIS could
provide both modes, with the current behaviour as an option and
defaulting to real table layout.

Maciek

--
Maciej Sieczka
www.sieczka.org

Maciek,

You used the '-v' switch which means: "Use raster values as categories
instead of unique sequence". Thus, it is normal that the output table
has only that many rows, as many unique cell values were there in the
input raster map. Multiple polygons are linked to the same table row (by
having the same category), so there are more polygons than rows in the
table indeed.

This make sense, thank you for clearing this out. I created a new
vector without the -v switch and it looks ok now.

cheers,
maning

--
|---------|----------------------------------------------------------|
| __.-._ |"Ohhh. Great warrior. Wars not make one great." -Yoda |
| '-._"7' |"Freedom is still the most radical idea of all" -N.Branden|
| /'.-c |Linux registered user #402901, http://counter.li.org/ |
| | /T |http://esambale.wikispaces.com|
| _)_/LI
|---------|----------------------------------------------------------|