Pyramid (Environment setting)

Tools that honor the Pyramid environment setting will only process rasters where the pyramids are valid. Pyramids for ERDAS IMAGINE files have limited options that can be set.

Pyramids are reduced-resolution representations of your dataset and are used to improve performance. Pyramids can speed up display of raster data by retrieving only the data at a specified resolution required for the display. Pyramids are created by resampling the original data. The resampling methods instruct the server how to resample the data to build the pyramids.

Usage notes

Dialog syntax

Scripting syntax

arcpy.env.pyramid = "pyramid_option {levels} {interpolation_type} {pyramid_compression} {compression_quality} {skip_first}"

Parameters

Explanation

pyramid_option (Required)

Specify if pyramids will be built.

  • PYRAMIDS—Pyramids will be built with the level that is chosen. A level of -1 will build all pyramid levels.
  • NONE—Pyramids will not be built. This is the default.

levels (Optional)

Determines how many reduced-resolution dataset layers will be built; the default value is –1, which instructs the server to build full pyramids, and the level is calculated by the server. A value of 0 will result in no pyramid levels. The maximum number of pyramid levels you can specify is 29. Any value that is 30 or higher will revert to a value of -1, which will create a full set of pyramids.

interpolation_type (Optional)

The resampling technique used:

  • NEAREST neighbor—Uses the value of the closest cell to assign a value to the output cell when resampling. This is the default.
  • BILINEAR interpolation—Determines the new value of a cell based on a weighted distance average of the four nearest input cell centers.
  • CUBIC convolution—Determines the new value of a cell based on fitting a smooth curve through the 16 nearest input cell centers.

pyramid_compression (Optional)

The compression type to use when building the raster pyramids:

  • DEFAULT—If the source data is compressed using a wavelet compression, it will build pyramids with the JPEG compression type; otherwise, LZ77 will be used. This is the default compression method.
  • LZ77—Uses the LZ77 compression type to build the pyramids. LZ77 can be used for any data type.
  • JPEG—Uses the JPEG compression algorithm to build pyramids. Only data that adheres to the JPEG compression specification can use this compression type.
  • JPEG_YCbCr—Uses a lossy compression with the luma (Y) and chroma (Cb and Cr) color space components.
  • NONE—No compression will be used when building pyramids.

compression _quality (Optional)

The compression quality to use when pyramids are built with the JPEG compression method.

skip_first (Optional)

  • NO_SKIP—All pyramids levels will be built. This is the default.
  • SKIP_FIRST—The first pyramid level will not be built.
Pyramid syntax
import arcpy

# Set the pyramid environment to build all pyramids levels with 
#   cubic convolution resampling, LZ77 compression.
arcpy.env.pyramid = "PYRAMIDS -1 CUBIC LZ77 NO_SKIP"

Related Topics

2/10/2014