LinuxCommandLibrary

gdalsummary

Summarize GDAL dataset information

SYNOPSIS

gdalsummary [-q] [-co "NAME=VALUE"]* [-outdir directory] infile [infile]*

PARAMETERS

-q
    Quiet mode: Suppress progress messages and statistics printed to stdout.

-co "NAME=VALUE"
    Creation options for output files (format-specific, passed to GDAL drivers).

-outdir directory
    Output directory for HTML reports (default: current directory).

DESCRIPTION

The gdalsummary command is a GDAL utility that creates comprehensive HTML reports summarizing statistics and visualizations for one or more raster files. For a single input file, it produces statistics (min, max, mean, standard deviation), histograms, and contour plots for each band. When multiple files are provided, it generates a master index.html with a table comparing statistics across files, plus scatterplots illustrating correlations between corresponding bands.

This tool is particularly useful for quick quality assessment, data exploration, and comparison of geospatial raster datasets like satellite imagery or DEMs. Output files include a main index.html and per-dataset HTML files (e.g., dataset_001.html) containing detailed plots. All visualizations rely on embedded images generated via matplotlib.

Usage is straightforward for GDAL users, but requires a Python environment with GDAL bindings, NumPy, and Matplotlib. It processes files in-place without modification, focusing solely on analysis and reporting.

CAVEATS

Requires Python with GDAL, NumPy, and Matplotlib; generates plots only if libraries available. Output is always HTML. Deprecated in newer GDAL versions for interactive tools like QGIS.

OUTPUT FILES

Creates index.html (overview) and dataset_<num>.html (per-file details) with embedded stats, histograms, contours, and scatterplots.

EXAMPLE USAGE

gdalsummary -outdir /tmp/reports image1.tif image2.tif
Generates reports in /tmp/reports comparing two rasters.

HISTORY

Introduced in GDAL 1.4 (2007) as an experimental Python script for raster analysis visualization. Evolved with GDAL releases, but less maintained post-GDAL 2.x in favor of GUI tools.

SEE ALSO

Copied to clipboard