Galaxy | Tool Preview

zonal statistics (version 0.2.0)

Plot statistics

This tool wraps the functionality of zonal-statistics.py.

The wrapper aims at providing a utility to extract information from geospatial raster data based on vector geometries (shapefile). The raster input file must be in netCDF format with geographical coordinates (latitudes, longitudes) with the same coordinate reference system as the shapefile.

What it does

This tools creates a png image showing statistic over areas as defined in the vector file.

Usage

usage: zonal-statistics.py [-h] [-v] [-t] raster vector variable output

Positional arguments:

  • raster: input raster filename with geographical coordinates (netCDF format)
  • vector: input shapefile filename with polygons
  • variable: variable used from raster file to compute statistics
  • output: output filename for png file containing the resulting plot.

Optional arguments:

-h, --help show this help message and exit
-v, --verbose switch on verbose mode
-t, --type statistic type [min, max, mean, count]

It uses rasterstats python package to compute zonal statistics. More information about rasterstats can be found at https://pythonhosted.org/rasterstats