set same symbology to multiple rasters

4959
5
06-13-2011 09:05 PM
SarahBurns
New Contributor
To visually assess hundreds of rasters I need to set each one with the same symbology. Is there a way to apply a particular symbology to multiple files without having to open each one up individually.
Any feedback will be greatly appreciated!!
0 Kudos
5 Replies
JohnMaclachlan
New Contributor
To visually assess hundreds of rasters I need to set each one with the same symbology. Is there a way to apply a particular symbology to multiple files without having to open each one up individually.
Any feedback will be greatly appreciated!!


This is tough to believe but I was just about to ask the same question. Is there a way to change the default so that all grd files open with a preset palette instead of simply stretched greyscale?
0 Kudos
JeffreySwain
Esri Regular Contributor
There are particular options to set the basic display of rasters, but for specific symbology you will have to create either a dummy file with all the possible values of all the rasters and then import the symbology.  If you are using 10, the properties options are here and then the options at 9.3.1 are here.

If you have a set of classifed values for rasters and want to see your data displayed correctly create a dummy raster with values that will always be valid. Otherwise the symbology will have issues when applied to data that does not fall within the parameters.  So if you are looking to display change in percent, be sure your dummy raster has values that span far outside the percentages that will appear in your data.  So if your data generally fluctuates between -20 % and 60% be sure to make a dummy raster with max and min values that are at least -40 % and 80%.
0 Kudos
JohnSobetzer
Frequent Contributor
I've used this in the past: http://arcscripts.esri.com/details.asp?dbid=13128 but I don't know if it works in 10.
0 Kudos
MarkEllis
New Contributor II
I just figured out a way to do this using an unmanaged raster catalog. As stated in the earlier replies, create a symbology (e.g. a color map) that will cover all possible values. Use a script to apply this to all the rasters. It can take a long time, but can run in the background while you get other things done.

I used the following simple script to apply a color map to a zillion grids within a workspace. Modify as needed:
## Add color map to DRGs
##====================================
import arcpy
from arcpy import env

 # Set workspace
arcpy.env.workspace = "C:/your_path_here"

 # Get list of grids
rasterList = arcpy.ListRasters("*", "All")

for raster in rasterList:
     
       # Assign colormap using clr file
       arcpy.AddColormap_management(raster, "#", "your_symbology_file.clr")
SarahBurns
New Contributor
excellent, thank you!
0 Kudos