ImageServiceRaster Class

  • ImageServiceRaster
  • class Esri::ArcGISRuntime::ImageServiceRaster

    Raster data that is retrieved from an ArcGIS Image Service. More...

    Header: #include <ImageServiceRaster.h>
    Since: Esri::ArcGISRuntime 100.1
    Inherits: Esri::ArcGISRuntime::Raster and Esri::ArcGISRuntime::RemoteResource

    Public Functions

    ImageServiceRaster(const QUrl &url, QObject *parent = nullptr)
    ImageServiceRaster(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)
    virtual ~ImageServiceRaster() override
    Esri::ArcGISRuntime::MosaicRule *mosaicRule() const
    Esri::ArcGISRuntime::RenderingRule *renderingRule() const
    Esri::ArcGISRuntime::ArcGISImageServiceInfo serviceInfo() const
    void setMosaicRule(Esri::ArcGISRuntime::MosaicRule *mosaicRule)
    void setRenderingRule(Esri::ArcGISRuntime::RenderingRule *renderingRule)

    Reimplemented Public Functions

    virtual Esri::ArcGISRuntime::Credential *credential() const override
    virtual Esri::ArcGISRuntime::RequestConfiguration requestConfiguration() const override
    virtual void setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration) override
    virtual QUrl url() const override

    Detailed Description

    An ArcGIS image service provides access to raster data through a web service. A single raster dataset or a mosaic dataset which contains a collection of raster datasets can be served as one image service. The mosaic dataset can dynamically process and mosaic the images on the fly. An image service supports accessing both the mosaicked image and its catalog, as well as individual rasters in the catalog. An image service raster allows you to display raster data from image services using a RasterLayer. It also allows you to apply service-defined or client-defined rendering rules by setting RenderingRule on it. You can pass an image service raster as a raster input to a RasterFunction to work with local raster functions.

    Create an ImageServiceRaster:

    // create an image service raster
    ImageServiceRaster* imageServiceRaster = new ImageServiceRaster(
          QUrl(QStringLiteral("https://gis.ngdc.noaa.gov/arcgis/rest/services/bag_hillshades_subsets/ImageServer")), this);
    // zoom to the center of the raster once it's loaded
    connect(imageServiceRaster, &ImageServiceRaster::doneLoading, this, [this]()
    {
      constexpr double scale = 200000.;
      Viewpoint vpCenter = Viewpoint(Point(-13643095.660131, 4550009.846004, SpatialReference::webMercator()), scale);
      m_mapView->setViewpointAsync(vpCenter);
    });
    
    // create a raster layer using the image service raster
    m_rasterLayer = new RasterLayer(imageServiceRaster, this);
    // add the raster layer to the map's operational layers
    m_map->operationalLayers()->append(m_rasterLayer);

    You can see the complete code in the C++ sample Raster Layer Service.

    Member Function Documentation

    [explicit] ImageServiceRaster::ImageServiceRaster(const QUrl &url, QObject *parent = nullptr)

    Creates an image service raster object with URL.

    • url - Image service URL.
    • parent - The optional parent QObject.

    ImageServiceRaster::ImageServiceRaster(const QUrl &url, Esri::ArcGISRuntime::Credential *credential, QObject *parent = nullptr)

    Constructor that takes a url, to an image service, a credential and an optional parent.

    [override virtual] ImageServiceRaster::~ImageServiceRaster()

    Destructor.

    [override virtual] Esri::ArcGISRuntime::Credential *ImageServiceRaster::credential() const

    Reimplements: RemoteResource::credential() const.

    Returns the security credential used to access the service.

    Only applicable if using an service that is secured.

    [since Esri::ArcGISRuntime 100.9] Esri::ArcGISRuntime::MosaicRule *ImageServiceRaster::mosaicRule() const

    Returns the mosaic rule used for combining a number of input rasters that are often overlapping.

    This function was introduced in Esri::ArcGISRuntime 100.9.

    See also setMosaicRule().

    Esri::ArcGISRuntime::RenderingRule *ImageServiceRaster::renderingRule() const

    Returns the rendering rule on an image service raster object.

    The image service raster must be in the LoadStatus::NotLoaded or LoadStatus::FailedToLoad state when calling this function.

    See also setRenderingRule().

    [override virtual] Esri::ArcGISRuntime::RequestConfiguration ImageServiceRaster::requestConfiguration() const

    Reimplements: RemoteResource::requestConfiguration() const.

    Returns the RequestConfiguration in use by this service.

    See also setRequestConfiguration().

    Esri::ArcGISRuntime::ArcGISImageServiceInfo ImageServiceRaster::serviceInfo() const

    Returns the metadata for the raster's ArcGIS image service.

    [since Esri::ArcGISRuntime 100.9] void ImageServiceRaster::setMosaicRule(Esri::ArcGISRuntime::MosaicRule *mosaicRule)

    Sets the mosaicRule to mosaicRule.

    This function was introduced in Esri::ArcGISRuntime 100.9.

    See also mosaicRule.

    void ImageServiceRaster::setRenderingRule(Esri::ArcGISRuntime::RenderingRule *renderingRule)

    Sets the renderingRule to renderingRule.

    See also renderingRule.

    [override virtual] void ImageServiceRaster::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration)

    Reimplements: RemoteResource::setRequestConfiguration(const Esri::ArcGISRuntime::RequestConfiguration &requestConfiguration).

    Sets the requestConfiguration parameters to be used for network requests sent by this service to requestConfiguration.

    See also requestConfiguration().

    [override virtual] QUrl ImageServiceRaster::url() const

    Reimplements: RemoteResource::url() const.

    Returns the url of the image service used to construct this ImageServiceRaster.

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