The rule that specifies how images are rendered or processed on an ArcGIS image service. More...
Header: | #include <RenderingRule.h> |
Since: | Esri::ArcGISRuntime 100.1 |
Inherits: | Esri::ArcGISRuntime::Object |
Public Functions
RenderingRule(const QString &renderingRuleJson, QObject *parent = nullptr) | |
RenderingRule(const Esri::ArcGISRuntime::RenderingRuleInfo &renderingRuleInfo, QObject *parent = nullptr) | |
virtual | ~RenderingRule() override |
Esri::ArcGISRuntime::RenderingRuleInfo | renderingRuleInfo() const |
QString | renderingRuleJson() const |
Detailed Description
Raster images whose individual pixels represent elevation values can be rendered in a number of different ways, including representation of slope, aspect, hillshade, and shaded relief. A rendering rule defines how the ArcGIS image service renders its images.
You can create a RenderingRule from a RenderingRuleInfo or a JSON string that specifies a service-defined or client-defined rendering rule. For a list of functions and the syntax for these rendering rules, see Raster function objects.
Create a RenderingRule:
// get the rendering rule info from the service info RenderingRuleInfo renderingRuleInfo = m_imageServiceRaster->serviceInfo().renderingRuleInfos().at(index); // create a new rendering rule with the rendering rule info RenderingRule* renderingRule = new RenderingRule(renderingRuleInfo, this); // create an image service raster ImageServiceRaster* isr = new ImageServiceRaster(m_url, this); // set the rendering rule isr->setRenderingRule(renderingRule);
Relevant samples:
- Raster rendering rule: Display a raster on a map and apply different rendering rules to that raster.
Member Function Documentation
[explicit]
RenderingRule::RenderingRule (const QString &renderingRuleJson , QObject *parent = nullptr)
Creates a rendering rule object with server side JSON.
- renderingRuleJson - The JSON that could either be a raster function object used in the image service REST API or a predefined service rendering rule.
- parent - The optional parent QObject.
This is a server side raster function JSON and is different from the JSON returned by RasterFunction.
[explicit]
RenderingRule::RenderingRule (const Esri::ArcGISRuntime::RenderingRuleInfo &renderingRuleInfo , QObject *parent = nullptr)
Creates a rendering rule object with rendering rule info.
- renderingRuleInfo - The rendering rule info object.
- parent - The optional parent QObject.
[override virtual]
RenderingRule::~RenderingRule ()
Destructor.
Esri::ArcGISRuntime::RenderingRuleInfo RenderingRule::renderingRuleInfo () const
Returns rendering rule info from rendering rule object.
QString RenderingRule::renderingRuleJson () const
Returns json property from rendering rule object.
Empty string is returned if this RenderingRule was created from a RenderingRuleInfo. This is a server side raster function JSON and not a client side RasterFunction JSON.