Re: aggregate pixel values within shapes or another raster [message #69390] |
Thu, 14 January 2010 05:57 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Eva writes:
> I have a time series of images (yearly data) on 1km spatial resolution
> and I have a systematic grid in an ArcGIS shapefile format or a ArcGIS
> grid format or envi BIL format, whatever suits best that has a 25km
> spatial resolution. I need to calculate the mean and standard
> deviation of all pixels within 1 grid zone, for all years and write
> them out in a new image. Thus, in case of 26 input years on 1km
> spatial resolution I need to have 26 output images on 25km spatial
> resolution, where in each 25km cell the mean and/or the standard
> deviation of the 1km cells within the respective grid is written.
> Besdies opening and reading the files (at least that I have no
> problems with) any clue please how to start it?
You might be interested in this article on how to
calculate the local standard variance of an image
without using loops. The local mean value can
optionally be returned, too.
http://www.dfanning.com/math_tips/variance.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|