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
- 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. The maximum number of pyramid levels that can be specified is 29.
- Refer to the Raster Storage Matrix to see which raster storage formats can be controlled when building pyramids.
- Use NEAREST for nominal data or raster datasets with colormaps, such as land-use data, scanned maps, and pseudocolor images.
- Use BILINEAR or CUBIC 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.
- Skipping the first pyramid level will reduce the size of the pyramids. However, the trade-off is that it will be slower at the small-scale resolutions—this is often recommended to save space because the first pyramid level can be large.
- 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 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.
- Skip first—Check this box to skip the first pyramid level for your raster.
- Pyramid resampling technique—The resampling technique used to build your pyramids.
- NEAREST—The nearest neighbor resampling method 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 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 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.
- JPEG_YCbCr—A lossy compression using the luma (Y) and chroma (Cb and Cr) color space components.
- 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} {compression_quality} {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. 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:
|
pyramid_compression (Optional) |
The compression type to use when building the raster pyramids:
|
compression _quality (Optional) |
The compression quality to use when pyramids are built with the JPEG compression method. |
skip_first (Optional) |
|
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"