Docs in progress for ‘QGIS testing’. Visit https://docs.qgis.org/2.18 for QGIS 2.18 docs and translations.

Raster Properties Dialog

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 (see figure_raster_properties).

There are several tabs in the dialog:

  • metadata Information
  • system Source
  • symbology Symbology
  • transparency Transparency
  • rasterHistogram Histogram
  • rendering Rendering
  • pyramids Pyramids
  • editMetadata Metadata
  • legend Legend
  • overlay QGIS Server
../../../_images/rasterPropertiesDialog.png

Raster Layers Properties 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.

Information Properties

The metadata Information tab is read-only and represents an interesting place to quickly grab summarized information and metadata on the current layer. Provided information are:

  • based on the provider of the layer (format of storage, path, data type, extent, width/height, compression, pixel size, statistics on bands, number of columns, rows and no-data values of the raster…);
  • picked from the filled metadata: access, links, contacts, history… as well as data information (CRS, Extent, bands…).

Source Properties

The system Source tab displays basic information about the selected raster, including:

  • the Layer name to display in the Layers Panel;
  • setting the Coordinate Reference System: Displays the layer’s Coordinate Reference System (CRS) as a PROJ.4 string. You can change the layer’s CRS, selecting a recently used one in the drop-down list or clicking on setProjection Select CRS button (see Coordinate Reference System Selector). Use this process only if the CRS applied to the layer is a wrong one or if none was applied. If you wish to reproject your data into another CRS, rather use layer reprojection algorithms from Processing or Save it into another layer.

Symbology Properties

Band rendering

QGIS offers four different Render types. The renderer chosen is dependent on the data type.

  1. Multiband color - if the file comes as a multiband with several bands (e.g., used with a satellite image with several bands).
  2. Paletted - if a single band file comes with an indexed palette (e.g., used with a digital topographic map).
  3. Singleband gray - (one band of) the image will be rendered as gray; QGIS will choose this renderer if the file has neither multibands nor an indexed palette nor a continuous palette (e.g., used with a shaded relief map).
  4. Singleband pseudocolor - this renderer is possible for files with a continuous palette, or color map (e.g., used with an elevation map).

Multiband color

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. You can choose several Contrast enhancement methods: ‘No enhancement’, ‘Stretch to MinMax’, ‘Stretch and clip to MinMax’ and ‘Clip to min max’.

../../../_images/rasterMultibandColor.png

Raster Symbology - Multiband color rendering

This selection offers you a wide range of options to modify the appearance of your raster layer. First of all, you have to get the data range from your image. This can be done by choosing the Extent and pressing Load. QGIS can radioButtonOn Estimate (faster) the Min and Max values of the bands or use the radioButtonOff Actual (slower) Accuracy.

Now you can scale the colors with the help of the Load min/max values section. A lot of images have a few very low and high data. These outliers can be eliminated using the radioButtonOn Cumulative count cut setting. The standard data range is set from 2% to 98% of the data values and can be adapted manually. With this setting, the gray character of the image can disappear. With the scaling option radioButtonOff Min/max, QGIS creates a color table with all of the data included in the original image (e.g., QGIS creates a color table with 256 values, given the fact that you have 8 bit bands). You can also calculate your color table using the radioButtonOff Mean +/- standard deviation x selectNumber. Then, only the values within the standard deviation or within multiple standard deviations are considered for the color table. This is useful when you have one or two cells with abnormally high values in a raster grid that are having a negative impact on the rendering of the raster.

All calculations can also be made for the radioButtonOff Current extent.

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 band to use for Gray.

Paletted

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.

../../../_images/rasterPaletted.png

Raster Symbology - Paletted Rendering

Contrast enhancement

Note

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.

Singleband gray

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 Min and a Max value by choosing the Extent first and then pressing Load. QGIS can radioButtonOn Estimate (faster) the Min and Max values of the bands or use the radioButtonOff Actual (slower) Accuracy.

../../../_images/rasterSingleBandGray.png

Raster Symbology - Singleband gray rendering

With the Load min/max values section, scaling of the color table is possible. Outliers can be eliminated using the radioButtonOn Cumulative count cut setting. The standard data range is set from 2% to 98% of the data values and can be adapted manually. With this setting, the gray character of the image can disappear. Further settings can be made with radioButtonOff Min/max and radioButtonOff Mean +/- standard deviation x selectNumber. While the first one creates a color table with all of the data included in the original image, the second creates a color table that only considers values within the standard deviation or within multiple standard deviations. This is useful when you have one or two cells with abnormally high values in a raster grid that are having a negative impact on the rendering of the raster.

Singleband pseudocolor

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.

../../../_images/rasterSingleBandPseudocolor.png

Raster Symbology - Singleband pseudocolor rendering

Three types of color interpolation are available:

  1. Discrete
  2. Linear
  3. Exact

You can choose the band on which QGIS will render the layer, then define a Min and Max value.

Defining Min/Max values can be done with the help of the Load min/max values section. A lot of images have a few very low and high data. These outliers can be eliminated using the radioButtonOn Cumulative count cut setting. The standard data range is set from 2% to 98% of the data values and can be adapted manually.

With this setting, the gray character of the image can disappear. With the scaling option radioButtonOn Min/max, QGIS creates a color table with all of the data included in the original image (e.g., QGIS creates a color table with 256 values, given the fact that you have 8 bit bands). You can also calculate your color table using the radioButtonOn Mean +/- standard deviation x selectNumber. Then, only the values within the standard deviation or within multiple standard deviations are considered for the color table.

In the next part, Interpolation allows you to choose which interpolation mode to use between:

  • Discrete (a <= symbol appears in the value column);
  • Linear;
  • Exact (an equal symbol appears in the Value column);

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 selectString ‘Equal interval’, you only need to select the number of classes selectNumber and press the button Classify. In the case of the Mode selectString ‘Continuous’, QGIS creates classes automatically depending on the Min and Max.

The button signPlus Add values manually adds a value to the individual color table. The button signMinus 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 fileOpen Load color map from file or fileSaveAs Export color map to file to load an existing color table or to save the defined color table for other sessions.

The checkbox Clip out of range values allows QGIS to not render pixel greater than the Max value.

Color rendering

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’.

Resampling

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.

../../../_images/rasterRenderAndRessampling.png

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.

Transparency Properties

transparency QGIS has the ability to display each raster layer at a different transparency level. Use the transparency slider 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.

../../../_images/rasterTransparency.png

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:

    1. Click the signPlus Add values manually button. A new row will appear in the pixel list.
    2. Enter the Red, Green and Blue values of the pixel and adjust the Percent Transparent to apply.
    3. Alternatively, you can directly fetch the pixel values directly from the raster using the contextHelp Add values from display button. Then enter the transparency value.
    4. Repeat the steps to adjust more values with custom transparency.
    5. Press the Apply button and have a look at the map.

    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 fileSave Export to file to save your transparency list to a file. The button fileOpen Import from file loads your transparency settings and applies them to the current raster layer.

Histogram Properties

The rasterHistogram 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 fileSave 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 actionRun Prefs/Actions drop-down menu gives you advanced options to customize the histogram:

  • With the Visibility option, you can display histograms of the individual bands. You will need to select the option radioButtonOff Show selected band.
  • The Min/max options allow you to ‘Always show min/max markers’, to ‘Zoom to min/max’ and to ‘Update style to min/max’.
  • The Actions option allows you to ‘Reset’ or ‘Recompute histogram’ after you changed the min or max values of the band(s).
../../../_images/rasterHistogram.png

Raster Histogram

Rendering Properties

In the rendering Rendering tab, it’s possible to:

  • apply a Scale dependent visibility to the layer: 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 mapIdentification 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.
  • Refresh layer at interval (seconds): set a timer to automatically refresh individual layers at a matching interval. Canvas updates are deferred in order to avoid refreshing multiple times if more than one layer has an auto update interval set.

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 mapIdentification 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.

Pyramids Properties

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:

  • Nearest Neighbour
  • Average
  • Gauss
  • Cubic
  • Cubic Spline
  • Laczos
  • Mode
  • None

Finally, click Build Pyramids to start the process.

../../../_images/rasterPyramids.png

Raster Pyramids

Metadata Properties

The editMetadata Metadata tab provides you with options to create and edit a metadata report on your layer. See vector layer metadata properties for more information.

Legend Properties

The legend 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.

QGIS Server Properties

The overlay 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.

../../../_images/rasterMetadata.png

QGIS Server in Raster Properties