17.1. Caixa de Diálogo de Propriedades do Raster
Para visualizar e definir as propriedades de uma camada raster, clique duas vezes no nome da camada na legenda do mapa ou clique com o botão direito do mouse no nome da camada e escolha Propriedades no menu de contexto. Isso abrirá a caixa de diálogo Propriedades da Camada Raster.
Existem várias guias na caixa de diálogo:
Symbology[1] |
||
Transparency[1] |
Histogram[1] |
|
External plugins[2] tabs |
[1] Also available in the Layer styling panel
[2] External plugins you install can optionally add tabs to this dialog. Those are not presented in this document. Refer to their documentation.
Dica
Renderização de atualização ao vivo
O Painel de Estilo de Camada fornece alguns dos recursos comuns da caixa de diálogo Propriedades da Camada e é um bom widget sem modelo que você pode usar para acelerar a configuração dos estilos de camada e visualizar suas alterações na tela do mapa.
Nota
Como as propriedades (simbologia, rótulo, ações, valores padrão, formulários…) das camadas incorporadas (veja Incorporando camadas de projetos externos) são extraídas do arquivo original do projeto, e para evitar alterações que possam quebrar esse comportamento, a caixa de diaĺogo das propriedades da camada fica indisponível para essas camadas.
17.1.1. Propriedades da informação
A guia Informações é somente leitura e representa um local interessante para obter rapidamente informações e metadados resumidos da camada atual. As informações fornecidas são:
general such as name in the project, source path, list of auxiliary files, last save time and size, the used provider
based on the provider of the layer: extent, width and height, data type, GDAL driver, bands statistics
o Sistema de Referência de Coordenadas: nome, unidades, método, precisão, referência (ou seja, se é estático ou dinâmico)
read from layer properties: 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, extents, links, contacts, history…
17.1.2. Propriedades de origem
A guia Fonte exibe informações básicas sobre o raster selecionado, incluindo:
o Nome da Camada para ser mostrado no Painel de Camadas;
the Coordinate Reference System: Displays the layer’s Coordinate Reference System (CRS). You can change the layer’s CRS, by selecting a recently used one in the drop-down list or clicking on the Select CRS button (see Seletor do Sistemas de Referência de Coordenadas). Use this process only if the layer CRS is a wrong or not specified. If you wish to reproject your data, use a reprojection algorithm from Processing or Save it as new dataset.
17.1.3. Propriedades da simbologia
A aba de simbologia da camada raster é composta de três seções diferentes:
The Band rendering where you can control the renderer type to use
The Layer rendering to apply effects on rendered data
The Resampling methods to optimize rendering on map
17.1.3.1. Representar a banda
QGIS offers many different Render types. The choice of renderer depends on the data type and the information you’d like to highlight.
Multiband color - if the file comes with several bands (e.g. a satellite image with several bands).
Paletted/Unique values - for single band files that come with an indexed palette (e.g. a digital topographic map) or for general use of palettes for rendering raster layers.
Singleband gray - (one band of) the image will be rendered as gray. QGIS will choose this renderer if the file is neither multiband nor paletted (e.g. a shaded relief map).
Singleband pseudocolor - this renderer can be used for files with a continuous palette or color map (e.g. an elevation map).
Hillshade - Creates hillshade from a band.
Contours - Generates contours on the fly for a source raster band.
Cor multibanda
With the multiband color renderer, three selected bands from the image will be used as the red, green or blue component of the 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 in the Min/Max Value Settings section.
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’.
Nota
Melhora do contraste
When adding GRASS rasters, the option Contrast enhancement will always be set automatically to stretch to min max, even if this is set to another value in the QGIS general options.
Dica
Visualizando uma única banda do Raster Multibanda
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 the preferred way of doing this is to set the image type to Singleband gray, and then select Red as the Gray band to use.
Paletted/Unique values
This is the standard render option for singleband files that include a color table, where a certain color is assigned to each pixel value. In that case, the palette is rendered automatically.
Pode ser usado para todos os tipos de bandas matriciais, atribuindo uma cor a cada valor matricial exclusivo.
If you want to change a color, just double-click on the color and the Select color dialog appears.
Também é possível atribuir etiquetas às cores. A etiqueta aparecerá então na legenda da camada matriz.
Right-clicking over selected rows in the color table shows a contextual menu to:
Change Color… for the selection
Change Opacity… for the selection
Change Label… for the selection
The pulldown menu, that opens when clicking the … (Advanced options) button below the color map to the right, offers color map loading (Load Color Map from File…) and exporting (Export Color Map to File…), and loading of classes (Load Classes from Layer).
Singleband gray
This renderer allows you to render a layer using only one band with a Color gradient: ‘Black to white’ or ‘White to black’. You can change the range of values to color (Min and Max) in the Min/Max Value Settings.
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’.
Pixels are assigned a color based on the selected color gradient and the layer’s legend (in the Layers panel and the layout legend item) is displayed using a continuous color ramp. Press Legend settings… if you wish to tweak the settings. More details at Customize raster legend.
Singleband pseudocolor
Esta é uma opção de renderização para arquivos de banda única que incluem uma paleta contínua. Você também pode criar mapas de cores para uma banda de uma matriz multibanda.
Using a Band of the layer and a values range, you can now interpolate and assign representation color to pixels within classes. More at Color ramp shader classification.
Pixels are assigned a color based on the selected color ramp and the layer’s legend (in the Layers panel and the layout legend item) is displayed using a continuous color ramp. Press Legend settings… if you wish to tweak the settings or instead use a legend with separated classes (and colors). More details at Customize raster legend.
Sombreamento do relevo
Render a band of the raster layer using hillshading.
Opções:
Band: The raster band to use.
Altitude: The elevation angle of the light source (default is
45°
).Azimuth: The azimuth of the light source (default is
315°
).Z Factor: Scaling factor for the values of the raster band (default is
1
).Multidirectional: Specify if multidirectional hillshading is to be used (default is
off
).
Contornos
This renderer draws contour lines that are calculated on the fly from the source raster band.
Opções:
Input band: the raster band to use.
Contour interval: the distance between two consecutive contour lines
Contour symbol: the symbol to apply to the common contour lines.
Index contour interval: the distance between two consecutive index contours, that is the lines shown in a distinctive manner for ease of identification, being commonly printed more heavily than other contour lines and generally labeled with a value along its course.
Index contour symbol: the symbol to apply to the index contour lines
Input downscaling: Indicates by how much the renderer will scale down the request to the data provider (default is
4.0
).For example, if you generate contour lines on input raster block with the same size as the output raster block, the generated lines would contain too much detail. This detail can be reduced by the “downscale” factor, requesting lower resolution of the source raster. For a raster block 1000x500 with downscale 10, the renderer will request raster 100x50 from provider. Higher downscale makes contour lines more simplified (at the expense of losing some detail).
Configuração dos valores mínimo e máximo
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 rendering.
As opções disponíveis são:
User defined: The default Min and Max values of the band(s) can be overridden
Cumulative count cut: Removes outliers. The standard range of values is
2%
to98%
, but it can be adapted manually.Min / max: Uses the whole range of values in the image band.
Mean +/- standard deviation x: 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 layer that impact the rendering of the raster negatively.
Os cálculos dos valores mínimo e máximo das bandas são feitos com base em:
Statistics extent: it can be Whole raster, Current canvas or Updated canvas. Updated canvas means that min/max values used for the rendering will change with the canvas extent (dynamic stretching).
Accuracy, which can be either Estimate (faster) or Actual (slower).
Nota
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.
Color ramp shader classification
This method can be used to classify and represent scalar dataset (raster or mesh contour) based on their values. Given a color ramp and a number of classes, it generates intermediate color map entries for class limits. Each color is mapped with a value interpolated from a range of values and according to a classification mode. The scalar dataset elements are then assigned their color based on their class.
A Min and Max values must be defined and used to interpolate classes bounds. By default QGIS detects them from the dataset but they can be modified.
The Interpolation entry defines how scalar elements are assigned their color :
Discrete (a
<=
symbol appears in the header of the Value column): The color is taken from the closest color map entry with equal or higher valueLinear: The color is linearly interpolated from the color map entries above and below the pixel value, meaning that to each dataset value corresponds a unique color
Exact (a
=
symbol appears in the header of the Value column): Only pixels with value equal to a color map entry are applied a color; others are not rendered.
The Color ramp widget helps you select the color ramp to assign to the dataset. As usual with this widget, you can create a new one and edit or save the currently selected one. The name of the color ramp will be saved in the configuration.
The Label unit suffix adds a label after the value in the legend, and the Label precision controls the number of decimals to display.
The classification Mode helps you define how values are distributed across the classes:
Equal interval: Provided the Number of classes, limits values are defined so that the classes all have the same magnitude.
Continuous: Classes number and color are fetched from the color ramp stops; limits values are set following stops distribution in the color ramp.
Quantile: Provided the Number of classes, limits values are defined so that the classes have the same number of elements. Not available with mesh layers.
You can then Classify or tweak the classes:
The button Remove selected row deletes selected values from the table.
Um duplo clique na coluna Valor permite modificar o valor da classe.
Double clicking in the Color column opens the dialog Change color, where you can select a color to apply for that value.
Double clicking in the Label column to modify the label of the class, but this value won’t be displayed when you use the identify feature tool.
Right-clicking over selected rows in the color table shows a contextual menu to Change Color… and Change Opacity… for the selection.
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 color table for later use.
Com Interpolação linear, você também pode configurar:
Clip out of range values: By default, the linear method assigns the first class (respectively the last class) color to values in the dataset that are lower than the set Min (respectively greater than the set Max) value. Check this setting if you do not want to render those values.
Legend settings, for display in the Layers panel and the layout legend item. More details at Customize raster legend.
Customize raster legend
When applying a color ramp to a raster or a mesh layer, you may want to display a legend showing the classification. By default, QGIS displays a continuous color ramp with min and max values in the Layers panel and the layout legend item. This can be customized using the Legend settings button in the classification widget.
In this dialog, you can set whether to Use continuous legend: if unchecked, the legend displays separated colors corresponding to the different classes applied. This option is not available for raster singleband gray symbology.
Checking the Use continuous legend allows you to configure both the labels and layout properties of the legend.
Etiquetas
Add a Prefix and a Suffix to the labels
Modify the Minimum and a Maximum values to show in the legend
Customize the Number format
Customize the Text format to use in the print layout legend.
Layout
Control the Orientation of the legend color ramp; it can be Vertical or Horizontal
Control the Direction of the values depending on the orientation:
If vertical, you can display the Maximum on top or the Minimum on top
If horizontal, you can display the Maximum on right or the Minimum on right
17.1.3.2. Renderização da camada
Over the symbology type applied to the layer band(s), you can achieve special rendering effects for the whole raster file(s):
Use one of the blending modes (see Modos de Mistura)
Set custom Brightness, Saturation, Gamma and Contrast to colors.
With the Invert colors, the layer is rendered with opposite colors. Handy, for example, to switch out-of-the box OpenStreetMap tiles to dark mode.
Turn the layer to Grayscale option either ‘By lightness’, ‘By luminosity’ or ‘By average’.
Colorize and adjust the Strength of Hue in the color table
Press Reset to remove any custom changes to the layer rendering.
17.1.3.3. Reamostragem
The Resampling option has effect 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.
Ao aplicar o método ‘Vizinho mais próximo’, o mapa pode obter uma estrutura pixelizada ao aumentar o zoom. Essa aparência pode ser melhorada usando o método ‘Bilinear’ ou ‘Cúbico’, que faz com que as bordas nítidas fiquem desfocadas. O efeito é uma imagem mais suave. Este método pode ser aplicado, por exemplo, a mapas matriciais topográficos digitais.
Early resampling: allows to calculate the raster rendering at the provider level where the resolution of the source is known, and ensures a better zoom in rendering with QGIS custom styling. Really convenient for tile rasters loaded using an interpretation method.
17.1.4. Propriedades de Transparência
QGIS provides capabilities to set the transparency level of a raster layer.
Use the Global opacity slider to set to what extent the underlying layers (if any) should be visible through the current raster layer. This is very useful if you overlay raster layers (e.g., a shaded relief map overlayed by a classified raster map). This will make the look of the map more three dimensional. The opacity of the raster can be data-defined, and vary e.g. depending on the visibility of another layer, by temporal variables, on different pages of an atlas, …
With No data value QGIS reports the original source no data value (if defined) which you can consider as is in the rendering. Additionally, you can enter a raster value that should be treated as an Additional no data value. The Display no data as color selector allows you to apply a custom color to no data pixels, instead of the default transparent rendering.
An even more flexible way to customize the transparency is available in the Custom transparency options section:
Use Transparency band to apply transparency for an entire band.
Fornecer uma lista de pixels para tornar transparente com os níveis correspondentes de transparência:
Click the Add values manually button. A new row will appear in the pixel list.
Inserir os valores Vermelho, Verde e Azul do pixel e ajustar Porcentagem transparente para aplicar.
Alternatively, you can fetch the pixel values directly from the raster using the Add values from display button. Then enter the transparency value.
Repetir as etapas para ajustar mais valores com transparência personalizada.
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 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.
17.1.5. Propriedades do Histograma
The Histogram tab allows you to view the distribution of the values 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:
With the Visibility option, you can display histograms for individual bands. You will need to select the option 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 have changed the min or max values of the band(s).
17.1.6. Propriedades de Renderização
In the Rendering tab, it’s possible to:
set Scale dependent visibility for the layer: You can set the Maximum (inclusive) and Minimum (exclusive) scale, defining a range of scales in which the layer will be visible. It will be hidden outside this range. The Set to current canvas scale button helps you use the current map canvas scale as a boundary. See Visibility Scale Selector for more information.
Nota
You can also activate scale dependent visibility on a layer from within the Layers panel: right-click on the layer and in the contextual menu, select Set Layer Scale Visibility.
Refresh layer at interval (seconds): set a timer to automatically refresh individual layers. Canvas updates are deferred in order to avoid refreshing multiple times if more than one layer has an auto update interval set.
17.1.7. Propriedades Temporais
The Temporal tab provides options to control the rendering of the layer over time. Such dynamic rendering requires the temporal navigation to be enabled over the map canvas.
Check the Dynamic Temporal Control option and set whether the layer redraw should be:
Automatic: the rendering is controlled by the underlying data provider if it suppports temporal data handling. E.g. this can be used with WMS-T layers or PostGIS rasters.
Fixed time range: only show the raster layer if the animation time is within a Start date and End date range
Redraw layer only: the layer is redrawn at each new animation frame. It’s useful when the layer uses time-based expression values for renderer settings (e.g. data-defined renderer opacity, to fade in/out a raster layer).
17.1.8. Elevation Properties
The Elevation tab provides options to control the layer elevation properties within a 3D map view and its appearance in the profile tool charts. Specifically, you can set:
Represents Elevation Surface: whether the raster layer represents a height surface (e.g DEM) and the pixel values should be interpreted as elevations. Check this option if you want to display a raster in an elevation profile view. You will also need to fill in the Band to pick values from and can apply a Scale factor and an Offset.
Profile Chart Appearance: controls the rendering Style the raster elevation will use when drawing a profile chart. It can be set as:
a profile Line with a line style applied
a surface with Fill below and a corresponding fill style
17.1.9. Propriedades das Pirâmides
High 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 zoom level.
Você deve pode ter direito de gravação no diretório onde os dados originais são armazenados para construir pirâmides.
From the Resolutions list, select resolutions at which you want to create pyramid levels by clicking on them.
If you choose Internal (if possible) from the Overview format drop-down menu, QGIS tries to build pyramids internally.
Nota
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 pyramid building.
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 for pyramid calculation:
Vizinho mais próximo
Média
Gauss
Cúbico
Cubic Spline
Laczos
Modo
Nenhum
Finally, click Build Pyramids to start the process.
17.1.10. Propriedades dos Metadados
The Metadata tab provides you with options to create and edit a metadata report on your layer. See Metadados for more information.
17.1.11. Propriedades da legenda
The Legend tab provides you with advanced settings for the Layers panel and/or the print layout legend. These options include:
Depending on the symbology applied to the layer, you may end up with several entries in the legend, not necessarily readable/useful to display. The Legend placeholder image helps you select an image for replacement, displayed both in the Layers panel and the print layout legend.
The Embedded widgets in Legend 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 a transparency widget but this can be extended by plugins that register their own widgets and assign custom actions to layers they manage.
17.1.12. Propriedades do Servidor QGIS
The QGIS Server tab helps you configure settings of the data when published by QGIS Server. The configuration concerns:
Description: provides information to describe the data, such as Short name, Title, Summary, a List of Keywords, and a Data URL whose Type can be in
text/html
,text/plain
orapplication/pdf
.Attribution: a Title and URL to identify who provides the data
Metadata URL: a list of URL for the metadata that can be of
FGDC
orTC211
Type, and intext/plain
ortext/xml
FormatLegend URL: a URL for the legend, in either
image/png
orimage/jpeg
Format
Nota
When the raster layer you want to publish is already provided by a web service, further properties are available for setting.