GDAL_PROXIMITY(1)

πŸ“¦
version 3.4.3 Β· 2 versions
, in epel 9

πŸ’– NAME πŸ’–

okay bestie, this is the GDAL_PROXIMITY(1) page, and it's literally all about gdal_proximity β€” Produces a raster proximity map. that's the whole vibe ✨


✨ SYNOPSIS ✨

here's the full call, exactly as it goes:

   gdal_proximity.py <srcfile> <dstfile> [-srcband n] [-dstband n]
                     [-of format] [-co name=value]*
                     [-ot Byte/UInt16/UInt32/Float32/etc]
                     [-values n,n,n] [-distunits PIXEL/GEO]
                     [-maxdist n] [-nodata n] [-use_input_nodata YES/NO]
                     [-fixed-buf-val n]

πŸ¦‹ DESCRIPTION πŸ¦‹

The gdal_proximity.py script generates a raster proximity map indicating the distance from the center of each pixel to the center of the nearest pixel identified as a target pixel. Target pixels are those in the source raster for which the raster pixel value is in the set of target pixel values. iconic behavior, truly 🌈

πŸŽ€ the files & flags πŸŽ€

  • <srcfile> β€” The source raster file used to identify target pixels. this is the main character of the input situation πŸ’…
  • <dstfile> β€” The destination raster file to which the proximity map will be written. It may be a pre-existing file of the same size as srcfile. If it does not exist it will be created. no cap, it'll just appear 🫢
  • -srcband <n> β€” Identifies the band in the source file to use (default is 1). pick your fave band πŸŽ€
  • -dstband <n> β€” Identifies the band in the destination file to use (default is 1). again, default 1, slay ✨
  • -of <format> β€” Select the output format. Starting with GDAL 2.3, if not specified, the format is guessed from the extension (previously was GTiff). Use the short format name. extension girlies rise πŸ’–
  • -co <NAME=VALUE> β€” Many formats have one or more optional creation options that can be used to control particulars about the file created. For instance, the GeoTIFF driver supports creation options to control compression, and whether the file should be tiled.

The creation options available vary by format driver, and some simple formats have no creation options at all. A list of options supported for a format can be listed with the --formats command line option but the documentation for the format is the definitive source of information on driver creation options. See raster_drivers format specific documentation for legal creation options for each format. the docs are the blueprint, bestie πŸ“š

  • -ot <type> β€” Specify a data type supported by the driver, which may be one of the following: Byte, UInt16, Int16, UInt32, Int32, Float32 (default), or Float64. type check passed βœ…
  • -values <n>,<n>,<n> β€” A list of target pixel values in the source image to be considered target pixels. If not specified, all non-zero pixels will be considered target pixels. very β€œif you know you know” πŸ‘‘
  • -distunits PIXEL|GEO β€” Indicate whether distances generated should be in pixel or georeferenced coordinates (default PIXEL). pixel girlies vs geo girlies, choose your fighter πŸ¦‹
  • -maxdist <n> β€” The maximum distance to be generated. The nodata value will be used for pixels beyond this distance. If a nodata value is not provided, the output band will be queried for its nodata value. If the output band does not have a nodata value, then the value 65535 will be used. Distance is interpreted in pixels unless -distunits GEO is specified. important little maxdist lore 🌟
  • -nodata <n> β€” Specify a nodata value to use for the destination proximity raster. cute lil sentinel value πŸŽ€
  • -use_input_nodata YES/NO β€” Indicate whether nodata pixels in the input raster should be nodata in the output raster (default NO). the people need to know πŸ™ˆ
  • -fixed-buf-val <n> β€” Specify a value to be applied to all pixels that are within the -maxdist of target pixels (including the target pixels) instead of a distance value. buffer behavior but make it fixed πŸ’™

🌸 AUTHOR 🌸

Frank Warmerdam <warmerdam@pobox.com> β€” absolute legend behavior πŸ’–


1998-2026 β€” that's the copyright range, bestie. periodt. πŸ’…


mwah πŸ’‹ that's the GDAL_PROXIMITY(1) page from GDAL, dated Jan 08, 2026 β€” iykyk, go make some proximity maps 🌈✨

πŸ“¦ where this page comes from