At the moment, all the result rasters are being returned as greyscale colour ramps and I've been trying to work out if it is possible to change the symbology of raster layers that have been returned. My conclusion is that it is not possible, but I just wondered if anyone had managed to change a raster layer of a web map service or gp service result.
I've tried using LayerDrawingOptions to apply a new renderer before adding results to a webmap, but it didn't have any effect. This may be because I didn't get the right layer index, or it's not supported for rasters. I also tried using REST api export function on the mapserver (at http://<mapservice-url>/jobs/<jobId>) but as it says under dynamicLayers:
In case of
dataLayerbased on raster data source only
rendereris unsupported at 10.1.
I couldn't find out if renderer is supported at later versions (we're on 10.3). I did manage to change the transparency of the result layer, so maybe it is still unsupported.
I also wondered if we could add something at the end of our python scripts to symbolise the raster before saving it, but the only method I could find was the Apply Symbology From Layer tool. This works great in arcmap, but doesn't work as a gp tool, where there is no layer to symbolise.
I think our only option is to symbolise the GP output raster layers in Arcmap before publishing the result to the server. This works fine, but means that each result has a fixed symbology and we'll have to republish the service to make any changes.
If anyone has any more ideas, please let me know.