Skip To Content ArcGIS for Developers Sign In Dashboard

ImageServiceRaster Class


Represents a raster based off an image service. More...

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

Public Functions

ImageServiceRaster(const QUrl &url, QObject *parent = nullptr)
ImageServiceRaster(const QUrl &url, Credential *credential, QObject *parent = nullptr)
RenderingRule *renderingRule() const
ArcGISImageServiceInfo serviceInfo() const
void setRenderingRule(RenderingRule *renderingRule)

Reimplemented Public Functions

virtual Credential *credential() const
virtual RequestConfiguration requestConfiguration() const
virtual void setRequestConfiguration(const RequestConfiguration &requestConfiguration)
virtual QUrl url() const

Additional Inherited Members

Detailed Description

Represents a raster based off an image service.

An 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("")), 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);

// 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

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

Member Function Documentation

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

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

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

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



[virtual] Credential *ImageServiceRaster::credential() const

Reimplemented from RemoteResource::credential().

Returns the security credential used to access the service.

Only applicable if using an service that is secured.

RenderingRule *ImageServiceRaster::renderingRule() const

Returns the RenderingRule applied to this ImageServiceRaster.

See also setRenderingRule().

[virtual] RequestConfiguration ImageServiceRaster::requestConfiguration() const

Reimplemented from RemoteResource::requestConfiguration().

Returns the RequestConfiguration in use by this service.

See also setRequestConfiguration().

ArcGISImageServiceInfo ImageServiceRaster::serviceInfo() const

Returns the service info corresponding to this image service.

void ImageServiceRaster::setRenderingRule(RenderingRule *renderingRule)

Sets the renderingRule to be applied to this ImageServiceRaster.

See also renderingRule().

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

Reimplemented from RemoteResource::setRequestConfiguration().

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

See also requestConfiguration().

[virtual] QUrl ImageServiceRaster::url() const

Reimplemented from RemoteResource::url().

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

Feedback on this topic?