PAN_SHARPEN

The PAN_SHARPEN command fuses a lower resolution color/multi-band image with a higher resolution panchromatic (grayscale) image to create a new color/multi-band image at the same detail as the pan image. This is often used with satellite-based imagery with a pan sensor at double the resolution as the color/multi-spectral sensor. The result is a new color/multi-band layer. In addition, all of the option parameters for the IMPORT command are also supported for this command.

The following parameters are used by the PAN_SHARPEN command:

  • COLOR_LAYER - full path and filename of the color/multi-band layer to pan sharpen. You can also pass in the full description of the loaded layer to use in case you want to use a layer not loaded from a file.
  • PAN_LAYER - full path and filename of the panchromatic layer to use. You can also pass in the full description of the loaded layer to use in case you want to use a layer not loaded from a file.
  • LAYER_DESC - description to use for the new layer. If not provided, the description will be that of the color layer with (Pan Sharpened) appended.
  • ALGORITHM - specifies which pan sharpening algorithm will be used to perform the operation. The following values are supported:
    • IHS - converts the color to the HSI (hue/saturation/intensity) colorspace, then replaces the intensity with the pan value. This is the default value.
    • BROVEY - uses the Brovey algorithm
    • ESRI - uses the Ersi pan sharpening transformation
    • MEAN - uses a simple mean (average) of the pan value and each band for the new band value
  • WEIGHTS - provides a list of weight values to apply to each band in the color image. This should be a comma-delimited list of 3 (RGB) or 4 (RGBI) weights to apply. The weight order is red, green, blue, infrared. If not provided, each band will be equally weighted when calculating an initial intensity for the IHS and BROVEY algorithms. The ESRI algorithm uses a default weighting of "0.167,0.167,0.167,0.5" (i.e. half to infrared and equally divided amongst the rest). The weight values will automatically be normalized so they sum up to 1 for all used bands, so if you want to weight green at twice the other bands, you could use WEIGHTS="1,2,1,1".
  • SPATIAL_RES - specifies spatial resolution. Defaults to the minimum spatial resolution of the two layers if not specified. Should be formatted as x_resolution,y_resolution. The units are the units of the current global projection. For example, if UTM was the current global projection and you wanted to export at 30 meter spacing, the parameter/ value pair would look like SPATIAL_RES=30.0,30.0. You can also specify as a percentage of the default resolution by adding a percent. For example to get half the detail your double the spatial resolution value, so you would use SPATIAL_RES="200%,200%".
  • SPATIAL_RES_METERS - specifies spatial resolution to use in meters. The value in meters will automatically be converted to the curent view/export projection units. For example, to do an export at 2.0 meter spacing (or as close as you can get to that in the current units), use SPATIAL_RES_METERS=2.0, or to do an export at 1.0 meters in X by 1.5 meters in Y, use SPATIAL_RES_METERS="1.0,1.5".

SAMPLE

Example: Create a pan sharpened layer from 2 loaded 16-bit images:

 
// Define variables with filename for color and pan layers
DEFINE_VAR NAME="COLOR_FNAME" VALUE="LC80330322015307LGN00_B4325_RGBI"
DEFINE_VAR NAME="PAN_FNAME" VALUE="LC80330322015307LGN00_B8_PAN.TIF"
// Load color and pan layers
IMPORT FILENAME="%COLOR_FNAME%" TRANSPARENT_COLOR="RGB(255,255,255)" \
 AUTO_CONTRAST="YES" CONTRAST_SHARED="NO" CONTRAST_STRETCH_SIZE="2.000" CONTRAST_MODE="PERCENTAGE"
IMPORT FILENAME="%PAN_FNAME%" LOAD_FLAGS="0~0~0~1~0~0" TRANSPARENT_COLOR="RGB(0,0,0)" \
 AUTO_CONTRAST="YES" CONTRAST_SHARED="NO" CONTRAST_STRETCH_SIZE="0.000" CONTRAST_MODE="PERCENTAGE"
// Pan Sharpen images
PAN_SHARPEN COLOR_LAYER="%COLOR_FNAME%" PAN_LAYER="%PAN_FNAME%" ALGORITHM="BROVEY"