AnsweredAssumed Answered

Geoprocessing service cannot input/output rasters

Question asked by jon.morris on Jun 8, 2015
Latest reply on Jan 15, 2016 by mchristmas@yahoo.com

I'm trying to write a javascript web app that does a multi-stage raster calculation. At each stage, I'd like to display the output raster, then use it as input to the next stage. What is the best way to pass rasters from one GP tool to another?

 

I've tried setting the output parameter to raster dataset, which does generate a TIFF in the scratch workspace (for example http://xxxxxx:6080/arcgis/rest/directories/arcgisjobs/createrandomraster_gpserver/j20ddb907be1d4404944bd4ec26871851/scratch/RandomRaster.tif), but I can't work out how to use this url to create a layer that can be added to the map. A number of the layer constructors take a url, but none of them display the layer on my map.

 

ArcGISDynamicMapServiceLayer constructor

ArcGISImageServiceLayer constructor

RasterLayer constructor

 

I've also tried setting the tool output to raster layer, which displays on the web map ok, but doesn't work as an input to the second tool.

 

I've looked through the help docs and javascript api, but there isn't much detail on raster handling. I know I'm getting the input format wrong, but can't find any clues as to what I should be doing. The only response I get from the server is a Failed message, which isn't much use.

 

Any ideas? This discussion seems to cover the same area, but no-one has come up with the answer yet.

Outcomes