sjones

Pass a null result back to a dynamic map Service from a geoprocessing task

Discussion created by sjones on Oct 2, 2012
Howzit All,

I have created a Geoprocessing Service that creates a Heat Map using the Kernel Density Tool. The service works well, and quickly when a feature selection is given to it. However, the tool fails when the feature layer selection returns no records and a null Raster Layer is passed back to the AGS Dynamic Map Service Layer.

Geoprocssing Overview:
- create a Feature Layer from a sql expression
- generate Kernel Density Layer
- set Layer into resulting Dynamic Map Service Layer as a Raster Layer

The task fails when a null Raster Layer does not exist and is passed back to the out Layer using.
arcpy.SetParameterAsText(6,outRaster)

The task succeeds when the heatMap is created from > 1 features in the selection.

Setting arcpy.SetSeverityLevel(0) ensures the task completes.

I think the problem occurs at the map services level because the task completes.

Question:
How can I pass a null Layer back to a Raster Layer in a AGS Dynmaic Map Service Layer from a Geoprocessing Result?

Susan

North South GIS
Auckland, New Zealand

Outcomes