jeet@timmons

Get Symbol (color) from layer

Discussion created by jeet@timmons on Nov 14, 2016

Using arcpy, I'm attempting to script a process to get the Symbol, Range, min and max values. The symbol should be in the form of RBG or Hex values. I am successfully able to retrieve the Range and Label properties of Classified Symbology: I have a RASTER_CLASSIFIED type for a layer. Below are the lines to get the Range and Label.

 

 

 >>> lyr[16].symbology    <RasterClassifiedSymbology object at 0x2004c810[0x15f3e690]>   >>> lyr[16].symbology.classBreakValues    [0.004461737349629402, 0.018736, 0.022485, 0.029771, 0.04785, 0.08673, 0.15843, 0.290943, 0.505909, 4000.0]   >>> lyr[16].symbology.classBreakLabels    [u'0 - 0.018736', u'0.018737 - 0.022485', u'0.022486 - 0.029771', u'0.029772 - 0.047850', u'0.047851 - 0.086730', u'0.086731 - 0.158430', u'0.158431 - 0.290943', u'0.290943 - 0.505909', u'> 0.505909']

How can I get the Symbol (color) values?

I have looked into the Color Ramp, however there does not exist any documentation for RASTER_CLASSIFIED.

Outcomes