oty sharpen¶
Increases the resolution of a multispectral image to that of a panchromatic image using the Gram-Schmidt pan-sharpening method.
Panchromatic and multispectral image bounds should overlap if they are georeferenced. If one or both of the images are not georeferenced, they are assumed to having matching bounds.
Panchromatic and multispectral images are specified with --pan
and --multispectral, and the pan-sharpened output
with --out-file:
oty sharpen --pan pan.tif --multispectral ms.tif --out-file pan_sharp.tif
A subset of multispectral bands for sharpening can be specified with --ms-index:
oty sharpen -mi 3 -mi 2 -mi 1 --pan pan.tif --multispectral ms.tif --out-file pan_sharp.tif
Multispectral to panchromatic weights are estimated from the images by default. User values
can be provided with --weight. There should be as many
weights as multispectral bands:
oty sharpen -mi 3 -mi 2 -mi 1 -w 0.4 -w 0.5 -w 0.3 --pan pan.tif --multispectral ms.tif --out-file pan_sharp.tif
Usage
oty sharpen [OPTIONS]
Options
- -p, --pan <pan_file>¶
Required Path / URI of the panchromatic image.
- -ms, --multispectral <ms_file>¶
Required Path / URI of the multispectral image.
- -of, --out-file <out_file>¶
Required Path / URI of the pan-sharpened image.
- -pi, --pan-index <pan_index>¶
Index of the panchromatic band to use (1 based).
- Default:
1
- -mi, --ms-index <ms_indexes>¶
Indexes of the multispectral bands to use (1 based).
- Default:
'all non-alpha bands'
- -w, --weight <weights>¶
Multispectral to panchromatic weights (≥0).
- Default:
'auto'
- -i, --interp <interp>¶
Interpolation method for upsampling the multispectral image.
- Default:
cubic- Options:
nearest | average | bilinear | cubic | lanczos
- -wm, --write-mask, -nwm, --no-write-mask¶
Mask valid pixels with an internal mask (
--write-mask), or with a nodata value based on--dtype(--no-write-mask). An internal mask helps remove nodata noise caused by lossy compression.- Default:
'true for jpeg compression.'
- -dt, --dtype <dtype>¶
Pan-sharpened image data type.
- Default:
'source image data type.'- Options:
uint8 | uint16 | int16 | float32 | float64
- -cm, --compress <compress>¶
Pan-sharpened image compression.
- Default:
'jpeg for uint8 --dtype, deflate otherwise'- Options:
jpeg | deflate | lzw
- -bo, --build-ovw, -nbo, --no-build-ovw¶
Build overviews for the pan-sharpened image.
- Default:
True
- -co, --creation-option <NAME=VALUE>¶
Creation option(s) for the pan-sharpened image. If supplied,
--compressis ignored. See the GDAL docs for details.- Default:
'auto'
- -dv, --driver <driver>¶
Pan-sharpened image driver.
- Default:
gtiff- Options:
gtiff | cog
- -o, --overwrite¶
Overwrite existing output(s).
- Default:
False
See https://orthority.readthedocs.io/ for more detail.