[SciPy-User] mask array by shapefile
questions anon
questions.anon at gmail.com
Wed Nov 2 22:25:37 EDT 2011
Hi All,
Is there a way to select only the values within a particular shapefile to
analyse.
I would like to do something like:
array=numpyarraycoveringtemperatureofwholestate
shapefile=forestedregions.shp
newarray=ma.masked_values(array, shapefile)
meantemperatureofforestedregions=MA.mean(newarray)
print meantemperatureofforestedregions
Any ideas of functions I could use, examples I could follow?
thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20111103/5888a21c/attachment.html>
More information about the SciPy-User
mailing list