3.4.5.9. Edit raster

_images/edit_raster_tab.jpg

edit_raster 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.1. Edit raster

  • Select the input raster input_list: select a raster (already loaded in QGIS);
  • reload: refresh layer list;

3.4.5.9.2. Edit raster values

  • radiobutton Edit values using ROI polygons: if checked, raster is edited using temporary ROI polygons in the map;
  • radiobutton Edit values using a vector input_list: if checked, raster is edited using all the polygons of selected vector;
  • reload: refresh layer list;

3.4.5.9.3. Edit options

  • checkbox Use the value field of the vector input_list: if checked, raster is edited using the selected vector (in Edit values using a vector) and the polygon values of selected vector field;
  • checkbox Use constant value input_number: if checked, raster is edited using the selected constant value;
  • checkbox Use expression input_text: if checked, raster is edited according to the entered expression; the expression must contain one or more where; accepted variable are raster representing the input raster value and vector representing the vector value if selected; the following example expression where(raster == 1, 2, raster) is already entered, which sets 2 where raster equals 1, and leaves unchanged the values where raster is not equal to 1;
  • undo_edit_raster: undo the last raster edit (available only when using ROI polygons);
  • RUN run: edit the raster;