Aller au contenu principal

Fill NoData by Nearest Neighbor Interpolation

Overview

Nearest neighbor interpolation fills NoData cells with the value of the nearest valid cell. It preserves original cell values and is useful for categorical rasters or cases where values should not be averaged.

Use Cases

  • Fill NoData holes in categorical or classified rasters without creating new intermediate values.
  • Repair gaps before visualization or downstream analysis.
  • Preserve discrete cell values during gap filling.

Parameters

ParameterDescriptionNotes
Input raster fileRaster file whose NoData cells need nearest neighbor interpolationRequired
Output raster fileOutput raster file after nearest neighbor interpolationRequired

Steps

  1. Start the tool: Open Geoprocessing Toolbox → Spatial Analysis Tools > Raster Synthesis > Fill NoData, then start the Fill NoData by Nearest Neighbor Interpolation tool pane.
  2. Prepare input: Select the Input raster file and confirm that the data is complete and readable.
  3. Set core parameters: Confirm that the NoData areas to be filled are appropriate for nearest neighbor interpolation.
  4. Set output: Specify the Output raster file and confirm that the output path, format, and naming rules meet downstream requirements.
  5. Run and inspect the result: Click Run, then check whether filled cells and category values meet expectations.

Notes

  • Nearest neighbor interpolation can create blocky transitions and is less suitable for smooth continuous surfaces.
  • It is often appropriate for categorical rasters because it does not create new class values.
  • Sparse valid cells or large NoData gaps can produce visually abrupt results.