Attribute Fill => Raster to Vector

The Atribute Fill - Raster to Vector tool is used to extract statistics of a Raster Layer using a Vector Layer as reference. New attributes will be added to the vector layer and filled with those statistics. The vector layer can be a cellular space or any vector layer (polygons) overlapping the raster. For each cell or polygon of the vector layer, one attribute for each selected statistic will be created and filled. This process is performed for each selected band of the raster.

Raster without polygons overlapping Raster with polygons overlapping
Raster without polygons overlapping Raster with polygons overlapping

It is accessed through:

    Processing > 
Attribute Fill > Raster to Vector...
  1. Input Raster: select a raster layer where the statistics will be extracted. 
  2. Input Vector: select the vector layer overlapping the raster.
  3. Iterator Strategy: 
  4. Bands: Select one or more bands to apply the statistics select below.
  5. Statistics: click over one or more statistics to select then (see table bellow).
  6. Inform the Output Repository by clicking on:
  7. Click OK to perform the operation or Cancel to close the interface.
Statistics options
Statistics Attribute(s) prefixed by band B0, B1...
Overlapping geometry
Value B0_Value
Points/Polygons
Minimum value B0_Min_Val
Polygons
Maximum value B0_Max_Val
Polygons
Mean B0_Mean
Polygons
Sum of values B0_Sum
Polygons
Total number of values B0_Count
Polygons
Total not null values B0_Valid_Count
Polygons
Standard deviation B0_Standar
Polygons
Variance B0_Varianc Polygons
Skewness B0_Skewnes
Polygons
Kurtosis B0_Kustosi
Polygons
Amplitude B0_Amplitu
Polygons
Median B0_Median Polygons
Coefficient variation B0_Var_Coe Polygons
Mode B0_Mode Polygons
Percent of each class by area B0_<classNameX>  * Polygons
* It will create one attribute per class (per band). If the raster layer is not classified, it will gererate one attribute for each distinct pixel value. As as example, a raster file of 8 bits and 2 bands selected will generate all this attributes:  B0_0, B0_1,...,B0_255, B1_0, B1_1,...,B1_255.

NOTE: Check the results of a celular space (vector layer where the polygons are regular cells) overlapping a raster file with the following parameters:
            Bands:  (0,1)
            Statistics: Mininum Value, Maximun Value, Mean and Variance.
            Note that the attributes generated for each cell are prefixed by the band identification ('B0_'  and 'B1_').


Table with new attributes