3.4.5.9. Edit raster¶
This tab allows for the direct editing of pixel values in a raster. Only pixels beneath ROI polygons or vector polygons are edited.
WARNING: the input raster is directly edited; it is recommended to create a backup copy of the input raster before using this tool in order to prevent data loss.
This tool can rapidly edit large rasters, especially when editing polygons are small, because pixel values are edited directly. In addition, the SCP Edit Toolbar is available for easing the raster editing using multiple values.
3.4.5.9.3. Edit options¶
Use the value field of the vector
: if checked, raster is edited using the selected vector (in Edit values using a vector) and the polygon values of selected vector field;
Use constant value
: if checked, raster is edited using the selected constant value;
Use expression
: if checked, raster is edited according to the entered expression; the expression must contain one or more
where
; accepted variable areraster
representing the input raster value andvector
representing the vector value if selected; the following example expressionwhere(raster == 1, 2, raster)
is already entered, which sets 2 whereraster
equals 1, and leaves unchanged the values whereraster
is not equal to 1;: undo the last raster edit (available only when using ROI polygons);
- RUN
: edit the raster;