AnsweredAssumed Answered

Automatically Import Raster Files

Question asked by sourav_164 on Jun 12, 2018
Latest reply on Jun 14, 2018 by sourav_164

I get around 100 raster satellite images each week. There is a script that takes a mosaic image of those raster images and processes it. However, the raster importing and the mosaicing is being done manually at this moment.

I got a python code that can import raster as a layer. Whenever the python code imports raster to ArcMap, the raster appears to have only one colour band rather than RGB(shown below).


When I import them manually, the raster imports in RGB format (shown below).


To import raster the following codes are being used :

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
addLayer = arcpy.mapping.Layer(r"E\PlabRaster\ned.tif")
arcpy.mapping.AddLayer(df, addLayer, "BOTTOM")

Is there any way that will let me import those rasters in RGB with a small python code?