GDAL-RASTER-RECLASSIFY(1) GDAL GDAL-RASTER-RECLASSIFY(1) (NAME) gdal-raster-reclassify - 3.11. (SYNOPSIS) Usage: gdal raster reclassify [OPTIONS] Reclassify values in a raster dataset Positional arguments: -i, --input Input raster datasets [required] [not available in pipelines] -o, --output Output raster dataset [required] [not available in pipelines] Common Options: -h, --help Display help message and exit --json-usage Display usage as JSON document and exit --config = Configuration option [may be repeated] -q, --quiet Quiet mode (no progress bar or warning message) [not available in pipelines] Options: -f, --of, --format, --output-format Output format ("GDALG" allowed) [not available in pipelines] --co, --creation-option = Creation option [may be repeated] [not available in pipelines] --overwrite Whether overwriting existing output dataset is allowed [not available in pipelines] Mutually exclusive with --append --append Append as a subdataset to existing output [not available in pipelines] Mutually exclusive with --overwrite -m, --mapping Reclassification mappings (or specify a @ to point to a file containing mappings [required] --ot, --datatype, --output-data-type Output data type. OUTPUT-DATA-TYPE=UInt8|Int8|UInt16|Int16|UInt32|Int32|UInt64|Int64|CInt16|CInt32|Float16|Float32|Float64|CFloat32|CFloat64 Advanced Options: --if, --input-format Input formats [may be repeated] [not available in pipelines] --oo, --open-option = Open options [may be repeated] [not available in pipelines] (DESCRIPTION) gdal raster reclassify . ( ) . : +----------------------------------+--------------------------------+ | | | +----------------------------------+--------------------------------+ |[a,b] | | | | | | | a b | +----------------------------------+--------------------------------+ |[a,b) | | | | | | | a | | | b | +----------------------------------+--------------------------------+ |(a,b] | | | | | | | a | | | b | +----------------------------------+--------------------------------+ |(a,b) | | | | | | | a b | +----------------------------------+--------------------------------+ . # remap land cover types 0 = 10 # land [2,4] = 20 # freshwater 1 = 40 # ocean (4,6] = 50 # forest (excludes 4, includes 5 and 6) NO_DATA = NO_DATA # leave NoData pixels unmodified # () . : o 0 10 o 2 4 ( ) 20 o 1 40 o 5 6 50 (4 ) o NoData NoData . DEFAULT . NoData (DEFAULT = NO_DATA) ( DEFAULT = 50) (DEFAULT = PASS_THROUGH). [] () () gdal raster reclassify --mapping "[1,3]= 101; [4, 5)= 102; 7=102; NO_DATA=103; DEFAULT=NO_DATA". : gdal raster reclassify VRT VRT GDAL 3.11 . GDALG ( / ) (GDALG OUTPUT) JSON GDALG . GDALG: GDAL Streamed Algorithm (pipeline) / . (PROGRAM-SPECIFIC OPTIONS) -m, --mapping . ( - ) @filename.txt . (STANDARD OPTIONS) --append (subdataset) . GTiff -- GeoTIFF File Format GPKG -- GeoPackage raster. . --co, --creation-option = . GeoTIFF . . . --formats . Raster drivers . --if, --input-format / () . . . . . . --oo, --open-option = ( ). . -f, --of, --format, --output-format . : gdal --formats | grep raster | grep rw | sort --ot, --datatype, --output-data-type Byte Int8 UInt16 Int16 UInt32 Int32 UInt64 Int64 CInt16 CInt32 Float32 Float64 CFloat32 CFloat64. --overwrite . gdal . (RETURN STATUS CODE) 0 ( ). (EXAMPLES) $ gdal raster reclassify -m "0=10; [2,4]=20; 1=40" -i wbm.tif -o typ.tif (AUTHOR) Dan Baston (COPYRIGHT) 1998-2026 August 18, 2026 GDAL-RASTER-RECLASSIFY(1)