GDAL-RASTER-CLEAN-COLLAR(1) GDAL GDAL-RASTER-CLEAN-COLLAR(1) (NAME) gdal-raster-clean-collar - 3.11 . (SYNOPSIS) Usage: gdal raster clean-collar [OPTIONS] [] Clean the collar of a raster dataset, removing noise. Positional arguments: -i, --input Input raster dataset [required] -o, --output Output raster dataset 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 --co, --creation-option = Creation option [may be repeated] --overwrite Whether overwriting existing output dataset is allowed --update Whether to open existing dataset in update mode --color Transparent color(s): tuple of integer (like 'r,g,b'), 'black', 'white' (default: black) [may be repeated] --color-threshold Select how far from specified transparent colors the pixel values are considered transparent. (default: 15) --pixel-distance Number of consecutive transparent pixels that can be encountered before the giving up search inwards. (default: 2) --add-alpha Adds an alpha band to the output dataset. Mutually exclusive with --add-mask --add-mask Adds a mask band to the output dataset. Mutually exclusive with --add-alpha --algorithm Algorithm to apply. ALGORITHM=floodfill|twopasses (default: floodfill) Advanced Options: --oo, --open-option = Open options [may be repeated] --if, --input-format Input formats [may be repeated] (DESCRIPTION) gdal raster clean-collar ( ) () . <<>> (lossy) . (lossless) . (PROGRAM-SPECIFIC OPTIONS) --add-alpha . 0 255 . --add-mask ( ). --add-mask . 0 255 . --add-alpha ( ). --algorithm floodfill|twopasses . twopasses . (concave) . ( ) . <<>> "non_black_pixels" "dist" . . . floodfill () Flood Fill . twopasses . --pixel-distance twopasses floodfill . --color ,,...|black|white . . 0 white 255 . --color-threshold . 15 . --pixel-distance . . 2 . (STANDARD OPTIONS) --co, --creation-option = . GeoTIFF . . . --formats . Raster drivers . -f, --of, --format, --output-format . : gdal --formats | grep raster | grep + | sort --overwrite . gdal . --update (update) . ( ). . (EXIT STATUS) 0 ( ). (EXAMPLES) : $ gdal raster clean-collar --update my.tif : [0,5] [250,255] . . $ gdal raster clean-collar --add-alpha --color=black --color=white --color-threshold=5 in.tif out.tif (AUTHORS) Even Rouault (COPYRIGHT) 1998-2026 August 18, 2026 GDAL-RASTER-CLEAN-COLLAR(1)