Resample Library Spectra (Image Analyst)

Available with Image Analyst license.

Summary

Resamples the bands of a spectral library to match the bands of a target spectral library or image, producing a new spectral library file. The target spectral library or image can be predefined from a list of common sensors, or it can be based on a custom image or spectra.

Usage

  • The Output Library Spectra parameter value will be a spectra with the same number of bands and wavelength range as the Target sensor parameter value.

  • The operation is performed on bands with overlapping wavelengths. If the input has a greater range than the target, the excess bands will be discarded. If the target has a greater range than the input, the bands outside of the input range will not be included and will be designated with a negative value that can be defined as NoData.

  • For the Resampling Method parameter's Band averaging option, an input band will be included in the calculation based on whether its center wavelength falls within the target band’s minimum and maximum wavelength range.

  • For the Resampling Method parameter's Gaussian convolution option, whether an input band will be included in the calculation is based on whether its center wavelength falls within the target’s center wavelength ± 3σ as follows:

    Gaussian Convolution

    where FWHM = WavelengthMax – WavelengthMin.

Parameters

LabelExplanationData Type
Input Library Spectra

An Esri spectral library or ENVI spectral library file with wavelength information.

File; String
Output Library Spectra

The output Esri spectral library file with the resampled wavelength information.

File
Target sensor

Specifies the target spectra, or a custom spectra library file or image, that contains the target spectra.

  • Landsat 9The target spectra will be Landsat 9 satellite data with 7 bands.
  • Landsat 8The target spectra will be Landsat 8 satellite data with 7 bands.
  • Landsat 7 (No thermal)The target spectra will be Landsat 7 satellite data with 6 bands.
  • Landsat 5 (No thermal)The target spectra will be Landsat 5 satellite data with 6 bands.
  • Landsat 4 (No thermal)The target spectra will be Landsat 4 satellite data with 6 bands.
  • Sentinel-3The target spectra will be Sentinel-3 satellite data with 21 bands.
  • Sentinel-2AThe target spectra will be Sentinel-2A satellite data with 13 bands.
  • Sentinel-2BThe target spectra will be Sentinel-2B satellite data with 13 bands.
  • ASTER bands 1-9The target spectra will be ASTER satellite data with 10 bands.
  • Custom target image or spectraA custom spectral library file or image that contains the target spectra will be used. This is the default.
String
Custom Target Image or Spectra
(Optional)

A custom spectral library file or image with wavelength information that contains the target spectra.

This parameter is enabled when the Target sensor parameter value is Custom target image or spectra.

Raster Dataset; Mosaic Dataset; Mosaic Layer; Raster Layer; File; Image Service; String
Resampling Method
(Optional)

Specifies the resampling method that will be used for the Output Library Spectra parameter value.

  • Band averagingA simple average of the input spectra based on all band values that fall within each target band’s wavelength range will be used. This is the default.
  • Gaussian convolutionA Gaussian model will be used to represent the spectral response function of the sensor, and the input band values will be weighted for each wavelength range.
String

ResampleLibrarySpectra(in_library_spectra, out_library_spectra, target_sensor, {custom_target_image_or_spectra}, {resampling_method})
NameExplanationData Type
in_library_spectra

An Esri spectral library or ENVI spectral library file with wavelength information.

File; String
out_library_spectra

The output Esri spectral library file with the resampled wavelength information.

File
target_sensor

Specifies the target spectra, or a custom spectra library file or image, that contains the target spectra.

  • LANDSAT-9The target spectra will be Landsat 9 satellite data with 7 bands.
  • LANDSAT-8The target spectra will be Landsat 8 satellite data with 7 bands.
  • LANDSAT-7_NO_THERMALThe target spectra will be Landsat 7 satellite data with 6 bands.
  • LANDSAT-5_NO_THERMALThe target spectra will be Landsat 5 satellite data with 6 bands.
  • LANDSAT-4_NO_THERMALThe target spectra will be Landsat 4 satellite data with 6 bands.
  • SENTINEL-3The target spectra will be Sentinel-3 satellite data with 21 bands.
  • SENTINEL-2AThe target spectra will be Sentinel-2A satellite data with 13 bands.
  • SENTINEL-2BThe target spectra will be Sentinel-2B satellite data with 13 bands.
  • ASTER_BANDS_1_TO_9The target spectra will be ASTER satellite data with 10 bands.
  • CUSTOM_TARGET_IMAGE_OR_SPECTRAA custom spectral library file or image that contains the target spectra will be used. This is the default.
String
custom_target_image_or_spectra
(Optional)

A custom spectral library file or image with wavelength information that contains the target spectra.

This parameter is active when the target_sensor parameter value is CUSTOM_TARGET_IMAGE_OR_SPECTRA.

Raster Dataset; Mosaic Dataset; Mosaic Layer; Raster Layer; File; Image Service; String
resampling_method
(Optional)

Specifies the resampling method that will be used for the out_library_spectra parameter value.

  • BAND_AVERAGINGA simple average of the input spectra based on all band values that fall within each target band’s wavelength range will be used. This is the default.
  • GAUSSIAN_CONVOLUTIONA Gaussian model will be used to represent the spectral response function of the sensor, and the input band values will be weighted for each wavelength range.
String

Code sample

ResampleLibrarySpectra example 1 (Python window)

This example uses the LANDSAT-8 option for the target_spectra parameter.

# Import system modules 
import arcpy 
from arcpy.ia import *
# Check out the ArcGIS Image Analyst extension license arcpy.CheckOutExtension("ImageAnalyst")
# Execute
arcpy.ia.ResampleLibrarySpectra(r“c:\library\aspen.esl”, r”C:\library\aspen_resampled.esl, “LANDSAT-8”, “BAND_AVERAGING”)
ResampleLibrarySpectra example 2 (stand-alone script)

This example uses the CUSTOM_TARGET_IMAGE_OR_SPECTRA option for the target_spectra parameter.

# Import system modules 
import arcpy 
from arcpy.ia import *

# Check out the ArcGIS Image Analyst extension license arcpy.CheckOutExtension("ImageAnalyst") # Execute
#Define variables

input_library = r“c:\library\hematite.sli”
out_library = r”c:\library\hematite_resampled.esl”
target_sensor = “CUSTOM_TARGET_IMAGE_OR_SPECTRA”
custom_target_image_or_spectra= r”c\image\landsat_7_bands.tif”
method = “GAUSSIAN_CONVOLUTION”

#Execute

arcpy.ia.ResampleLibrarySpectra(
	in_library_spectra = input_library, 
	out_library_spectra = out_library, 
	target_sensor = target_sensor, 
	custom_target_image_or_spectra = custom_target_image_or_spectra,
	resampling_method = method
)

Licensing information

  • Basic: Requires Image Analyst
  • Standard: Requires Image Analyst
  • Advanced: Requires Image Analyst

Related topics