[GRASS-dev] Some v.db.addtable and [v.]category confusion

Martin Landa landa.martin at gmail.com
Mon May 21 08:01:19 EDT 2007


Markus,

2007/5/18, Markus Neteler <neteler at itc.it>:

[snip]

> # Spearfish
> g.copy vect=fields,myfields
> v.db.addtable myfields layer=2 col="polynum integer"
> v.category myfields op=report layer=2
> LAYER/TABLE 1/myfields:
> type       count        min        max
> point          0          0          0
> line           0          0          0
> boundary       0          0          0
> centroid      63          1         63
> area           0          0          0
> all           63          1         63
>
> -> it's not clear from this output that it is only layer 1!!
> (try: v.category myfields op=report layer=33
>  which gives the same result)

yes, the option 'report'  in contrast to the other options (like
'print') is not influenced by 'layer' option. Maybe it is confusing
for the user and should be changed (?).

> So: in reality there aren't any categories yet on layer 2.
> v.category myfields out=myfields_new op=add layer=2
> v.db.select myfields_new layer=2
> cat|polynum
>
> Nothing again. I think that there should be a row for each
> vector now but it isn't. Due to that I cannot use v.db.update
> on it to insert new polynum values.
>

this should work

v.category in=fields out=myfields lay=2 opt=add;
v.db.addtable myfields layer=2 col="polynum integer";
v.db.select myfields_new layer=2

Martin

>
> Markus
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>


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




More information about the grass-dev mailing list