comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » aggregate pixel values within shapes or another raster
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: aggregate pixel values within shapes or another raster [message #69512 is a reply to message #69391] Mon, 18 January 2010 00:06 Go to previous message
wita is currently offline  wita
Messages: 43
Registered: January 2005
Member
Dear Itiseva,

Have a look at: ftp://sc:image1@ftp.alterra.nl/pub/adewit/cgi_zonal_stats.pr o

It is basically as simple as:

result = cgi_zonal_stats(zones, data)

Results is a structure which contains the zone_id, mean, count, stdev
and median of the values in 'data' (each layer in your time-series)
for each unique zone in 'zones' (your 25km grid). A requirement is
that 'zones' and 'data' are on the same grid, so resample your 25km
grid to your 1km data grid.

The function leverages the power of HISTOGRAM module by looping over
the reverse indices returned by HISTOGRAM and is therefore maybe
faster then David's solution. Moreover, my routine can aggregate data
over arbitrary shaped zoned and not just within kernel.

My guess is that this is exactly what you need.

Hope this helps

Allard
[Message index]
 
Read Message
Read Message
Previous Topic: eMake Money Rs. 1000 per day
Next Topic: How can we pass Greek symbols and formula to IPLOT?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:24:27 PDT 2025

Total time taken to generate the page: 0.00454 seconds