Before tackling this tutorial, you will need to download and install a dataset following these instructions:
Create a folder called Symbolizing_rasters somewhere under your personal directory (e.g. C:\Users\jdoe\Documents\Tutorials\Symbolizing_rasters\).
Download the data for this exercise then extract the contents of Symbolizing_rasters.zip into your newly created Symbolizing_rasters folder.
The map consists of two raster layers: a continuous elevation raster and a discrete land/water raster.
When loading a raster, ArcGIS Pro will select a default symbology scheme that matches the raster data type. The elev.tif raster is saved as a float and stores a large range of unique pixel values. As such, the software will default to a stretched symbology using a sequential color scheme (here, it chose a grayscale color scheme).
In this exercise, you will learn how to modify the appearance of a raster layer when exploring a raster.
When exploring a raster layer at different zoom levels, you might find it useful to have the software make use of the full range of colors in the color scheme at any zoom level so as to distinguish as many different pixels as possible.
Zoom in somewhere on Africa's Western region.
In doing so, the map will appear uniform in color and individual pixels will be difficult to discern. This is because the range in values covered by this extent is small compared to the full range of values in the raster layer. This translates to a small range of usable colors (or shades of gray in our example) within this map extent.
While making sure that the elev.tif raster is still selected, click (enable) the DRA option under the Raster Layer tab.
You should now be able to make out some of the individual pixels in the Map's extent.
You can change how the range of pixel values in your raster are mapped to the color scheme. The default is Percent Clip. You can change the stretch type to modify the raster's "look". Here are a few examples:
None
Percent Clip
Standard Deviation
With the elev.tif raster selected in the Contents pane, open its symbology pane by clicking on Symbology under the Raster Layer tab.
To see how the raster's values are mapped to the range of colors, you can click on the Histogram icon to the right of the Stretch Type field.
If the software does not allow you to click on the histogram icon, or if you see the following message when hovering the cursor over the icon, you will need to (re)compute the raster statistics.
You have two options:
OPTION 1 (the quickest):
Click on the Classify option in the Primary Symbology pull-down menu. This will bring up a Warning window asking if you want to compute the histogram.
Click Yes.
Reselect the Stretch color scheme.
The histogram button should now be enabled
OPTION 2:
Open the Calculate Statistics geoprocessing tool.
Load the raster dataset. (There may not be a pulldown menu to select the layer from in which case you will need to load the raster via the small folder icon to the right of the field).
Click Run.
Once the statistic is recalculated, you might need to select a different symbology scheme such as Discrete, then switch back to Stretch to enable the histogram button.
The histogram window displays the distribution of raster values (x-axis). For example, if you select the Minimum Maximum stretch type, you will be presented with the following histogram.
The bottom axis displays the range of pixel values in the elev.tif raster and the y axis displays the frequency (number of pixels) associated with each pixel value interval.
You'll notice a diagonal dashed line in the plot. This defines the relationship between the range of available colors and the range of pixel values in the raster. Here, the diagonal dashed line indicates that the pixel values are mapped to each color following a linear relationship. For example, if the color scheme was made up of 100 unique colors and the raster pixel values ranged from 1 to 200, the raster value interval [1, 2] would be mapped to the first color, value interval [3, 4] would be mapped to the second color, this would continue to the last range of pixel values whereby the raster value interval of [199, 200] would be mapped to the 100th color.
You can change the mapping of the pixel values to the color values by moving the upper and/or lower limits. For example, you can move the upper limit down to around 3700 (this does not need to be exact) and the lower limit up to about -6500. Note that you can also type the values in the slider fields.
You will now see two histograms. The grey histogram shows the original distribution of pixel values. The red histogram shows the distribution that is actually being mapped to the full range of available colors. By sliding the upper and lower limits, we instructed the software to map all pixel values less than -6500 to a single color (the lowest color value) and all pixel values above 3700 to the maximum available color. This prevents a very small number of pixels in the upper and lower end of the range from hoarding so many individual colors.
You can click on the back arrow to return to the main Symbology window
You can apply a divergent (stretched) color scheme to a raster layer. For example, with the elevation raster, we can assign one hue for pixels whose values are less than 0 (water) and another hue for pixels whose values are greater than 0 (land).
Select a divergent color scheme. For example pick the Red-Yellow-Blue option from the Color scheme pull-down menu. This option is near the bottom of color schemes list.
We usually associate blue hues with water. If your reds were assigned to lower values and blues to upper values, you will need to swap the gradient such that reds are associated with higher values and blues with lower values.
If your blues are assigned to positive elevation values, you will inverse the colors (if not, ignore this step).
In the elev.tif layer's symbology pane, click on the Invert checkbox to swap the colors.
Divergent color schemes make the most sense when a central value is implied. With the elevation raster, a sensible central value is 0 where negative values (i.e. below mean sea levels) are associated with blue hues and positive value (i.e. above mean sea level) are associated with red hues.
The divergent color scheme would work well if the distribution of elevation values was symmetrical about 0, but it is not. This results in a few red pixels bleeding into the below mean sea level elevation.
The accompanying figure shows the coast of Florida where the land-water boundary is defined by a 0 meter contour line. Note the red hues for elevations below mean sea level.
Make sure that you are still using a stretch symbology.
Select the Minimum Maximum stretch type.
Under the Statistics tab, select Dataset or Manual.
Enable the Edit min/max values option.
Since the largest absolute value -10182, we will mirror this range on the positive side of the 0 value to ensure a balanced color scheme about the value of 0.
Set the min/max values to -10182 to 10182. Note that if you inverted the color scheme, the max value is the value to the left, and the min values is that to the right.
This works well where the land-water elevation gradient is great, but if the land-water elevation gradient is small, the lighter colors near the central value make it difficult to identify land/water interfaces in areas where the gradient is not as steep (e.g. Florida).
We will therefore modify the color scheme by creating an abrupt break in hues as shown in the accompanying image.
Click on the Color scheme pull-down button and select Format color scheme at the bottom of the pull-down menu.
At the bottom of the Color Scheme Editor window, select Multipart Color Scheme.
With Continuous Color Scheme selected from the sub-schemes pull-down menu, click on the Add button twice.
This will add two palettes to the scheme. The default colors shown here may not match those in your project. This is fine given that we will modify the palettes.
Click on the Edit button to the right of the first palette.
Click the left-most color stop on the color scale.
Click on the color pull-down menu and select a dark blue color such as Ultra Blue.
Likewise, click on the right-most color stop of the gradient and change its color to Sodalite Blue.
This color gradient will map the below mean-sea level values. Next, we'll modify the other color gradient.
Click on the back arrow.
Now, click on the Edit button for the second color scheme.
Set the left-most color stop to Topaz Sand.
Set the right-most color stop to Tuscan Red.
Click on the Back arrow to return to the Color Scheme Editor.
If you plan to reuse this color scheme in this project, it may be worthwhile to save it.
Click on Save to a style.
Name it land-water color scheme.
Click OK.
Click OK to return to the symbology pane.
Your new color scheme should now look something like this:
If the Invert box is checked, uncheck it.
The delineation between land and water should now be much clearer now that we have an abrupt break where the two hues converge.
The aforementioned works well when the range of colors cover a symmetrical distribution of values about the central value (the value of 0 in our working example). However, the elev.tif raster has value ranging from -10182 to 6821. We may, therefore, want to assign a wider range of blues to the interval [-10182,0[ than a range of reds for the [0, 6821] interval. In other words, we would might want to go from a symmetrical color palette (left palette in the accompanying figure) to an asymmetrical palette (right palette in the accompanying figure).
Click on the histogram button.
If the histogram button cannot be activated, the statistic needs to be recomputed. See the grey text box earlier in this tutorial for instructions on how to (re)compute raster statistics.
Make sure that stretch type is set to minimum-maximum.
Reset the range, if needed, by clicking on the Reset button.
Click on the back arrow to get back to the main Symbology window.
If you created the multipart color scheme outlined in the previous method, it should be present at the bottom of the color scheme pull-down menu.
If you saved it as a style, you may find the color scheme at the top of the list. If not, follow the instructions in the last subsection to create this color scheme.
With the multipart color scheme selected, click on the Format Color Scheme link at the bottom of the pull-down menu to bring up its Color Scheme Editor window.
You'll notice an arrow at the midpoint of the multipart color bar. This arrow (aka slider) can be moved to the right or to the left to re-center the sub-schemes' cutoff.
The elev.tif raster's values range from -10182 to 6821. The middle value is half way between the min/max values and can be calculated as (-10182 + 6821) / 2 = -1680. If the data were symmetrical about zero, the middle value would be 0. Here, the mid value is to the left of zero suggesting that we will need to move the slider to the right so that the blue hues can accommodate the full range of values between -10182 and 0.
To figure out by how much we need to move the slider to the right, divide the range of values that is to the right of the desired central value (6821 - 0) = 6821 by the full range of values. The full range of values covers the range -10182 to 6821. Mathematically, we are looking for absolute(min) to absolute(max) (i.e. we are not interested in the sign), so the range is 10182 + 6821 = 17003. We therefore need to move the slider 6821 / 17003 * 100 = 40.1% from the right most value.
Move the slider towards the red color. Unfortunately, the percentages are rounded to whole numbers. So, we will need to round the percent to 40%. This may not seem like a big deal, but the rounding error will be noticeable along coastal areas having a small elevation gradients such as Florida.
Click OK to accept the change.
Note how the gradient in the legend is shifted to reflect the shift in the multipart color scheme.
Also, note that because of the rounding imprecision in the last step, some below mean sea level pixels will be assigned a red hue.
If you do not see a clear delineation between the water-land pixels and, assuming that you carefully followed the instructions outlined above, you may need to fiddle with the slider bar a few times to get it to hit that 60%/40% marker exactly--even if the widget indicates that the 60%/40% marker is properly set. The following video clip shows an example where toggling back and forth between different values will eventually get you to the desired outcome.
Note that as of version 3.3 of ArcGIS Pro, getting that cut-off value exactly may prove illusive with this working example.
If the raster layer consists of values that represent categories, you can assign a unique color to each unique value in the raster. In the next example, we will work with the land_water.tif raster layer that consists of just two values: 0 for water and 1 for land.
Turn off the elev.tif raster layer in the Contents pane.
Select the land_water.tif raster layer.
Bring up its symbology pane.
Select Unique Values (this may already be the default).
Note that ArcGIS will usually default to a Unique Values symbology when it identifies a small set of unique, integer values.
Change the colors for each swatches by clicking on them individually. Choose a light shade of blue for water and a dark shade of green/blue for land. In this example, Sugilite Sky is chosen for water and Deflt Blue for land.
Next, change the labels from a numeric value to something more descriptive like Water and Land.
The new labels should now appear in the Contents pane.
Save your work.
This wraps up this tutorial.