To view and set the properties for a raster layer, double click on the layer name in the map legend, or right click on the layer name and choose Properties from the context menu. This will open the Raster Layer Properties dialog.
There are several tabs in the dialog:
Tip
Live update rendering
The Layer Styling Panel provides you with some of the common features of the Layer properties dialog and is a good modeless widget that you can use to speed up the configuration of the layer styles and automatically view your changes in the map canvas.
Note
Because properties (symbology, label, actions, default values, forms…) of embedded layers (see Nesting Projects) are pulled from the original project file and to avoid changes that may break this behavior, the layer properties dialog is made unavailable for these layers.
The Information tab is read-only and represents an interesting
place to quickly grab summarized information and metadata on the current layer.
Provided information are:
The Source tab displays basic information about the selected
raster, including:
Raster Layers - Source Properties Dialog
QGIS offers four different Render types. The renderer chosen is dependent on the data type.
With the multiband color renderer, three selected bands from the image will be rendered, each band representing the red, green or blue component that will be used to create a color image. QGIS automatically fetches Min and Max values for each band of the raster and scales the coloring accordingly. You can control the value ranges with the help of the Min/Max Value Settings section.
A Contrast enhancement method can also be applied to the values: ‘No enhancement’, ‘Stretch to MinMax’, ‘Stretch and clip to MinMax’ and ‘Clip to min max’.
Note
Contrast enhancement
When adding GRASS rasters, the option Contrast enhancement will always be set automatically to stretch to min max, regardless of if this is set to another value in the QGIS general options.
Raster Symbology - Multiband color rendering
Tip
Viewing a Single Band of a Multiband Raster
If you want to view a single band of a multiband image (for example, Red), you might think you would set the Green and Blue bands to Not Set. But this is not the correct way. To display the Red band, set the image type to Singleband gray, then select Red as the Gray band to use.
This is the standard render option for singleband files that already include a color table, where each pixel value is assigned to a certain color. In that case, the palette is rendered automatically. If you want to change colors assigned to certain values, just double-click on the color and the Select color dialog appears. Also, in QGIS it’s possible to assign a label to the color values. The label appears in the legend of the raster layer then.
This option can be used for rendering all raster bands using a palette, assigning a color to each unique raster value.
Raster Symbology - Paletted unique value rendering
This renderer allows you to render a single band layer with a Color gradient: ‘Black to white’ or ‘White to black’. You can define a range of values to color other than the default Min and Max values of the whole raster, thanks to the Min/Max Value Settings option.
Again, a Contrast enhancement method can be applied to the values: ‘No enhancement’, ‘Stretch to MinMax’, ‘Stretch and clip to MinMax’ and ‘Clip to min max’.
Raster Symbology - Singleband gray rendering
This is a render option for single-band files, including a continuous palette. You can also create individual color maps for the single bands here.
Raster Symbology - Singleband pseudocolor rendering
Using a Band of the layer and a values range, three types of color Interpolation are available:
The Color ramp drop down list lists the color ramp in your QGIS. You can add a new one, edit or save the one you changed. The name of the color ramp will be saved in the configuration and in the QML files.
The Label unit suffix is a label added after the value in the legend.
For the classification Mode ‘Equal interval’, you
only need to select the number of classes
and press
the button Classify.
In the case of the Mode
‘Continuous’, QGIS creates
classes automatically depending on the Min and Max.
The button Add values manually adds a value
to the individual color table. The button
Remove selected row
deletes a value from the individual color table. Double clicking on the value column
lets you insert a specific value. Double clicking on the color column opens the dialog
Change color, where you can select a color to apply on that value.
Further, you can also add labels for each color, but this value won’t be displayed
when you use the identify feature tool.
You can use the buttons Load color map from file or
Export color map to file to load an existing color table or to save the
defined color table for other sessions.
The Clip out of range values allows QGIS to not render pixel
greater than the Max value.
Render a band of the raster layer using hillshading.
Raster Symbology - Hillshade rendering
Options:
45°
).315°
).1
).off
).By default, QGIS reports the Min and Max values of the band(s) of the raster. A few very low and/or high values can have a negative impact on the rendering of the raster. The Min/Max Value Settings frame helps you control the values to render.
Raster Symbology - Min and Max Value Settings
Available options are:
2%
to 98%
, but can
be adapted manually.Calculations of the min and max values of the bands are made based on the:
Note
For some settings, you may need to press the Apply button of the layer properties dialog in order to display the actual min and max values in the widgets.
For every Band rendering, a Color rendering is possible.
You can also achieve special rendering effects for your raster file(s) using one of the blending modes (see Blending Modes).
Further settings can be made in modifying the Brightness, the Saturation and the Contrast. You can also use a Grayscale option, where you can choose between ‘By lightness’, ‘By luminosity’ and ‘By average’. For one hue in the color table, you can modify the ‘Strength’.
The Resampling option makes its appearance when you zoom in and out of an image. Resampling modes can optimize the appearance of the map. They calculate a new gray value matrix through a geometric transformation.
Raster Symbology - Color rendering and Resampling settings
When applying the ‘Nearest neighbour’ method, the map can have a pixelated structure when zooming in. This appearance can be improved by using the ‘Bilinear’ or ‘Cubic’ method, which cause sharp features to be blurred. The effect is a smoother image. This method can be applied, for instance, to digital topographic raster maps.
At the bottom of the Symbology tab, you can see a thumbnail of the layer, its legend symbol, and the palette.
QGIS has the ability to display each raster layer at a different transparency level.
Use the transparency slider
to indicate to what extent the underlying layers
(if any) should be visible through the current raster layer. This is very useful
if you like to overlay more than one raster layer (e.g., a shaded relief map
overlayed by a classified raster map). This will make the look of the map more
three dimensional.
Raster Transparency
Additionally, you can enter a raster value that should be treated as NODATA in the Additional no data value option.
An even more flexible way to customize the transparency can be done in the Custom transparency options section:
Use Transparency band to apply transparency on an entire band.
Provide a list of pixels to make transparent with the corresponding level of transparency:
As you can see, it is quite easy to set custom transparency, but it can be
quite a lot of work. Therefore, you can use the button
Export to file to save your transparency list to a file. The button
Import from file loads your transparency settings and
applies them to the current raster layer.
The Histogram tab allows you to view the distribution
of the bands or colors in your raster. The histogram is generated when you press the
Compute Histogram button. All existing bands will be displayed together.
You can save the histogram as an image with the
button.
At the bottom of the histogram, you can select a raster band in the drop-down
menu and Set min/max style for it.
The Prefs/Actions drop-down menu gives you advanced
options to customize the histogram:
Raster Histogram
In the Rendering tab, it’s possible to:
You can set the Maximum (inclusive) and Minimum
(exclusive) scale, defining a range of scale in which the layer will be
visible. Out of this range, it’s hidden. The
Set to current canvas scale button helps you use the current map
canvas scale as boundary of the range visibility.
See Scale Dependent Rendering for more information.
Raster Rendering
Large resolution raster layers can slow navigation in QGIS. By creating lower resolution copies of the data (pyramids), performance can be considerably improved, as QGIS selects the most suitable resolution to use depending on the level of zoom.
You must have write access in the directory where the original data is stored to build pyramids.
From the Resolutions list, select resolutions for which you want to create pyramid by clicking on them.
If you choose Internal (if possible) from the Overview format drop-down menu, QGIS tries to build pyramids internally.
Note
Please note that building pyramids may alter the original data file, and once created they cannot be removed. If you wish to preserve a ‘non-pyramided’ version of your raster, make a backup copy prior to building pyramids.
If you choose External and External (Erdas Imagine) the pyramids will
be created in a file next to the original raster with the same name and a
.ovr
extension.
Several Resampling methods can be used to calculate the pyramids:
Finally, click Build Pyramids to start the process.
Raster Pyramids
The Metadata tab provides you with options to create
and edit a metadata report on your layer. See vector layer metadata
properties for more information.
The Legend tab provides you with a list of widgets you can
embed within the layer tree in the Layers panel. The idea is to have a way to
quickly access some actions that are often used with the layer (setup
transparency, filtering, selection, style or other stuff…).
By default, QGIS provides transparency widget but this can be extended by plugins registering their own widgets and assign custom actions to layers they manage.
The QGIS Server tab displays a wealth of information about
the raster layer, including statistics about each band in the current raster layer.
From this tab, entries may be made for the Description,
Attribution, MetadataUrl and Properties.
In Properties, statistics are gathered on a ‘need to know’
basis, so it may well be that a given layer’s statistics have not yet been
collected.
QGIS Server in Raster Properties