15

I have a series of continuous rasters representing the same phenomenon over time, so I need to use the same symbology across them all.

So I set the stretched symbology of the first raster, with a color ramp from the min/max values:

enter image description here

Now in the second raster, I import the symbology from the first raster. Unfortunately, although the labels match, the actual min/max values are not the same as the first layer:

enter image description here

So the red in the second raster corresponds to a value of 0.47, rather than 0.66.

How can I ensure that both rasters are using a consistent symbology?

17

Many thanks to @Erica for the reply, which for some reason didn't work for me.

But it did put me on the right track to finding a solution, which was to use the Minimum/Maximum Stretch, in combination with the Edit High/Low Values option:

enter image description here

Importing this symbology into the other rasters caused the correct stretch to be applied to all images.

  • I'm running into this same problem today. Did you also use the custom settings for the Statistics, or did you use just leave it on the default? – Devdatta Tengshe Apr 2 '14 at 7:50
  • 1
    This is the straightforward and most simple way to go. @Devdatta Tengshe: There is no need to use the Custom Settings in combination with Minimum-Maximum stretch and edited High/Low Values. Minimum-Maximum stretch is always linear (unless an additional Gamma Stretch is applied), and edited High/Low values override the Custom statistics. – lavarider Apr 2 '14 at 9:02
  • 1
    Awesome, I learned an easier way :) – Erica Apr 2 '14 at 14:13
  • I also just ran into this problem! This solution is great, but it would be even better if the link between layers were dynamic; if you set colours based on the raster with the largest range, but find that some rasters with a small range look "washed out", then you'll want to tweak the min/max a bit. However, when you do that, the other ramps don't update dynamically, and you end up having to go through the whole process of setting each layer's symbology again. Is anyone aware of a way to preserve a dynamic symbology link? – Keegan Smith Nov 28 '17 at 21:38
5

Right click on the raster layer in the TOC and select "Save As Layer File". Add your other raster to map, go to Layer Properties - Symbology tab, click import, find the saved layer file. Alternatively, you can apply the symbology of any raster in your map document to any other raster in your document by also clicking import but selecting the source raster symbology from the list.

EDIT: The values you are seeing in your screen shot #2 are the minimum and maximum values of the raster whose symbology you are trying to match to the one of your original raster. (If you check the properties - source tab - scroll down to statistic - Min and Max - these values are the same as those being reported on the symbology tab.

In order for all symbology to match, all rasters values have to fall within the same range of the symbology.

Design your symbology with a range that can accommodate ALL your rasters. In your case of the 2 rasters you showed: High: 0.66196 Low: 0140288 (High from raster 1 and low from raster 2). To do this, you have to change the Stretch Type to Minimum-Maximum. Once you do so, you will be edit the High and Low values of your desired symbology then save it as a layer file. If all your rasters fall withing the range you specified, and you apply the same layer file to all, the symbology will match.

I've been doing something similar with aerial imagery RGB Composite tiles but have just tested is with 2 completely different rasters; Land Information Ontario DEM version 2 20m resolution and Province wide SMRT3 DEM (90m resolution) and the symbologies match as expected.

FIGURE 1: Assume I already tweaked and saved a layer file to a min-max range i wanted (high 600, low 300). Here I am adding a new DEM raster of diferent dimensions and resolution but whose min, max range falls withing the symbology range: enter image description here

After you load the symbology into this raster: enter image description here

And here is how they match - you can't see where one DEM ends and the other begins, only that the cells are larger in the one compared to the other:

enter image description here

  • 1
    Thanks for the tip - however, this is what I was doing in the second screenshot of the original post, where you can see the max value of the ramp doesn't match that of the label. – Stephen Lead Apr 2 '14 at 2:36
  • 1
    @StephenLead - I added more info to my answer. – Jakub Sisak GeoGraphics Apr 2 '14 at 14:03
5

To apply the Layer file with python for all rasters with a certain name one could use:

# read in mxd file
mxd=arcpy.mapping.MapDocument(r"Path_To_MXD_File")

# read in all rasters in the mxd which have names starting with "test"
rasters=arcpy.mapping.ListLayers(mxd,"test*") 

# apply the symbology lyr file to the rasters
for r in rasters:

     arcpy.ApplySymbologyFromLayer_management(r,r"Path_To_Lyr_File")
3

Great question -- I needed to do something similar recently, and it is well-hidden! In the Symbology dialog that you show above, you need to scroll down. That will bring you to the "Stretch" dialog.

Tscroll down to find histogram specifics

By default, ArcMap will analyze the histogram and come up with its own best fit based on the statistics of a specific image. This optimizes the color ramp for each image, but isn't what you want -- you want ONE ramp for MANY images. Choose Type "Custom" and Statistics "From Custom Settings (below)", then enter values which cover the full min-max range of your rasters.

  • Thanks, this looks to be just what I need. Unfortunately I'm finding that it doesn't actually seem to work - although the range in the Symbology dialog now correctly shows the new min/max, the symbols on the map are unchanged (0.47 is still red). I'll test it some more then log a support call if necessary. – Stephen Lead Apr 1 '14 at 21:58

protected by Aaron Sep 10 '17 at 16:49

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.