[GRASS-user] occurrence of attributes in vektortable

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Fri Mar 7 09:35:17 EST 2008


On Fri, 2008-03-07 at 08:55 -0500, Patton, Eric wrote:
> On Fri, 2008-03-07 at 07:17 -0500, Patton, Eric wrote:
> >>>how can i get a list of all different occurences in a column of an 
> >>>attributetable.
> >> 
> >> v.db.select map=mapname column=columnname | uniq (for vector with a connected attribute table)
> >>
> 
> >It doesn't work for me. What am I doing wrong?
> 
> Omit the -u flag from uniq.

Hmmm? I tried but... :

v.db.select map=TrainingSamples column=clccode_le | uniq
clccode_le
3
334
3
332
334
3
334
332
334
2
334
5
3
5
131
1
131
332
131
1
332
3
332
1
332
2
332
2
> 
> >Do the "map" and "column" parameters exist for db.select?
> 
> Whoops; my mistake. No, those parameters don't exist for db.select.
> db.select uses table= instead of map=.
> 
> There also isn't a column parameter, so you'd have to use some SQL 
> commands to get the column you need. 
> 
> Note you can omit the column heading name in the output in both db.select and v.db.select 
> by using the -c flag:

Ahh... ok! thanks Eric!
> 
> db.select -c table=Matthew_2005013_Navigation | head -10
> 1|1860029|636162.13|5156960.89
> 2|186002910|636194.64|5157012.42
> 3|186002920|636229.43|5157064.57
> 4|186002930|636263.7|5157116.26
> 5|186002940|636297.62|5157169.61
> ...
> 
> ~ Eric.
> 
> 
> 
> 
> db.select table=TABLE 
> 
> 
> > 
> > ~ Eric.
> 
> Nikos
> 
> 



More information about the grass-user mailing list