1GDAL_PANSHARPEN(1)                   GDAL                   GDAL_PANSHARPEN(1)
2
3
4

NAME

6       gdal_pansharpen -  Perform a pansharpen operation.
7

SYNOPSIS

9          gdal_pansharpen [--help-general] pan_dataset {spectral_dataset[,band=num]}+ out_dataset
10                          [-of format] [-b band]* [-w weight_val]*
11                          [-r {nearest,bilinear,cubic,cubicspline,lanczos,average}]
12                          [-threads {ALL_CPUS|number}] [-bitdepth val] [-nodata val]
13                          [-spat_adjust {union,intersection,none,nonewithoutwarning}]
14                          [-co NAME=VALUE]* [-q]
15

DESCRIPTION

17       The  gdal_pansharpen.py  script performs a pan-sharpening operation. It
18       can create a "classic" output dataset  (such  as  GeoTIFF),  or  a  VRT
19       dataset describing the pan-sharpening operation.
20
21       More details can be found in the Pansharpened VRT section.
22
23       -of <format>:
24              Select  the output format. Starting with GDAL 2.3, if not speci‐
25              fied, the format is guessed from the extension  (previously  was
26              GTiff). Use the short format name. VRT can also be used.
27
28       -b <band>
29              Select band band from the input spectral bands for output. Bands
30              are numbered from 1 in the order spectral bands  are  specified.
31              Multiple -b switches may be used. When no -b switch is used, all
32              input spectral bands are set for output.
33
34       -w <weight_val>
35              Specify a weight for the computation of the pseudo  panchromatic
36              value.  There  must  be  as  many  -w switches as input spectral
37              bands.
38
39       -r {nearest,bilinear,cubic (default),cubicspline,lanczos,average}
40              Select a resampling algorithm.
41
42       -threads {ALL_CPUS,number}
43              Specify number of threads  to  use  to  do  the  resampling  and
44              pan-sharpening itself. Can be an integer number or ALL_CPUS.
45
46       -bitdepth <val>
47              Specify  the  bit  depth  of the panchromatic and spectral bands
48              (e.g.  12). If not specified, the NBITS metadata item  from  the
49              panchromatic band will be used if it exists.
50
51       -nodata <val>
52              Specify  nodata  value  for  bands.  Used for the resampling and
53              pan-sharpening computation itself. If not set, deduced from  the
54              input bands, provided they have a consistent setting.
55
56       -spat_adjust {union(default),intersection,none,nonewithoutwarning}
57              Select  behavior  when  bands have not the same extent. See Spa‐
58              tialExtentAdjustment documentation in Pansharpened VRT
59
60       -co <NAME=VALUE>
61              Many formats have one or more optional creation options that can
62              be  used  to control particulars about the file created. For in‐
63              stance, the GeoTIFF driver supports creation options to  control
64              compression, and whether the file should be tiled.
65
66              The  creation  options available vary by format driver, and some
67              simple formats have no creation options at all. A  list  of  op‐
68              tions  supported  for  a format can be listed with the --formats
69              command line option but the documentation for the format is  the
70              definitive  source  of  information  on driver creation options.
71              See Raster drivers format specific documentation for legal  cre‐
72              ation options for each format.
73
74       -q     Suppress progress monitor and other non-error output.
75
76       <pan_dataset>
77              Dataset with panchromatic band (first band will be used).
78
79       <spectral_dataset>[,band=num]
80              Dataset  with  one or several spectral bands. If the band option
81              is not specified, all bands of the datasets are taken  into  ac‐
82              count.   Otherwise,  only  the  specified (num)th band. The same
83              dataset can be repeated several times.
84
85       <out_dataset>
86              Output dataset
87
88       Bands should be in the same projection.
89

EXAMPLE

91       With spectral bands in a single dataset :
92
93          gdal_pansharpen.py panchro.tif multispectral.tif pansharpened_out.tif
94
95       With a few spectral bands from a single dataset, reordered :
96
97          gdal_pansharpen.py panchro.tif multispectral.tif,band=3 multispectral.tif,band=2 multispectral.tif,band=1 pansharpened_out.tif
98
99       With spectral bands in several datasets :
100
101          gdal_pansharpen.py panchro.tif band1.tif band2.tif band3.tif pansharpened_out.tif
102
103       Specify weights:
104
105          gdal_pansharpen.py -w 0.7 -w 0.2 -w 0.1 panchro.tif multispectral.tif pansharpened_out.tif
106
107       Specify RGB bands from a RGBNir multispectral dataset  while  computing
108       the pseudo panchromatic intensity on the 4 RGBNir bands:
109
110          gdal_pansharpen.py -b 1 -b 2 -b 3 panchro.tif rgbnir.tif pansharpened_out.tif
111

AUTHOR

113       Even Rouault <even.rouault@spatialys.com>
114
116       1998-2023
117
118
119
120
121                                 Oct 30, 2023               GDAL_PANSHARPEN(1)
Impressum