GDAL-RASTER-NEIGHBORS(1) GDAL GDAL-RASTER-NEIGHBORS(1) (NAME) gdal-raster-neighbors - ( ) 3.12 . (SYNOPSIS) Usage: gdal raster neighbors [OPTIONS] ( ) (Positional arguments): -i, --input [] [ ] -o, --output [] [ ] (Common Options): -h, --help --json-usage JSON --config = [] -q, --quiet ( ) [ ] (Options): -f, --of, --format, --output-format ( "GDALG") [ ] --co, --creation-option = [] [ ] --overwrite [ ] --append --append [ ] --overwrite -b, --band ( ) --method . METHOD=mean|sum|min|max|stddev|median|mode [] --size --kernel () [.. ] [] --ot, --datatype, --output-data-type . OUTPUT-DATA-TYPE=UInt8|Int8|UInt16|Int16|UInt32|Int32|UInt64|Int64|CInt16|CInt32|Float16|Float32|Float64|CFloat32|CFloat64 (: Float64) --nodata (nodata) ('none' 'nan' 'inf' '-inf') (Advanced Options): --if, --input-format [] [ ] --oo, --open-option = [] [ ] (DESCRIPTION) gdal raster neighbors ( ) . . . ( ) nodata () nodata . . gdal pipeline gdal raster pipeline . [] () () x . NoData . . GDALG ( / ) JSON GDALG . GDALG: GDAL Streamed Algorithm / . (PROGRAM-SPECIFIC OPTIONS) --band ( ). . --kernel . o edge1 edge2 sharpen gaussian unsharp-masking ( ) : o equal ( ): \begin{align} \begin{bmatrix} 1 & 1 & 1\\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix} \end{align} mean (Box Blur) . o u : \begin{align} \begin{bmatrix} 0 & 0 & 0\\ -0.5 & 0 & 0.5 \\ 0 & 0 & 0 \end{bmatrix} \end{align} o v : \begin{align} \begin{bmatrix} 0 & -0.5 & 0\\ 0 & 0 & 0 \\ 0 & 0.5 & 0 \end{bmatrix} \end{align} edge1 edge2 sharpen u v . gaussian . unsharp-masking . o N N [[val00, val01, ..., val0N],[val10, val11, ..., val1N],...,[valN0, valN1, ..., valNN]]. --method mean ( nodata) . --kernel . --method sum|mean|min|max|stddev|median|mode . mean --kernel u v edge1 edge2 sum . o sum: . . o mean: . . o min: o max: o stddev: o median: o mode (/): --nodata NoData . none NoData . --nodata gdal raster neighbors NoData . --size . . : . edge1 edge2 sharpen u v gaussian equal . unsharp-masking . . (STANDARD OPTIONS) --append . 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 neighbors --kernel u --kernel v in.tif uv.tif : x gdal raster neighbors --kernel equal --method mean in.tif mean.tif : x gdal raster neighbors --kernel equal --size 5 --method max in.tif max.tif : (Sharpen) gdal raster neighbors "--kernel=[[0,-1,0],[-1,5,-1],[0,-1,0]]" in.tif sharpen.tif (AUTHOR) Even Rouault (COPYRIGHT) 1998-2026 August 18, 2026 GDAL-RASTER-NEIGHBORS(1)