ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Build Pyramids

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Builds raster pyramids for your raster dataset.

This tool can also be used to delete pyramids. To delete pyramids, set the Pyramids Levels parameter to 0.

Illustration

Build Pyramids

Usage

  • Building pyramids improves the display performance of raster datasets.

  • You only need to build pyramids once per dataset. The pyramids will be accessed every time you display the raster dataset.

  • Pyramids will not be built for raster datasets that have less than 1024 pixels in the row or column. Pyramids are not needed since the raster dataset is small enough, and building pyramids will not help increase the performance.

  • Wavelet compressed raster datasets, such as ECW and MrSID, do not need to have pyramids built. These formats have internal pyramids that are created upon encoding.

  • You can choose the compression type for your overview pyramid file, in the Raster Storage Environment Settings. Compression will create a smaller .ovr file. The IMAGINE format and older versions of ArcGIS will create reduced resolution dataset (.rrd) files, where compression is not available.

  • The default pyramid compression will use the optimal compression type, given the type of data. You can manually choose to have LZ77, JPEG, or no compression.

  • JPEG compression can only be used with file formats that can store data according to the JPEG specifications. The Supported raster dataset file formats topic lists which specifications the JPEG format can support.

Syntax

BuildPyramids_management (in_raster_dataset, {pyramid_level}, {SKIP_FIRST}, {resample_technique}, {compression_type}, {compression_quality}, {skip_existing})
ParameterExplanationData Type
in_raster_dataset

The raster dataset for which you want to build pyramids.

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

Raster Dataset; Raster Layer
pyramid_level
(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.

To delete pyramids, set the number of levels to 0.

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.

Long
SKIP_FIRST
(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.

  • NONE —The first pyramid level will be built. This is the default.
  • SKIP_FIRST —The first pyramid level will not be built.
Boolean
resample_technique
(Optional)

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.
String
compression_type
(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 —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.
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 when they are missing or regenerate them even if they exist.

  • OVERWRITE —Pyramids will be built even if they already exist; therefore, existing pyramids will be overwritten. This is the default.
  • SKIP_EXISTING —Pyramids will only be built if they do not already exist.
Boolean

Code sample

BuildPyramids example 1 (Python window)

This is a Python sample for BuildPyramids.

import arcpy
arcpy.BuildPyramids_management(
     "C:/data/image.tif", "3", "NONE", 
     "BILINEAR", "JPEG", "50", "SKIP_EXISTING")
BuildPyramids example 2 (stand-alone window)

This is a Python script sample for BuildPyramids.

#Build Pyramids for single Raster Dataset
#Define the type and compression of pyramids in the tool
#Skip if dataset already has pyramids

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

inras = "image.tif"
pylevel = "3"
skipfirst = "NONE"
resample = "BILINEAR"
compress = "JPEG"
quality = "80"
skipexist = "SKIP_EXISTING"

arcpy.BuildPyramids_management(inras, pylevel, skipfirst, resample, 
                               compress, quality, skipexist)

Environments

  • Current Workspace
  • Pyramid
    Note:

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

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Raster toolset
  • Environment settings for raster data
  • Raster pyramids
  • Setting the pyramid options for the geoprocessing environment
  • Changing the default setting for building pyramids

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal