Select to view content in your preferred language

ImageryLayer RasterFunction "Remap" using geometries

429
0
07-25-2022 09:39 PM
matteking
New Contributor

Hello,

I'm attempting to remap pixel values inside a specific geometry using a RasterFunction with the raster function object called "Remap". According to the Remap arguments and description on the raster function object page, I should be able to "use the Remap function with geometry values" using the argument "GeometryType" and "Geometries". Of course, I'm doing all this in the ArcGIS Javascript API.

As you'll see in this codepen (give it a second to load, you should see a green square), I'm chaining multiple RasterFunctions together. The first two work wonderfully: 1) asking for a server side render function by name "Slope Degrees" 2) Using the "Clip" function, also found in the raster function object page

But when I attempt to Remap by geometry (as explained above), it seems to ignore those arguments and applies the Remap to the whole clipped raster. If fact, I can put complete nonsense values inside GeometryType/Geometries and it doesn't through an "invalid input" error. 

(as a test I'm remapping any pixel value between 0-100 to be 50 and then colorizing all pixels with the value 50 to green, but ideally only inside that specific polygon).

Am I misunderstanding the use of the GeometryType/Geometries arguments with the Remap function? Or are these function arguments not supported in the latest ArcGIS Javascript API? Or does this have something to do with how the layer is published/versioned on the Image Server?

 Thanks!

0 Kudos
0 Replies