laptop and a wrench

Error

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

Última publicación: March 27, 2015 ArcGIS for Desktop
Número de ID del error NIM084408
EnviadoSeptember 5, 2012
Última modificaciónJune 5, 2024
Relacionado conArcGIS for Desktop
Versión encontrada10.0
Lenguaje del programaC#
Sistema operativoWindows OS
Versión de sistema operativo7
EstadoWill Not Be Addressed

Información adicional

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.

Solución alternativa

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.

Pasos para reproducir

ID del error: NIM084408

Software:

  • ArcGIS for Desktop

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga