buildPyramids

Starts building pyramids stored in a pyramid file (.ovr) for the owning raster. 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 RasterPyramids.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 ErrorType.CommonInvalidCall error and no build request is started. Use RasterPyramids.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 BuildRasterPyramidsOperation.result.

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

When the build operation completes successfully, RasterPyramids.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.

Return

The operation that builds pyramids for the raster.

Since

300.1.0

Parameters

parameters

Options for building pyramids.

Throws

ArcGISException

Throws an ArcGISException error if the raster is in a read-only directory.

Throws an IllegalArgumentException error if the BuildRasterPyramidsParameters.maximumLevelCount is less than 0, or if the BuildRasterPyramidsParameters.compressionType is RasterPyramidCompressionType.Jpeg or RasterPyramidCompressionType.JpegYCbCr and the raster does not support JPEG compression.

Throws an IllegalStateException error if a pyramid build operation is already in progress for the raster, the raster already has pyramids, or the raster is closed.