laptop and a wrench

Bug

Labels in stretch renderer are not applied correctly when setting the renderer of a raster layer using a LYR file.

Last Published: March 27, 2015 ArcGIS for Desktop
Bug ID Number NIM084408
SubmittedSeptember 5, 2012
Last ModifiedJune 5, 2024
Applies toArcGIS for Desktop
Version found10.0
Program languageC#
Operating SystemWindows OS
Operating System Version7
StatusWill Not Be Addressed

Additional Information

We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.

Workaround

After setting IRasterLayer::Renderer property with the IRasterRenderer reference obtained from the LYR file,e.g.rasterLayer.Renderer = rasterRenderer;... cast the IRasterRenderer reference returned by IRasterLayer::Renderer to IRasterStretchColorRampRenderer to adjust the labels of the raster renderer using the LabelHigh and LabelLow properties of IRasterStretchColorRampRenderer:e.g.rasterRenderer = rasterLayer.Renderer; //see note belowrasterStretchColorRampRenderer = rasterRenderer as IRasterStretchColorRampRenderer;rasterStretchColorRampRenderer.LabelHigh = rasterStretchColorRampRenderer.LabelHigh + "ft";rasterStretchColorRampRenderer.LabelLow = rasterStretchColorRampRenderer.LabelLow + "ft";Note: The user must first assign the renderer to the RasterLayer to get a new reference to IRasterRenderer from rasterLayer.Renderer before applying this change. The first reference to IRasterRenderer obtained from the LYR file is correct and does not need any adjustments. It is not until the first reference to IRasterRenderer is assigned to the RasterLayer that the renderer breaks and needs the adjustments.

Steps to Reproduce

Bug ID: NIM084408

Software:

  • ArcGIS for Desktop

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options