reclassification_tool Reclassification

This tab allows for the reclassification (i.e. assigning a new class code to raster pixels). In particular, it eases the conversion from C ID to MC ID values.

This tool supports virtual raster output; if the output file name ends with .vrt then the output is created as virtual raster composed of as many .tif files as the number of CPU threads defined in System; for large rasters this can speed up the process. Reclassification

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

  • checkbox calculate C ID to MC ID values: if checked, the reclassification table is filled according to the ROI & Signature list when Calculate unique values enter is clicked;

  • Calculate unique values enter: calculate unique values in the classification and fill the reclassification table;

  • Incremental new values enter: calculate a new incremental value (e.g. 1, 2, 3, …) for every old value and fill the reclassification table;

  • input_table Values: table containing the following fields;
    • Old value: set the expression defining old values to be reclassified; Old value can be a value or an expressions defined using the variable name raster (custom names can be defined in Variable name for expressions ), following Python operators (e.g. raster > 3 select all pixels having value > 3 ; (raster > 5) | (raster < 2) with parenthesis required select all pixels having value > 5 or < 2 ; (raster >= 2) & (raster <= 5) with parenthesis required select all pixel values between 2 and 5);
    • New value: set the new value for the old values defined in Old value; it must be an integer value;
  • add: add a row to the table;

  • remove: remove highlighted rows from the table;

  • import: import rules from a text file .csv separated by comma having the following structure Old_value,New_value (where Old_value cam be also an expression and New_value is an integer value) for instance:

    raster < 1,1
    (raster > 1) & (raster < 3),2
    raster < 3,3
  • export: export the reclassification table to a text file (.csv) that can be imported later; Symbology

  • checkbox Use code from Signature list input_list: if checked, color and class information are defined from ROI & Signature list:
    • MC ID: use the ID of macroclasses;
    • C ID: use the ID of classes;
  • BATCH batch_tool: add this function to the Batch;
  • RUN run: choose the output destination and start the calculation; reclassified raster is loaded in QGIS;