[GRASS-user] zone statistics ?

Dylan Beaudette dylan.beaudette at gmail.com
Mon Jan 8 12:52:24 EST 2007


Hi Didrik,

On Monday 08 January 2007 05:29, Didrik Pinte wrote:
> Hi,
>
> Is it possible to get kind of zonal statistics in Grass ? I don't know
> if the term is the rigth one, but here is what I want to do.

I think that zonal statistics are usually defined in terms of

Univariate statistics computed from some source raster, within zones as 
defined by either raster or vector data. I do not think that having only 
vector data as input should be a problem.

> I have two vector layers. I want to update the first layer using
> information from the second layer.
>
> Ex.
> Layer_2 is a network of cells with an average pumping rate.

'network of cells' ?? what exactly does this mean? are these points, polygons?

> If cell_1 of layer_1 overlaps cell_2 and cell_3 in layer_2, I want the
> average pumping rate of cell_1 to be a spatial mean of the pumping rates
> of cell_2 and cell_3 according to their surface in cell1.

what is Layer_1 ? some sort of polygon boundary?

> Is it clear enough ?

not for me.

> I'm sure there is a pretty straigthforward way to do this in grass but I
> haven't found it.
>
> Thank you all in advance for the help.
>
> Didrik
>
> Ps : I'm running Grass 6.2.0 (Debian/Sid).

I the solution in GRASS is most likely a raster operation, so careful 
conversion with v.to.rast and r.to.vect might be required for at least one 
layer. Optionally, if your zones are defined with polygon data, and 
your 'data_to_be_summarized' are raster- then a program called 'starspan' may 
be of interest to you. 

Good luck,

Dylan


-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-user mailing list