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 that is 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} (skip_first)"



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.

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.
  • NONE—No compression will be used when building pyramids.

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"		

Related Topics