Changing GP service result raster symbology on the fly

2206
0
09-04-2015 03:06 AM
JonMorris2
Occasional Contributor II

So, we've been developing a web application using the javascript API that performs a series of raster calculations. It's a multi-step process, with the results of one GP service being fed into another.

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 dataLayer based on raster data source only transparency in the drawingInfo is supported. renderer is 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.

Cross-posting in GeoprocessingArcGIS for Server

0 Kudos
0 Replies