GDAL_PANSHARPEN(1) | GDAL | GDAL_PANSHARPEN(1) |
gdal_pansharpen - Perform a pansharpen operation.
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]
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 Pansharpened VRT section.
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 Raster drivers format specific documentation for legal creation options for each format.
Bands should be in the same projection.
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
Even Rouault <even.rouault@spatialys.com>
1998-2023
January 2, 2023 |