Batch Build Pyramids (Data Management)

License Level:BasicStandardAdvanced

Summary

Builds pyramids for multiple raster datasets.

Usage

Syntax

BatchBuildPyramids_management (Input_Raster_Datasets, {Pyramid_levels}, {Skip_first_level}, {Pyramid_resampling_technique}, {Pyramid_compression_type}, {Compression_quality}, {Skip_Existing})
ParameterExplanationData Type
Input_Raster_Datasets
[input_raster_dataset,...]

The input raster datasets for which you want to build raster pyramids.

Each input should have more than 1024 rows and 1024 columns.

Raster Dataset
Pyramid_levels
(Optional)

Choose the number of reduced-resolution dataset layers that will be built. The default value is -1, which will build full pyramids. A value of 0 will result in no pyramid levels.

Long
Skip_first_level
(Optional)

Choose whether to skip the first pyramid level. Skipping the first level will take up slightly less disk space, but it will slow down performance at these scales.

  • NONEThe first pyramid level will be built. This is the default.
  • SKIP_FIRSTThe first pyramid level will not be built.
Boolean
Pyramid_resampling_technique
(Optional)

The resampling technique used to build your pyramids.

  • NEARESTThe 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.
  • BILINEARThe bilinear interpolation resampling method determines the new value of a cell based on a weighted distance average of the four nearest input cell centers.
  • CUBICThe Cubic convolution resampling method determines the new value of a cell based on fitting a smooth curve through the 16 nearest input cell centers.
String
Pyramid_compression_type
(Optional)

The compression type to use when building the raster pyramids.

  • DEFAULTIf 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.
  • LZ77The LZ77 compression algorithm will be used to build the pyramids. LZ77 can be used for any data type.
  • JPEGThe 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_YCbCrA lossy compression using the luma (Y) and chroma (Cb and Cr) color space components.
  • NONENo compression will be used when building pyramids.
String
Compression_quality
(Optional)

The compression quality to use when pyramids are built with the JPEG compression method. The value must be between 0 and 100. The values closer to 100 would produce a higher-quality image, but the compression ratio would be lower.

Long
Skip_Existing
(Optional)

Specify whether to build pyramids only where they are missing or regenerate them even if they exist.

  • OVERWRITEPyramids will be built even if they already exist. Therefore, existing pyramids will be overwritten. This is the default.
  • SKIP_EXISTINGPyramids will only be built if they do not exist.
Boolean

Code Sample

BatchBuildPyramids example 1 (Python window)

This is a Python sample for BatchBuildPyramids.

import arcpy
arcpy.BatchBuildPyramids_management(
     "C:/data/img1.tif;C:/data/img2.img", "6", "SKIP_FIRST",
      "BILINEAR", "JPEG", "50", "SKIP_EXISTING")
BatchBuildPyramids example 2 (stand-alone window)

This is a Python script sample for BatchBuildPyramids.

#Build Pyramids for multiple raster datasets in the workspace
#Skip the dataset that already has pyramid
#Build pyramids with compression and level setting

import arcpy
arcpy.env.workspace = "C:/Workspace"

    
inras = "image1.tif;image2.img;fgdb.gdb/image3"
pylevels = "6"
skipfirst = "SKIP_FIRST"
resample = "BILINEAR"
compress = "JPEG"
quality = "80"
skipexist = "SKIP_EXISTING"

arcpy.BatchBuildPyramids_management(
     inras, pylevels, skipfirst, resample, compress,
     quality, skipexist)

Environments

Pyramid

The pyramid level, pyramid compression, and resampling method does not apply to the IMG format.

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/18/2013