[gdal-dev] How to overlay a raster with shapes to calc statistics?

Petteri Packalen packalen at cs.joensuu.fi
Mon Mar 19 01:44:03 EDT 2012


Look at:


Starspan is a command line tool that uses GDAL/OGR lib. This functionality 
is also available in many GIS packages with the name 'zonal statistics'.

Best regards,
Petteri Packalen

Petteri Packalén
Visiting Research Scientist
Department of Forest Engineering, Resources and Management
College of Forestry, Oregon State University
204 Peavy Hall, Corvallis, OR 97331-5704, USA
Office: Peavy 111
E-mail: Petteri.Packalen at uef.fi

On Sun, 18 Mar 2012, Andreas H. wrote:

> Hi all,
> I have a GeoTiff file covering the whole globe at approx. 1km
> resolution. And I have a shapefile containing say 20 of polygons.
> For each of the 20 polygons, I want to know the mean value of the raster
> data falling inside the polygon, and possibly more statistics (max, min,
> medeian, std, ...).
> How can I achieve this using GDAL?
> Thanks for your insight,
> Andreas.
> _______________________________________________
> 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