Adding raster output to the map

3038
1
11-25-2014 08:29 AM
JoshuaTharp
New Contributor II

I am having trouble adding raster output to the runtime map.

I am running the GPK from the vehicle commander sample to create a raster viewshed (Local Geoprocessor).

This GPK returns a GPRasterData parameter which has a URL to a TIF file.

I then download the TIF file to a temporary location and then using the Add shapefiles and raster data sample I add it to the map. The problem is that the local server is not reading the TIF file correctly and errors out. It appears to open a stream of only ~125 bytes when the tif is ~33k.

I am on 10.2.2 of Runtime.

Is there a better way of taking a Raster output from a gpk and adding it to the map?

The GPK appears to work fine in ArcDesktop 10.2.

The java samples seem to be a bit easier as there are methods that allow you to directly get a layer from the result.

0 Kudos
1 Reply
MichaelBranscomb
Esri Frequent Contributor

Hi,

Yes, there is a better way to do this, which is to use the map service output from the GP tool (instead of grabbing the raster and spinning up an additional LocalMapService instance to host it).

Sorry, unfortunately we don't have the sample in .NET yet but take a look at this Contour sample in WPF - it should be relatively straightforward to convert: ArcGIS Runtime SDK for WPF Samples .

Cheers

Mike

0 Kudos