• RasterPyramids
  • class Esri::ArcGISRuntime::RasterPyramids

    Provides access to pyramid information and pyramid management operations for a raster. More...

    Header: #include <RasterPyramids.h>
    Since: Esri::ArcGISRuntime 300.1
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    virtual ~RasterPyramids() override
    Esri::ArcGISRuntime::BuildRasterPyramidsOperation *activeBuildOperation() const
    Esri::ArcGISRuntime::BuildRasterPyramidsOperation *buildPyramids(Esri::ArcGISRuntime::BuildRasterPyramidsParameters *parameters)
    void deletePyramids()
    Esri::ArcGISRuntime::RasterPyramidInfo *pyramidInfo() const

    Signals

    Detailed Description

    This object is owned by a Raster and exposes the current pyramid state for that raster. Use Raster::pyramids to get the instance associated with a raster. If the raster does not support pyramids, Raster::pyramids is nullptr.

    Pyramids for a raster can be embedded within the raster file or stored in a separate pyramid file (.ovr). This object can build and delete pyramids stored in a separate pyramid file when the raster source supports those operations.

    To determine whether pyramids can be built, check that both pyramidInfo and activeBuildOperation are nullptr. To determine whether pyramids can be deleted, check that pyramidInfo is not nullptr, RasterPyramidInfo::isEmbedded is false, and activeBuildOperation is nullptr. These checks describe the current pyramid state and whether a build is in progress; they do not guarantee that a build or delete request will succeed.

    Member Function Documentation

    [override virtual noexcept] RasterPyramids::~RasterPyramids()

    Destructor.

    Esri::ArcGISRuntime::BuildRasterPyramidsOperation *RasterPyramids::activeBuildOperation() const

    Returns the pyramid build operation currently running for the owning raster.

    This property is nullptr when no pyramid build operation is in progress for the raster. When a build is in progress, this property returns the current operation so that callers can observe progress, request cancellation, or await the result.

    This property is set when a build operation starts and is cleared when that operation completes, fails, or is canceled. When this value changes, the activeBuildOperationChanged event is fired.

    [signal] void RasterPyramids::activeBuildOperationChanged()

    Called when the value of activeBuildOperation changes.

    Esri::ArcGISRuntime::BuildRasterPyramidsOperation *RasterPyramids::buildPyramids(Esri::ArcGISRuntime::BuildRasterPyramidsParameters *parameters)

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

    • parameters - Options for building pyramids.

    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 a ErrorType::CommonInvalidCall error 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 BuildRasterPyramidsOperation::resultAsync.

    If the raster already has pyramids, this method throws a ErrorType::CommonInvalidCall error 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.

    void RasterPyramids::deletePyramids()

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

    This method deletes pyramids associated with the owning raster's external pyramid file (.ovr). It does not delete pyramids embedded in the source raster file.

    Call this method only when pyramidInfo is not empty, RasterPyramidInfo::isEmbedded is false, and activeBuildOperation is empty.

    When this method completes successfully, pyramidInfo is refreshed and may become empty.

    This method is supported only for file-based rasters that can use a pyramid file (.ovr).

    Esri::ArcGISRuntime::RasterPyramidInfo *RasterPyramids::pyramidInfo() const

    Returns information about the raster's pyramid set.

    This property is nullptr if no pyramids exist for the raster.

    When available, this property describes the pyramid set associated with the owning raster. The pyramids may be part of the source raster dataset or stored in a separate pyramid file (.ovr).

    This property is refreshed after a pyramid build operation completes successfully or deletePyramids is called successfully.