[gdal-dev] calculate raster values within a vector

Dylan Beaudette dylan.beaudette at gmail.com
Wed Aug 26 10:15:30 EDT 2009


Hi,

There is also a tool called Starspan than uses GDAL and GEOS to do
arbitrary zonal stats.

Dylan

On Wed, Aug 26, 2009 at 7:13 AM, Jose Gomez-Dans<jgomezdans at gmail.com> wrote:
> Hi,
>
> 2009/8/20 questions anon <questions.anon at gmail.com>
>>
>> Can anyone get me started on a script that can -
>>
>>  -Open a shapefile
>>
>>  -Open many rasters
>>
>>  -Calculate the mean and standard deviation of those rasters within the
>> shapefile region, but is able to ignore areas of zeros or NoData
>>
>>  -Output the mean and standard deviation to a table
>
> i've done a similar example to what you want here:
> < http://sites.google.com/site/spatialpython/aggregating-data-to-grid-cells>
> 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.
>
> J
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>


More information about the gdal-dev mailing list