Problem applying Colormap raster function to image service

2499
1
Jump to solution
11-27-2012 09:35 AM
GerardoArmendariz
New Contributor III
I am having a hard time applying a Colormap to my image service.  I have tried other functions (Hillshade and NDVI) and they do work on my service.

Based on this API reference, my code should work: http://resources.arcgis.com/en/help/rest/apiref/israsterfunctions.html

This is how I am creating my Colormap RasterFunction:
private function resetColormapByExtent():void{  var newCM:Array;  var rasterArgs:Object = {};    newCM =  new Array(   [0,97,21,13],   [10,99,25,14],   [20,102,28,15],   [30,105,30,16],   [40,107,36,18],   [50,110,38,19],   [60,112,42,20],   [70,115,47,22],   [80,117,50,23],   [90,120,54,25],   [100,122,57,27]);    rasterArgs["Colormap"] = newCM;    var rasterFunction:RasterFunction = new RasterFunction();  rasterFunction.arguments = rasterArgs;  rasterFunction.functionName = "Colormap";  imageLayer.renderingRule = rasterFunction; }


When I execute this code the image service layer disappears.

I have looked for a specific Colormap examples and I have not found one yet.  Has anyone encountered this problem?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
GerardoArmendariz
New Contributor III
OK, I was able to answer my own question. It turns out that by turning off the "Convert colormap to RGB" flag under ArcGIS Server Manager > MYSERVICE > Parameters > Functions and restarting the image service, I was able to get my new Colormap applied to the Image Service. 🙂

Hopefully this helps someone else out there.

View solution in original post

0 Kudos
1 Reply
GerardoArmendariz
New Contributor III
OK, I was able to answer my own question. It turns out that by turning off the "Convert colormap to RGB" flag under ArcGIS Server Manager > MYSERVICE > Parameters > Functions and restarting the image service, I was able to get my new Colormap applied to the Image Service. 🙂

Hopefully this helps someone else out there.
0 Kudos