Zonal statistics using Python and RSGISLib

Calculating statistics from pixels falling within zones is a common task in remote sensing. The script below uses the zonal statistics function within RSGISLib to extract statistics from all bands in an input raster and save as either a CSV of Shapefile.

Most of the script deals with obtaining the input parameters, the actual zonal stats is calculated using the pixelStats2TXT or pixelStats2SHP function.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s