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
- The pyramid level refers to the number of reduced resolution datasets (pyramid layers) that will be created when pyramids are built. The default is to leave the text box empty so that ArcGIS will choose the most appropriate level of pyramids (highly recommended). A value of -1 will give the same result as leaving the text box empty. A value of 0 will result in no pyramid levels.
- Please refer to the Raster Storage Matrix to see which raster storage formats can be controlled when building pyramids.
- Use Nearest neighbor for nominal data or raster datasets with colormaps, such as land use data, scanned maps, and pseudocolor images.
- Use Bilinear interpolation or Cubic convolution for continuous data, such as satellite imagery or aerial photography.
- Not building pyramids saves storage space but will lead to slower display speed, especially for a larger raster dataset.
- JPEG compression is not supported by all pixel types; therefore, the default compression of LZ77 will be applied when necessary.
- Pyramid compression will be ignored for ArcSDE and file geodatabase raster datasets because the pyramids will use the same compression as the raster dataset.
Dialog syntax
- Build pyramids—Check this box to build pyramids for your raster.
- Pyramid levels—Specify the number of pyramid levels. You can specify the number of levels to create, or you can leave the value blank to build all levels.
- Pyramid resampling technique—The resampling technique used to build your pyramids.
- NEAREST—The nearest neighbor resampling method will be used. This uses the value of the closest cell to assign a value to the output cell when resampling. This is the default.
- BILINEAR—The bilinear interpolation resampling method will be used. It determines the new value of a cell based on a weighted distance average of the four nearest input cell centers.
- CUBIC—The Cubic convolution resampling method will be used. It determines the new value of a cell based on fitting a smooth curve through the 16 nearest input cell centers.
- Pyramid compression type—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—The LZ77 compression algorithm will be used to build the pyramids. LZ77 can be used for any data type.
- JPEG—The JPEG compression algorithm to build pyramids. Only data that adheres to the JPEG compression specification can use this compression type. If JPEG is chosen, you can then set the compression quality.
- NONE—No compression will be used when building pyramids.
- Compression Quality (1-100)—The compression quality to use when pyramids are built with the JPEG compression method.
Scripting syntax
arcpy.env.pyramid = "pyramid_option {levels} {interpolation_type} {pyramid_compression} (skip_first)"
Parameters |
Explanation |
---|---|
pyramid_option (Required) |
Specify if pyramids will be built.
|
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:
|
pyramid_compression (Optional) |
The compression type to use when building the raster pyramids:
|
import arcpy # Set the pyramid environment to build all pyramids levels with # cubic convolution resampling, LZ77 compression. arcpy.env.pyramid = "PYRAMIDS -1 CUBIC LZ77"