[GRASS-user] calculating average value over a base map
Monica Buescu
monicabuescu1985 at gmail.com
Mon Feb 28 12:15:26 EST 2011
Hello Christian.
I believe I didn't quite understand what you have said but I think that is
not the way.
My basemap is a r.clump output in CELL format that ranges from 1 til 1700 or
something
my cover map is NDVI that ranges from -1 (near) til 1 (near) and is a FCELL.
My Objective. calculate for each clump, the average of NDVI pixels
If I do:
r.statistics -c base=new_clump cover=2007_ndvi method=average
I get:
ERROR: This module currently only works for integer (CELL) maps
Is there any alternative to do this?
Thank you Christian and the rest of grass mailing list
Monica
On Mon, Feb 28, 2011 at 5:08 PM, Christian Schwartze <
christian.schwartze at uni-jena.de> wrote:
> If you want to deal with raster value types other than CELL, you can use
> the –c flag in r.statistics in order to process the labels. Therfore, you
> have to copy your cat values to the category labels first...
>
> Regards,
> Christian.
> *From:* Monica Buescu <monicabuescu1985 at gmail.com>
> *Sent:* Monday, February 28, 2011 5:16 PM
> *To:* Christian Schwartze <christian.schwartze at uni-jena.de>
> *Cc:* GRASS user list <grass-user at lists.osgeo.org>
> *Subject:* Re: [GRASS-user] calculating average value over a base map
>
> Greetings Christian
>
> Unfortunely it only works with CELL values. For instance, r.median uses
> more than just CELL.
> Is there any other alternative? Beucase for mode and median there is
> specific functions.
>
> Thamls
>
> Best regards,
> Monica
>
> On Mon, Feb 28, 2011 at 3:55 PM, Christian Schwartze <
> christian.schwartze at uni-jena.de> wrote:
>
>> Monica,
>>
>> try to use r.statistics with the average function/method. Pass you maps
>> through the cover= and base= parameters...
>>
>> Christian.
>>
>> *From:* Monica Buescu <monicabuescu1985 at gmail.com>
>> *Sent:* Monday, February 28, 2011 4:27 PM
>> *To:* GRASS user list <grass-user at lists.osgeo.org>
>> *Subject:* [GRASS-user] calculating average value over a base map
>>
>> Greetings
>>
>> I have a map with values and a base map created with r.clump. How can I
>> calculate the average of values that falls inside each cluster defined by
>> r.clump?
>> Thanks
>>
>> Best regards,
>> Monica
>> ------------------------------
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110228/bbb32999/attachment.html
More information about the grass-user
mailing list