|
NAMEr.recode - Recodes categorical raster maps.KEYWORDSraster, recode categories, reclassificationSYNOPSISr.recoder.recode --help r.recode [-ad] input=name output=name rules=name [title=string] [--overwrite] [--help] [--verbose] [--quiet] [--ui] Flags:
Parameters:
DESCRIPTIONr.recode creates an output raster map by recoding input raster map based on recode rules. A title for the output raster map may be (optionally) specified by the user.The recode rules can be read from standard input (i.e., from the keyboard, redirected from a file, or piped through another program) by entering rules=-. Rules are defined in one of these formats:
old_low:old_high:new_low:new_high old_low:old_high:new_val (i.e. new_high == new_low) *:old_val:new_val (interval [inf, old_val]) old_val:*:new_val (interval [old_val, inf]) r.recode is loosely based on r.reclass and uses the GRASS Reclass Library to convert the rasters. It has routines for converting to every possible combination of raster (eg. CELL to DCELL, DCELL to FCELL, etc). Standard floating point raster precision is float (FCELL), with -d double precision (DCELL) will be written. There are four basic routines that it accepts:
These four sets of arguments can be given on the command line, or piped via stdin or a file. More than one set of arguments is accepted. EXAMPLESMap type conversionTo simply convert a raster between formats (eg. int to float) the user would use the first argument. For example10:1500:0.1:15.0would convert an input raster map with range between 10 and 1500 to a float raster raster with range between 0.1 and 15.0. Value replacementr.recode can be used to replace existing cell values by others. The formatting is as described above. In following example the values 1, 2 and 3 are replaced by 1.1, 7.5 resp. 0.4:r.recode input=oldmap output=newmap rules=- << EOF 1:1:1.1:1.1 2:2:7.5:7.5 3:3:0.4:0.4 EOF SEE ALSOr.reclassAUTHORCERLSOURCE CODEAvailable at: r.recode source code (history)Main index | Raster index | Topics index | Keywords index | Graphical index | Full index © 2003-2021 GRASS Development Team, GRASS GIS 7.8.6 Reference Manual
Visit the GSP FreeBSD Man Page Interface. |