Raster Class

  • Raster
  • class Esri::ArcGISRuntime::Raster

    Represents raster data that can be rendered using a RasterLayer. More...

    Public Functions

    Raster(const QString &path, QObject *parent = nullptr)
    Raster(Esri::ArcGISRuntime::RasterFunction *rasterFunction, QObject *parent = nullptr)
    virtual ~Raster() override
    QString path() const
    Esri::ArcGISRuntime::RasterFunction *rasterFunction() const
    Esri::ArcGISRuntime::RasterType rasterType() const

    Reimplemented Public Functions

    virtual void cancelLoad() override
    virtual void load() override
    virtual Esri::ArcGISRuntime::Error loadError() const override
    virtual Esri::ArcGISRuntime::LoadStatus loadStatus() const override
    virtual void retryLoad() override

    Signals

    void doneLoading(const Esri::ArcGISRuntime::Error &loadError)
    void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Detailed Description

    A raster consists of a matrix of cells (or pixels) organized into rows and columns (or a grid) where each cell contains a value representing information, such as temperature. Rasters are digital aerial photographs, imagery from satellites, digital pictures, or even scanned maps.

    It can be created from a raster file on device or from a raster function.

    Supported Raster formats include:

    • ASRP/USRP
    • CIB1, 5, 10
    • DTED0, 1, 2
    • GeoTIFF
    • HFA
    • HRE
    • IMG
    • JPEG
    • JPEG 2000
    • NITF
    • PNG
    • RPF
    • SRTM1, 2
    • Mosaic Dataset in SQLite (read-only)

    Learn more about rasters from the ArcGIS Desktop documentation.

    Relevant samples:

    • Blend raster layer: Blend a hillshade with a raster by specifying the elevation data. The resulting raster looks similar to the original raster, but with some terrain shading, giving it a textured look.
    • Colormap renderer: Apply a colormap renderer to a raster.
    • Hillshade renderer: Apply a hillshade renderer to a raster.
    • Raster function (file): Apply a raster function to a local raster file and display the output with a raster layer.
    • Raster function (service): Load a raster from a service, then apply a function to it.
    • Raster layer (file): Create and use a raster layer made from a local raster file.
    • RGB renderer: Apply an RGB renderer to a raster layer to enhance feature visibility.
    • Stretch renderer: Use a stretch renderer to enhance the visual contrast of raster data for analysis.

    See also RasterLayer.

    Member Function Documentation

    [explicit] Raster::Raster(const QString &path, QObject *parent = nullptr)

    Constructor that takes a path to a local raster file and an optional parent.

    [explicit] Raster::Raster(Esri::ArcGISRuntime::RasterFunction *rasterFunction, QObject *parent = nullptr)

    Constructor that takes a rasterFunction and an optional parent.

    [override virtual] Raster::~Raster()

    Destructor.

    [override virtual] void Raster::cancelLoad()

    Reimplements: Loadable::cancelLoad().

    See Loadable.

    [signal] void Raster::doneLoading(const Esri::ArcGISRuntime::Error &loadError)

    Signal emitted when this object is done loading.

    • loadError - Details about any error that may have occurred.

    Note: If there is a load error it will also be emitted on the errorOccurred signal.

    See also Loadable and Object.

    [override virtual] void Raster::load()

    Reimplements: Loadable::load().

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::Error Raster::loadError() const

    Reimplements: Loadable::loadError() const.

    See Loadable.

    [override virtual] Esri::ArcGISRuntime::LoadStatus Raster::loadStatus() const

    Reimplements: Loadable::loadStatus() const.

    See Loadable.

    [signal] void Raster::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Signal emitted when the loadStatus changes for this object.

    See also Loadable.

    QString Raster::path() const

    Returns the path to the raster file.

    Esri::ArcGISRuntime::RasterFunction *Raster::rasterFunction() const

    Returns the raster function used to create this raster.

    Esri::ArcGISRuntime::RasterType Raster::rasterType() const

    Returns the raster type.

    [override virtual] void Raster::retryLoad()

    Reimplements: Loadable::retryLoad().

    See Loadable.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

    You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

    Your ArcGIS portal

    Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

    Your ArcGIS Location Platform dashboard

    Manage billing, monitor service usage, and access additional resources.

    Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

    Close