Zum Hauptinhalt gehen

Set Imagery Layer Options Activity

Kommentare

5 Kommentare

  • Permanently deleted user

    Hello Helen,

     

    I will look into creating a sample workflow for this activity.

     

    We have an existing sample for our version 4 Workflow technology that is included in the Workflows Sample Site, in the Common Client directory, named 'SetImageServiceInfo', which performs this function.

     

    Thanks, Stefan

    0
  • Permanently deleted user

    Hi Stefan,

     

    A basic sample workflow that saves time on learning how to created the parameters using Workflow 5 activities that need to be passed to the Set Imagery Layer Options Activity would be very helpful.

     

    Thanks,

    Helen

    0
  • Permanently deleted user

    Specifically, I am struggling with mapping the JavaScript data structures to Workflow 5 activities. What activity do I use to create a Function for the Raster Filter and Object for the Mosaic and Rendering Rules?

    0
  • Permanently deleted user

    Hi Helen,

     

    Unfortunately the example you have linked to is not possible in GVH. The pixel filter can be set on the layer but the layer does not store the pixel data which is necessary in order for the pixel filter function to work.

     

    You can get similar behavior by setting a Raster Function on the layer, using the Set Imagery Layer Options activity.

     

    You can read more about server-side rendering with raster functions here:

    https://enterprise.arcgis.com/en/server/latest/publish-services/linux/server-side-raster-functions.htm

     

    To use the Set Imagery Layer Options activity to set a rendering rule you can use the JSON representation of the rendering rule as the input.

     

    You can find a good reference for the rendering rules here:

    https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm

     

    Now for example if we wanted to set the Arithmetic raster function from the link above on an imagery layer we could supply the following code to the rendering rule input:

    ={ "rasterFunction" : "Arithmetic", "rasterFunctionArguments" : { { "Raster" : "$$", "Raster2: "100", "Operation" : 2 } }

    This will set the layer's rendering rule and the server will then use that when rendering the image that will be returned.

     

    Using a combination of available rendering rules the behavior in the sample you provided should be possible.

     

    The same steps can be followed to add a Mosaic rule, except of course passing a Mosaic rule object instead of a Raster function object.

     

    To answer your second question, to use JavaScript data structures in workflows there are a few approaches you can take.

     

    To create a function you could put something like this in an input:

    =function(parameter){ console.log(parameter); }

    Of course this is great if you need a really small function but for more complex functions we recommend creating a custom activity that returns the function you want to use.

     

    You can read more about custom activities here:

    https://docs.geocortex.com/workflow/5.4/help/Default.htm#wf5/help/custom-development.htm#Custom_Development%3FTocPath%3DCustom%2520Development%7C_____0

     

    Thanks,

    Braiden

    1
  • Nico Burgerhart

    Thanks for this example.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.