[GRASS-user] ratio of pixel counts

Dylan Beaudette dylan.beaudette at gmail.com
Mon Nov 26 12:53:23 EST 2007


On Monday 26 November 2007, temiz wrote:
> hello
>
> I have a raster map with 1 and 0 categories.
> Is there any way to determine a region  in which ratio of pixel counts
> of these categories is 1:1
> ( without using trial error method ).
>
>
>
> kind regards

How are you defining this region? How about creating a grid of 'regions', and 
computing raster stats within each grid cell. 

v.mkgrid
v.what.rast

you might have to do this in two passes, and then compute the percentage. Or 
there might be a way to do this with r.neighbors method=diversity

??

Cheers,

Dylan

-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341


More information about the grass-user mailing list