[GRASS-user] List of existing values

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Wed Jul 21 10:20:36 EDT 2010


Nikos Dumakis:
> > In my case I have not more than 1200 different cell values. If I do :
> > r.stats -1 input=data
> > I obtained a list of all pixel values but what I am lookinf is for the
> > unique values (not repeated).

Martin Landa wrote: 
> as mentioned in Hamish's response, use combination of `sort` and `uniq`
> 
> r.starts -1 input=data | sort | uniq

shorter:

r.starts -1 input=data | sort -u

Nikos


More information about the grass-user mailing list