[GRASS-user] List of existing values

Nikos Dumakis nikosdu1980 at gmail.com
Tue Jul 20 11:25:29 EDT 2010


THanks Martin. It works
Just one last question. This is applying Shell Scripts right? Can I do the
same but with Python Scripts

On Tue, Jul 20, 2010 at 4:17 PM, Martin Landa <landa.martin at gmail.com>wrote:

> Hi,
>
> 2010/7/20 Nikos Dumakis <nikosdu1980 at gmail.com>:
> > 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).
>
> as mentioned in Hamish's response, use combination of `sort` and `uniq`
>
> r.starts -1 input=data | sort | uniq
>
> Martin
>
> --
> Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100720/a5b6f47a/attachment.html


More information about the grass-user mailing list