SAGA-GIS Tool Library Documentation (v7.7.0)

Tool Reclassify Grid Values

The tool can be used to reclassify the values of a grid. It provides three different options:
(a) reclassification of single values
(b) reclassification of a range of values
(c) reclassification of value ranges specified in a lookup table (simple or user supplied table)

In addition to these methods, two special cases (No Data values and values not included in the reclassification setup) are supported.
With reclassification mode (a) and (b), the 'No Data' option is evaluated before the 'Method' settings. In reclassification mode (c) the option is evaluated only if the No Data value is not included in the lookup table.
The 'Other Values' option is always evaluated after checking the 'Method' settings.

The tool also provides options to control the data storage type and No Data value of the output grid.

Parameters

 NameTypeIdentifierDescriptionConstraints
InputGridGrid, inputINPUTGrid to reclassify.-
Lookup Table (*)Table, input, optionalRETAB_2The lookup table used with method 'user supplied table'.-
OutputReclassified GridGrid, outputRESULTReclassified grid.-
OptionsGrid SystemGrid systemPARAMETERS_GRID_SYSTEM--
MethodChoiceMETHODSelect the desired method: (1) a single value or a range defined by a single value is reclassified, (2) a range of values is reclassified, (3) and (4) a lookup table is used to reclassify the grid.Available Choices:
[0] single
[1] range
[2] simple table
[3] user supplied table
Default: 0
Old ValueFloating pointOLDValue to reclassify.Default: 0.000000
New ValueFloating pointNEWThe value to assign (with method 'single value').Default: 1.000000
OperatorChoiceSOPERATORSelect the desired operator; it is possible to define a range above or below the old value.Available Choices:
[0] =
[1] <
[2] <=
[3] >=
[4] >
Default: 0
Minimum ValueFloating pointMINThe minimum value of the range to be reclassified.Default: 0.000000
Maximum ValueFloating pointMAXThe maximum value of the range to be reclassified.Default: 10.000000
New ValueFloating pointRNEWThe value to assign (with method 'range').Default: 5.000000
OperatorChoiceROPERATORSelect the desired operator (for method 'range'): eg. min < value < max.Available Choices:
[0] <=
[1] <
Default: 0
Lookup TableStatic tableRETABThe lookup table used with method 'table'.3 Fields:
- 1. [8 byte floating point number] minimum
- 2. [8 byte floating point number] maximum
- 3. [8 byte floating point number] new
OperatorChoiceTOPERATORSelect the desired operator (for method 'table').Available Choices:
[0] min <= value < max
[1] min <= value <= max
[2] min < value <= max
[3] min < value < max
Default: 0
Minimum ValueTable fieldF_MINThe table field with the minimum value.-
Maximum ValueTable fieldF_MAXThe table field with the maximum value.-
New ValueTable fieldF_CODEThe table field with the value to assign.-
No Data ValuesBooleanNODATAOPTUse this option to reclassify No Data values independently of the method settings.Default: 0
New ValueFloating pointNODATAThe value to assign to No Data values.Default: 0.000000
Other ValuesBooleanOTHEROPTUse this option to reclassify all values that are not included in the reclassification setup.Default: 0
New ValueFloating pointOTHERSThe value to assign to all values not included in the reclassification setup.Default: 0.000000
Data Storage TypeChoiceRESULT_TYPEThe data storage type of the output grid.Available Choices:
[0] 1 bit
[1] 1 byte unsigned integer
[2] 1 byte signed integer
[3] 2 byte unsigned integer
[4] 2 byte signed integer
[5] 4 byte unsigned integer
[6] 4 byte signed integer
[7] 4 byte floating point
[8] 8 byte floating point
[9] same as input grid
Default: 9
No Data ValueChoiceRESULT_NODATA_CHOICEChoose how to handle the No Data value of the output grid.Available Choices:
[0] No Data value of input grid
[1] user defined No Data value
[2] No Data value of data storage type
Default: 0
No Data ValueFloating pointRESULT_NODATA_VALUEUser defined No Data value for output grid.Default: -99999.000000
(*) optional

Command-line

Usage: saga_cmd grid_tools 15 [-INPUT <str>] [-RESULT <str>] [-METHOD <str>] [-OLD <double>] [-NEW <double>] [-SOPERATOR <str>] [-MIN <double>] [-MAX <double>] [-RNEW <double>] [-ROPERATOR <str>] [-RETAB <str>] [-TOPERATOR <str>] [-RETAB_2 <str>] [-F_MIN <str>] [-F_MAX <str>] [-F_CODE <str>] [-NODATAOPT <str>] [-NODATA <double>] [-OTHEROPT <str>] [-OTHERS <double>] [-RESULT_TYPE <str>] [-RESULT_NODATA_CHOICE <str>] [-RESULT_NODATA_VALUE <double>]
  -INPUT:<str>                 	Grid
	Grid, input
  -RESULT:<str>                	Reclassified Grid
	Grid, output
  -METHOD:<str>                	Method
	Choice
	Available Choices:
	[0] single
	[1] range
	[2] simple table
	[3] user supplied table
	Default: 0
  -OLD:<double>                	Old Value
	Floating point
	Default: 0.000000
  -NEW:<double>                	New Value
	Floating point
	Default: 1.000000
  -SOPERATOR:<str>             	Operator
	Choice
	Available Choices:
	[0] =
	[1] <
	[2] <=
	[3] >=
	[4] >
	Default: 0
  -MIN:<double>                	Minimum Value
	Floating point
	Default: 0.000000
  -MAX:<double>                	Maximum Value
	Floating point
	Default: 10.000000
  -RNEW:<double>               	New Value
	Floating point
	Default: 5.000000
  -ROPERATOR:<str>             	Operator
	Choice
	Available Choices:
	[0] <=
	[1] <
	Default: 0
  -RETAB:<str>                 	Lookup Table
	Static table
	3 Fields:
	- 1. [8 byte floating point number] minimum
	- 2. [8 byte floating point number] maximum
	- 3. [8 byte floating point number] new
	
  -TOPERATOR:<str>             	Operator
	Choice
	Available Choices:
	[0] min <= value < max
	[1] min <= value <= max
	[2] min < value <= max
	[3] min < value < max
	Default: 0
  -RETAB_2:<str>               	Lookup Table
	Table, input, optional
  -F_MIN:<str>                 	Minimum Value
	Table field
  -F_MAX:<str>                 	Maximum Value
	Table field
  -F_CODE:<str>                	New Value
	Table field
  -NODATAOPT:<str>             	No Data Values
	Boolean
	Default: 0
  -NODATA:<double>             	New Value
	Floating point
	Default: 0.000000
  -OTHEROPT:<str>              	Other Values
	Boolean
	Default: 0
  -OTHERS:<double>             	New Value
	Floating point
	Default: 0.000000
  -RESULT_TYPE:<str>           	Data Storage Type
	Choice
	Available Choices:
	[0] 1 bit
	[1] 1 byte unsigned integer
	[2] 1 byte signed integer
	[3] 2 byte unsigned integer
	[4] 2 byte signed integer
	[5] 4 byte unsigned integer
	[6] 4 byte signed integer
	[7] 4 byte floating point
	[8] 8 byte floating point
	[9] same as input grid
	Default: 9
  -RESULT_NODATA_CHOICE:<str>  	No Data Value
	Choice
	Available Choices:
	[0] No Data value of input grid
	[1] user defined No Data value
	[2] No Data value of data storage type
	Default: 0
  -RESULT_NODATA_VALUE:<double>	No Data Value
	Floating point
	Default: -99999.000000