Hi,<br><br><div class="gmail_quote">2009/8/20 questions anon <span dir="ltr"><<a href="mailto:questions.anon@gmail.com">questions.anon@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<p>Can anyone get me started on a script that can - <br></p>
<p> -Open a shapefile</p>
<p> -Open many rasters</p>
<p> -Calculate the mean and standard deviation of those
rasters within the shapefile region, but is able to ignore areas of zeros or
NoData</p>
<p> -Output the mean and standard deviation to a table</p></blockquote><div>i've done a similar example to what you want here:<br>< <a href="http://sites.google.com/site/spatialpython/aggregating-data-to-grid-cells">http://sites.google.com/site/spatialpython/aggregating-data-to-grid-cells</a>><br>
Only difference is that I calculate the histogram, rather than just the mean and std dev. It is trivial to modify this for your own purposes. In fact, when I get some time, I'll throw in a full "zonal stats" class, but for now this should get you started.<br>
<br>J<br></div></div>