GDAL_PANSHARPEN(1)
π GDAL_PANSHARPEN(1) β GDAL manual π
okay bestie, this is the GDAL manual page for gdal_pansharpen β the pan-sharpening one β and it's giving main character energy π
β¨ No cap, every flag and every detail is here, so you can stop scrolling fr fr.
π NAME π
gdal_pansharpen β perform a pansharpen operation. Periodt. π
β¨ SYNOPSIS β¨
gdal_pansharpen [--help-general] pan_dataset {spectral_dataset[,band=num]}+ out_dataset
[-of format] [-b band]* [-w weight_val]*
[-r {nearest,bilinear,cubic,cubicspline,lanczos,average}]
[-threads {ALL_CPUS|number}] [-bitdepth val] [-nodata val]
[-spat_adjust {union,intersection,none,nonewithoutwarning}]
[-co NAME=VALUE]* [-q]
π¦ DESCRIPTION π¦
The gdal_pansharpen.py script 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 gdal_vrttut_pansharpen section. iykyk π
π options & args, bestie π
-of <format>β select the output format. Starting with GDAL 2.3, if not specified, the format is guessed from the extension (previously wasGTiff). Use the short format name.VRTcan 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-bswitches may be used. When no-bswitch 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-wswitches as input spectral bands. π-r {nearest,bilinear,cubic (default),cubicspline,lanczos,average}β select a resampling algorithm. π-threads {ALL_CPUS,number}β specify number of threads to use to do the resampling and pan-sharpening itself. Can be an integer number orALL_CPUS. π₯-bitdepth <val>β specify the bit depth of the panchromatic and spectral bands (e.g.12). If not specified, theNBITSmetadata 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(default),intersection,none,nonewithoutwarning}β select behavior when bands have not the same extent. SeeSpatialExtentAdjustmentdocumentation ingdal_vrttut_pansharpen. π-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--formatscommand line option but the documentation for the format is the definitive source of information on driver creation options. Seeraster_driversformat specific documentation for legal creation options for each format. π-qβ Suppress progress monitor and other non-error output. π
π arguments π
<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. lowkey important, bestie πβ¨
πΈ EXAMPLE πΈ
With spectral bands in a single dataset :
gdal_pansharpen.py panchro.tif multispectral.tif pansharpened_out.tif
With a few spectral bands from a single dataset, reordered :
gdal_pansharpen.py panchro.tif multispectral.tif,band=3 multispectral.tif,band=2 multispectral.tif,band=1 pansharpened_out.tif
With spectral bands in several datasets :
gdal_pansharpen.py panchro.tif band1.tif band2.tif band3.tif pansharpened_out.tif
Specify weights:
gdal_pansharpen.py -w 0.7 -w 0.2 -w 0.1 panchro.tif multispectral.tif pansharpened_out.tif
Specify RGB bands from a RGBNir multispectral dataset while computing the pseudo panchromatic intensity on the 4 RGBNir bands:
gdal_pansharpen.py -b 1 -b 2 -b 3 panchro.tif rgbnir.tif pansharpened_out.tif
π AUTHOR π
Author bestie: Even Rouault <even.rouault@spatialys.com> π
π COPYRIGHT π
1998-2026 β that's the copyright range, bestie. π
okay that's the whole iconic page β from GDAL, dated Jan 08, 2026, GDAL_PANSHARPEN(1) out πβ¨
π¦ where this page comes from
- epel 9: gdal3.4 3.4.3-5.el9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms