Using the bit of code below adds the raster catalog footprint polygon layer.
mxd = arcpy.mapping.MapDocument("Current")
df = arcpy.mapping.ListDataFrames(mxd, "*")[0]
addOrtho2011 = arcpy.mapping.Layer(r"P:\Mapping\Data\Orthos.gdb\Orthos_2011")
arcpy.mapping.AddLayer(df, addOrtho2011, "TOP")
I can't figure out what else I have to do to add the actual ortho part of the raster catalog. Any suggestions?
Answer
Your raster catalog is displaying as a wireframe due to a setting on the layer properties which is described here.
This setting does not appear to be accessible to ArcPy so as a workaround you could change the scale after adding it so that it is under the threshold set.
However, I think a better solution is to check the box on the layer properties so that wireframes do not show at all (which will be unwise if too many) and then Save As layer File so that you can add the layer from a layer file as per the code example here.
No comments:
Post a Comment