ApplySymbologyFromLayer Not Working for Raster Mosaic Dataset

Discussion created by jonmulder on Jan 7, 2014
Latest reply on Jan 9, 2014 by Wayne_Whitley
I am thoroughly flummoxed with this issue!

I've created a set of daily surfaces representing groundwater levels.  I want to step through them in time (i.e., make them time-enabled).  I found a good site ( ) that essentially said to create a raster mosaic dataset, add all my daily surfaces, and create a field that represents the date.  That works great!

Now, I want to color-ramp the mosaic dataset.  I'm able to do that and have saved it as a layer file.

The code below crashes when I try to apply the saved layer file to my surface raster mosaic dataset, saying

"ERROR 000968: The symbol layer does not match the input layer

Ultimately, I'll want to re-classify the raster because different datasets will have different min/max values.

Any ideas?

Jon Mulder

import arcpy
import arcpy.mapping
import datetime
import os

##Reference the Current map document.
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
GeoDatabaseNameAndLocation = "G:\Documents\GIS\HydstraData\HydstraMeasurementsDeep\Contours_Daily_20130601_20130605.gdb"
LayerFileNameAndLocation_WSE_Surface = "G:\Documents\GIS\HydstraData\Template_WSE_Surface.lyr"
CurrentSurface = os.path.join(GeoDatabaseNameAndLocation,"WSE_RasterMosaicDataset")
Surface_lyr = arcpy.mapping.Layer(CurrentSurface)
arcpy.mapping.AddLayer(df, Surface_lyr, "BOTTOM")

=====Error Message======================================
Executing: AddRaster
Start Time: Tue Jan 07 10:22:53 2014
Running script AddRaster...

Traceback (most recent call last):
  File "G:\Documents\GIS\HydstraData\", line 16, in <module>
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\", line 5754, in ApplySymbologyFromLayer
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000968: The symbol layer does not match the input layer
Failed to execute (ApplySymbologyFromLayer).

Failed to execute (AddRaster).
Failed at Tue Jan 07 10:22:58 2014 (Elapsed Time: 4.64 seconds)