Select to view content in your preferred language

How to Set Raster Symbology in Runtime for WPF

2742
2
02-25-2014 08:02 AM
Labels (1)
JustinShepard
Deactivated User
I have a geoprocessing package that is generating a raster. When that completes I need to be able to load it into the map in the ArcGIS Runtime WPF application and set the symbology. From what I've seen this isn't exposed as an option but I'm really hoping that I missed something. All I want to do is set the raster to use Stretched and change the Color Ramp, I don't want to mess with the statistics of the raster just apply the color ramp.

Is there a way to create stretched color ramp renderer and apply it to a raster layer? I was looking at the SDK Sample 'Add Shapefiles and Rasters' but the sample only applies symbology to the vector data and defaults to black-to-white for the rasters.
0 Kudos
2 Replies
AaronHigh
Deactivated User
I'm interested in seeing an ESRI response to this question. If this is not possible, will it be included in a future release?
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

As you have found, there is unfortunately no raster symbology feature in the current WPF API. In the future, for the new .NET SDK, we will be adding direct read of the rasters and I would expect to see some rendering options exposed at that point.

In the existing WPF SDK your raster symbology would need to be defined in the GP model/script you are executing, and then rendered on the LocalServer. ArcPy.Mapping is *not* currently supported in the LocalServer, therefore unfortunately RasterClassifiedSymbology is not available. However, I believe it should be possible to set a default renderer within the model/script parameter?


Cheers

Mike
0 Kudos