gdal_pansharpen performs a pan-sharpening operation. It can create a "classic" output dataset (such as
GeoTIFF), or a VRT dataset describing the pan-sharpening operation.
More details can be found in the PansharpenedVRT section.
NOTE:
gdal_pansharpen is a Python utility, and is only available if GDAL Python bindings are available.
--help Show this help message and exit
--help-general
Gives a brief usage message for the generic GDAL commandline options and exit.
-of<format>
Select the output format. Starting with GDAL 2.3, if not specified, the format is guessed from the
extension (previously was GTiff). Use the short format name. VRT can also be used.
-b<band>
Select band band from the input spectral bands for output. Bands are numbered from 1 in the order
spectral bands are specified. Multiple -b switches may be used. When no -b switch is used, all
input spectral bands are set for output.
-w<weight_val>
Specify a weight for the computation of the pseudo panchromatic value. There must be as many -w
switches as input spectral bands.
-r{nearest|bilinear|cubic|cubicspline|lanczos|average}
Select a resampling algorithm. cubic is the default.
-threads{ALL_CPUS|<number>}
Specify number of threads to use to do the resampling and pan-sharpening itself. Can be an integer
number or ALL_CPUS.
-bitdepth<val>
Specify the bit depth of the panchromatic and spectral bands (e.g. 12). If not specified, the
NBITS metadata item from the panchromatic band will be used if it exists.
-nodata<val>
Specify nodata value for bands. Used for the resampling and pan-sharpening computation itself. If
not set, deduced from the input bands, provided they have a consistent setting.
-spat_adjust{union|intersection|none|nonewithoutwarning}
Select behavior when bands have not the same extent. See SpatialExtentAdjustment documentation in
PansharpenedVRTunion is the default.
-co<NAME>=<VALUE>
Many formats have one or more optional creation options that can be used to control particulars
about the file created. For instance, the GeoTIFF driver supports creation options to control
compression, and whether the file should be tiled.
The creation options available vary by format driver, and some simple formats have no creation
options at all. A list of options supported for a format can be listed with the --formats command
line option but the documentation for the format is the definitive source of information on driver
creation options. See Rasterdrivers format specific documentation for legal creation options for
each format.
-q Suppress progress monitor and other non-error output.
<pan_dataset>
Dataset with panchromatic band (first band will be used).
<spectral_dataset>[,band=<num>]
Dataset with one or several spectral bands. If the band option is not specified, all bands of the
datasets are taken into account. Otherwise, only the specified (num)th band. The same dataset can
be repeated several times.
<out_dataset>
Output dataset
Bands should be in the same projection.