A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-rasterfunction.html below:

RasterFunction Class | ArcGIS Maps SDK for Qt

  • RasterFunction
  • class Esri::ArcGISRuntime::RasterFunction

    An operation that can be performed on one or more rasters or a mosaic dataset by applying on-the-fly processing. More...

    Public Functions Static Public Members Esri::ArcGISRuntime::RasterFunction * fromJson(const QString &json, QObject *parent = nullptr) Detailed Description

    Examples of RasterFunctions include Hillshade, Stretch, Colormap, Mask, and ShadedRelief, among others.

    RasterFunctions in ArcGIS Maps SDK work very similarly to the ArcGIS REST API. The following workflow is a common way to render a raster using a raster function:

    1. Create a raster function via JSON. For example, the following JSON could be used for a Pansharpen function:
      {
        "raster_function":{"type":"Pansharpen_function"},
        "raster_function_arguments":
        {
          "weights":{"double_array":[0.10000000000000001,0.5,0.40000000000000002,0.29999999999999999],"type":"Raster_function_variable"},
          "pansharpen_type":{"pansharpen_type":"gram_schmidt","type":"Raster_function_variable"},
          "pan_raster":{"name":"pan_raster","is_raster":true,"type":"Raster_function_variable"},
          "raster":{"name":"raster","is_raster":true,"type":"Raster_function_variable"},
          "type":"Raster_function_arguments"
        },
        "type":"Raster_function_template"
      }

      For documentation on this API's JSON format and syntax for the different raster functions, please see the Guide topic Add raster data.

    2. Construct a RasterFunction object with the JSON created in step 1.
    3. Get the RasterFunctionArguments with arguments.
    4. Add rasters to the RasterFunctionArguments.
    5. Create a new Raster object with this RasterFunction.
    6. Create a new RasterLayer with the Raster object.
    7. Add the RasterLayer to a map or scene.

    For further details on raster functions, please see the ArcGIS Desktop documentation.

    Use an ImageServiceRaster as an argument for a raster function:

    RasterFunction* rasterFunction = new RasterFunction(m_dataPath + "/hillshade_simplified.json", this);
    RasterFunctionArguments* arguments = rasterFunction->arguments();
    arguments->setRaster("raster", m_imageServiceRaster);
    
    // create a new raster with the raster function and add to the operational layer
    Raster* raster = new Raster(rasterFunction, this);
    RasterLayer* rasterLayer = new RasterLayer(raster, this);

    Relevant samples:

    Member Function Documentation [explicit] RasterFunction::RasterFunction(const QString &path, QObject *parent = nullptr)

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

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

    Destructor.

    Esri::ArcGISRuntime::RasterFunctionArguments *RasterFunction::arguments() const

    Returns the arguments of this raster function.

    [static] Esri::ArcGISRuntime::RasterFunction *RasterFunction::fromJson(const QString &json, QObject *parent = nullptr)

    Creates a new RasterFunction from its JSON representation.


    RetroSearch is an open source project built by @garambo | Open a GitHub Issue

    Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

    HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4