Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

default symbology

$
0
0
Hi Folks,

The following arcpy script adds a raster image to the TOC:

Code:

import arcpy

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
r = arcpy.mapping.Layer('C:/myimage.sid')
arcpy.mapping.AddLayer(df, r, "TOP")

It adds images successfully but defaults them all to an unacceptable symbology.

Attachment 23085

Attachment 23086

Any suggestions on how to get the images to load with appropriate colors, i.e. grey scale or rgb?

Thanks,
Scott
Attached Thumbnails
Click image for larger version

Name:	sym.png‎
Views:	N/A
Size:	71.8 KB
ID:	23085   Click image for larger version

Name:	badcolor.jpg‎
Views:	N/A
Size:	128.6 KB
ID:	23086  

Viewing all articles
Browse latest Browse all 2485

Trending Articles