Show / Hide Table of Contents

Method BuildPyramids

BuildPyramids(BuildRasterPyramidsParameters)

Starts building pyramids stored in a pyramid file (.ovr) for the owning raster.

Declaration
public BuildRasterPyramidsOperation BuildPyramids(BuildRasterPyramidsParameters parameters)
Parameters
Type Name Description
BuildRasterPyramidsParameters parameters

Options for building pyramids.

Returns
Type Description
BuildRasterPyramidsOperation

The operation that builds pyramids for the raster.

Remarks

This method starts an operation that builds pyramids in a separate pyramid file (.ovr) for the owning raster and returns a handle to that operation.

Use the returned BuildRasterPyramidsOperation to observe progress, request cancellation, and await the RasterPyramidInfo result. While the operation is running, it is also available from ActiveBuildOperation so other callers can join, observe, or cancel the same operation.

Only one pyramid build request can be in progress for a raster at a time. If another pyramid build request is in progress for the raster, this method throws an InvalidOperationException and no build request is started. Use ActiveBuildOperation to access the operation that is already running.

Errors that occur after the build starts, including the raster not supporting pyramid building, are reported by GetResultAsync(CancellationToken).

If the raster already has pyramids, this method throws an InvalidOperationException and pyramids are not built. To rebuild pyramids stored in a separate pyramid file (.ovr), call DeletePyramids() before calling this method.

When the build operation completes successfully, PyramidInfo is refreshed with information about the pyramid set that was built.

This method is supported only for file-based rasters that support pyramids stored in a separate pyramid file (.ovr). Rasters with existing embedded pyramids are not supported.

For details of the build request, see BuildRasterPyramidsParameters.

Exceptions
Type Condition
ArgumentNullException

parameters is null.

ArgumentException

The MaximumLevelCount is less than 1, or if the CompressionType is Jpeg or JpegYCbCr and the raster does not support JPEG compression.

InvalidOperationException

A pyramid build operation is already in progress for the raster, the raster already has pyramids, or the raster is closed.

IOException

The raster is in a read-only directory.

Applies to

Platforms and versions
TargetVersions
.NET300.1
.NET Windows300.1
.NET Android300.1
.NET iOS300.1
In this article
Provide feedback
Back to top Copyright © 2025 Esri.