geo-registry

gdal raster zonal-stats

How GDAL runs Zonal statistics: gdal raster zonal-stats.

About this implementation
Engine GDAL
Tool name gdal raster zonal-stats
Interface cli
Implements Zonal statistics
Documentation https://gdal.org/programs/gdal_raster_zonal_stats.html
Effects modifies input: no, network: no
Notes Not stated
Status active

Parameters

Name Type Required Default Choices Note
input-format string_list no Not stated Not stated Not stated
open-option string_list no Not stated Not stated Not stated
input dataset_list yes Not stated Not stated raster dataset
output-format string no Not stated Not stated Not stated
output-open-option string_list no Not stated Not stated Not stated
creation-option string_list no Not stated Not stated Not stated
layer-creation-option string_list no Not stated Not stated Not stated
overwrite boolean no no Not stated Not stated
update boolean no no Not stated Not stated
overwrite-layer boolean no no Not stated Not stated
append boolean no no Not stated exclusive group append-upsert
upsert boolean no Not stated Not stated exclusive group append-upsert
output-layer string no Not stated Not stated Not stated
skip-errors boolean no Not stated Not stated Not stated
band integer_list no Not stated Not stated Not stated
zones dataset yes Not stated Not stated raster or vector or multidim_raster dataset
zones-band integer no Not stated Not stated exclusive group BAND_OR_LAYER
zones-layer string no Not stated Not stated exclusive group BAND_OR_LAYER
weights dataset no Not stated Not stated raster or vector or multidim_raster dataset
weights-band integer no 1 Not stated Not stated
pixels string no Not stated default, fractional, all-touched Not stated
stat string_list yes Not stated center_x, center_y, count, coverage, frac, max, max_center_x, max_center_y, mean, median, min, minority, min_center_x, min_center_y, mode, stdev, sum, unique, values, variance, variety, weighted_mean, weighted_stdev, weighted_sum, weighted_variance, weights at least 1.0
include-field string_list no Not stated Not stated Not stated
include-geom boolean no Not stated Not stated Not stated
strategy string no feature feature, raster Not stated
chunk-size string no 5% Not stated Not stated
output dataset yes Not stated Not stated input and output; vector dataset

How it maps to the operation

Operation parameter Parameter here Note
raster input Not stated
zones zones Not stated
output output Not stated
stats stat count = count; mean = mean; min = min; max = max; sum = sum; std = stdev
band band Not stated
all_touched pixels true = all-touched; false = default

Differences from the operation

  • Also offers fractional cell coverage (pixels fractional) and weighted statistics.

Harvested by the gdal harvester from engine version 3.13.3. Names can change when an engine is harvested again.