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
It
is
accessed through:
Processing > Attribute
Fill
> Raster to Vector...
Input Raster: select a raster
layer
where the statistics will be extracted.
Optionally, click on No Data Value and inform the pixel value that should not be considered in the calculus.
Input Vector: select the vector layer overlapping the raster.
Optionally, click on Only Selected
if some objects (polygons or cells of the vector layer) are selected in
the MAP DISPLAY. The Statistics will be calculated only for these
objects.
Iterator Strategy
Center of pixel: the pixel will be considered if its centroid is inside the object overlapping it.
Box of pixel: it will be considered only the intersection of the pixel bounding box and the object overlapping it.
GroupBox
Texture:
Read All:
Bands: Select one or more bands to apply the statistics select below.
Statistics: click over one or more statistics to select then.
NOTE: all statistics options will generate one attribute for each band, except Percentage of each class by area
Percentage of each class by area: it is recomended only for classified rasters, otherwise will generate 255 attributes for each band (one for each pixel value).
Inform the Output
Repository
by clicking on:
to
select the output
directory and also inform the new layer name to store the result, or
to select the Data
Source and inform the connection parameters
Inform the new Layer
Name
to store the result.
Click OK
to perform the
operation or Cancel
to close the interface.
NOTE: The
table bellow shows 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_').