Hi, you can use GDAL Python bindigs for this [0, 1]. The process may look as open shape and raster, then convert pixel coordinates into map (shape) coordinates and process only pixels inside your polygon.
[0] http://gdal.org/gdal_tutorial.html [1] http://gdal.org/ogr/ogr_apitut.html 2012/6/19 jdmorgan <[email protected]>: > Hello, > > Is there a way to do something along the lines of zonal statistics with > gdal. Basically, I have a county shape file and a classified raster > dataset. I would like to count the number of raster pixels/county (FIPS). > Is this possible with GDAL/OGR? If so can someone point me in the right > direction? If so, awesome as I plan to do some automation with python. > > Thanks, > > Derek Hope this helps -- Alexander Bruy _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
