[gdal-dev] gdal raster reclassify error

Scott public at postholer.com
Sun Aug 31 12:24:28 PDT 2025


GDAL 3.11.3, Debian 12, using the following command and mappings 
directly from the docs page (or my own) I get the following error:

gdal raster reclassify --input=source.tif --mapping=classify.txt 
--output=target.tif

ERROR 1: Interval must start with '(' or ']'


classify.txt:
# remap land cover types
0       = 10      # land
[2,4]   = 20      # freshwater
1       = 40      # ocean
NO_DATA = NO_DATA # leave NoData pixels unmodified



Thanks!

-- 
www.postholer.com



More information about the gdal-dev mailing list