Create Pan-Sharpened Raster Dataset (Data Management)

Summary

Fuses a high-resolution panchromatic raster dataset with a lower-resolution multiband raster dataset to create a red-green-blue (RGB) raster with the resolution of the panchromatic raster.

Learn about panchromatic sharpening

Usage

Syntax

CreatePansharpenedRasterDataset_management (in_raster, {red_channel}, {green_channel}, {blue_channel}, {infrared_channel}, out_raster_dataset, in_panchromatic_image, pansharpening_type, {red_weight}, {green_weight}, {blue_weight}, {infrared_weight})
ParameterExplanationData Type
in_raster

The input raster dataset that you want to pan-sharpen.

Typically, this is a low-resolution multiband raster dataset.

Raster Layer
red_channel
(Optional)

The input raster band that you want to display with the red color gun.

Long
green_channel
(Optional)

The input raster band that you want to display with the green color gun.

Long
blue_channel
(Optional)

The input raster band that you want to display with the blue color gun.

Long
infrared_channel
(Optional)

The input infrared raster band. An infrared band does not exist for every raster dataset.

Long
out_raster_dataset

The output raster dataset.

When storing the raster dataset in a file format, you need to specify the file extension:

  • .bil—ESRI BIL
  • .bip—ESRI BIP
  • .bmp—BMP
  • .bsq—ESRI BSQ
  • .dat—ENVI DAT
  • .gif—GIF
  • .img—ERDAS IMAGINE file
  • .jpg—JPEG
  • .jp2—JPEG 2000
  • .png—PNG
  • .tif—TIFF
  • no extension—ESRI GRID

When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset.

When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a compression type and compression quality.

Raster Dataset
in_panchromatic_image

The panchromatic raster dataset. Typically, this is a high-resolution grayscale image.

Raster Dataset
pansharpening_type

The pan-sharpening method:

  • IHSUses Intensity, Hue, and Saturation color space for data fusion.
  • BroveyUses the Brovey algorithm based on spectral modeling for data fusion.
  • ESRIUses the ESRI algorithm based on spectral modeling for data fusion.
  • Simple_MeanUses the averaged value between the red, green, and blue values and the panchromatic pixel value.
LegacyLegacy:

Older scripts and models may use still the old keyword. With the ArcGIS 10.0 release, this keyword was replaced with "Simple_Mean". Both keywords will continue to work, but for clarity it may be worthwhile to update it to the new keyword.

String
red_weight
(Optional)

The weight value for the red band.

All the weight values (red, green, blue, and infrared) should equal a sum of one.

Double
green_weight
(Optional)

The weight value for the green band.

All the weight values (red, green, blue, and infrared) should equal a sum of one.

Double
blue_weight
(Optional)

The weight value for the blue band.

All the weight values (red, green, blue, and infrared) should equal a sum of one.

Double
infrared_weight
(Optional)

The weight value for the infrared band. This parameter is only valid if an infrared band exists and the infrared option is used.

All the weight values (red, green, blue, and infrared) should equal a sum of one.

Double

Code Sample

CreatePansharpenedRasterDataset example 1 (Python window)

This is a Python sample for the CreatePansharpenedRasterDataset tool.

import arcpy
arcpy.CreatePansharpenedRasterDataset_management("c:/data/rgba.img","3","2","1",
                                                 "4","output\\rgba_pan.tif",
                                                 "pan4.img","ESRI","0.16",
                                                 "0.16","0.16","0.52")
CreatePansharpenedRasterDataset example 2 (stand-alone script)

This is a Python script sample for the CreatePansharpenedRasterDataset tool.

##====================================
##Create Pan-sharpened Raster Dataset
##Usage: CreatePansharpenedRasterDataset in_raster red_channel green_channel blue_channel {infrared_channel} 
##                                       out_raster_dataset in_panchromatic_image ESRI | IHS | Brovey | 
##                                       Simple_Mean {red_weight} {green_weight} {blue_weight} {infrared_weight}
try:
    import arcpy
    arcpy.env.workspace = r"\\MyMachine\PrjWorkspace\RasGP"
    ##3 Band RGB Pansharpen with Brovey algorithm
    arcpy.CreatePansharpenedRasterDataset_management("rgb.img","3","2","1","1","output\\rgb_pan.img","pan.img","Brovey")
    ##4 Band Infrared Image Pansharpen with Customized ESRI algorithm
    arcpy.CreatePansharpenedRasterDataset_management("rgba.img","3","2","1","4","output\\rgba_pan.tif","pan4.img","ESRI","0.16","0.16","0.16","0.52")
except:
    print "Create Pan-sharpened Raster Dataset example failed."
    print arcpy.GetMessages()

Environments

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

10/27/2014