Hi, I am working with a simple script that imports geo-referenced rasters corresponding to selected polygons in a featureclass layer. The rasters import just fine, but the issue is that they import as single band streched rasters and I have to go into the layer symbology tab under properties and then change the imported rasters to RGB composite individually. Does anyone have any idea how I could skip that manual step and code for this to happen automatically? The relevant code snippet looks like this:
- #Fetch selected rasters and add to current map document, first data frame
- mxd = arcpy.mapping.MapDocument("CURRENT")
- df = arcpy.mapping.ListDataFrames(mxd, "*")[0]
- arcpy.AddMessage(len(docs))#DEBUG#
- for i, page in enumerate(docs):
- arcpy.AddMessage(i)
- newlayer = arcpy.mapping.Layer(page)
- arcpy.mapping.AddLayer(df,newlayer, "TOP")
Thank you!