pansharpen

Luo_Suppe2026-08-15

gma.etools.pansharpen

function pansharpen(in_pan, in_multi, out_dst, resample = "Cubic", spat_adjust = "Union", bands = None, threads = None, bit_depth = None, **kwargs):

Fusion of panchromatic and multispectral images based on Pansharpen method.

Parameters:

in_pan: str.

The panchromatic image path.

in_multi: str.

The multispectral image path.

out_dst: str.

The output raster file path.

Optional:

resample: str. Default 'Cubic'.

Resampling method. Supported resampling methods include: 'Nearest', 'Bilinear', 'Cubic', 'CubicSpline', 'Lanczos', 'Average'.

spat_adjust: str. Default 'Union'.

Space coordinate system adjustment. Supported adjustments methods include: 'Union', 'Intersection', 'None', 'NoneWithoutWarning'.

bands = list. Default None.

List of fused multispectral bands. For example [1,2...], the band count starts at 1.

The default is to fuse all bands of the input multispectral data (None).

***The weight value ('weights') for each band is the same, determined by the number of Bands, which is 1 / len(Bands).

threads = int||'ALL_CPUS'||None. Default None.

The number of threads that converge on the computer's CPU. Multithreading is not used by default (None).

bit_depth = int. Default None.

The amount of information used to represent each pixel or sample.

**kwargs:

Other parameters passed to translate.

Returns:

Type: DataSet.


Last Updated 8/15/2026, 8:42:21 AM