Raster display symbology

Discussion created by karigunnarsson on Jan 12, 2011
Im have been looking for the commands to alter my raster display symbology at my Layer (.lyr) before I insert it to the .mxd and export it as .pdf I have been looking to chanse it to classified with no sucsess.

raster_layer_adress = r"C:\gis\raster.lyr"
mxd_adress = r"C:\gis\map.mxd"
pdf_out = r"c:\gis\map_with_raster.pdf"
raster_layer = arcpy.mapping.Layer(raster_layer_adress)

#missing command to classify the display of the Raster layer.

mxd = arcpy.mapping.MapDocument(mxd_adress)
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
refLayer = arcpy.mapping.ListLayers(df)[0]
arcpy.mapping.InsertLayer(df, refLayer, raster_layer, "AFTER")
arcpy.mapping.ExportToPDF(mxd, pdf_out)

-- edit:

What I think I need is to calculate the Histogram, then turn the display to classified mode. I have no idea how I can do this. Dose anyone here have experience with this?