GeoEco.SpatialAnalysis.Interpolation.Interpolator.InpaintArcGISRasterArcGISTable

classmethod Interpolator.InpaintArcGISRasterArcGISTable(table, inputRasterField, outputRasterField, method='Del2a', maxHoleSize=None, xEdgesWrap=False, minValue=None, maxValue=None, where=None, orderBy=None, skipExisting=False, overwriteExisting=False, basePath=None)

Interpolates values for the NoData cells for each ArcGIS raster in a table.

To run this tool, you either must have MATLAB R2026a or MATLAB Runtime R2026a installed. The MATLAB Runtime is free and may be downloaded from https://www.mathworks.com/help/compiler/install-the-matlab-runtime.html. Please follow the installation instructions carefully. Version R2026a must be used; other versions will not work. MATLAB Runtime allows multiple versions can be installed at the same time.

Use this tool to guess values for small clusters of NoData cells in rasters representing continuous surfaces, e.g. images of sea surface temperature in which cloudy pixels contain NoData. This tool provides several advantages over traditional moving-window methods provided by ArcGIS, such as the Focal Statistics tool of the ArcGIS Spatial Analyst:

  • It uses methods based on differential calculus that may provide more accurate guesses than traditional approaches, such as computing the focal mean of a 3x3 neighborhood.

  • It accurately handles rasters with global longitudinal extent, for which the east and west edges are connected.

  • It can fill NoData clusters of any size.

Although this tool can fill NoData clusters of any size, you should apply common sense when using it. The larger the cluster, the less accurate the guessed values will be, especially for rasters that represent a noisy surface.

This tool is implemented in MATLAB using the inpaint_nans function developed by John D’Errico. Many thanks to him for developing and sharing this function. Please see GeoEco’s LICENSE file for the relevant copyright statement.

Requires: ArcGIS Pro 3.2.0 or later or ArcGIS Server equivalent to ArcGIS Pro 3.2.0 or later, MATLAB Runtime R2026a (which can be freely downloaded from https://www.mathworks.com/products/compiler/matlab-runtime.html) or the full version of MATLAB R2026a, Python numpy module, Python bindings for the Geospatial Data Abstraction Library (GDAL).

Parameters:
  • table (str) – Table to query. Minimum length꞉ 1. Must exist.

  • inputRasterField (str) – Field containing the input rasters. Minimum length꞉ 1.

  • outputRasterField (str) –

    Field containing the output rasters.

    The output rasters will be identical to the input rasters where the input rasters have data. For cells of the input rasters that do not have data, the output rasters will contain values interpolated according to parameters of this tool.

    If these paths refers to the file system, missing directories in the paths will be created if they do not exist.

    Minimum length꞉ 1.

  • method (str, optional) –

    Method to use for interpolation and extrapolation of NoData values. One of:

    • Del2a - Performs Laplacian interpolation and linear extrapolation.

    • Del2b - Same as Del2a but does not build as large a linear system of equations. May use less memory and be faster than Del2a, at the cost of some accuracy. Use this method if Del2a fails due to insufficient memory or if it is too slow.

    • Del2c - Same as Del2a but solves a direct linear system of equations for the NoData values. Faster than both Del2a and Del2b but is the least robust to noise on the boundaries of NoData cells and least able to interpolate accurately for smooth surfaces. Use this method if Del2a and Del2b both fail due to insufficient memory or are too slow.

    • Del4 - Same as Del2a but instead of the Laplace operator (also called the ∇2 operator) it uses the biharmoic operator (also called the ∇4 operator). May result in more accurate interpolations, at some cost in speed.

    • Spring - Uses a spring metaphor. Assumes springs (with a nominal length of zero) connect each cell with every neighbor (horizontally, vertically and diagonally). Since each cell tries to be like its neighbors, extrapolation is as a constant function where this is consistent with the neighboring nodes.

    Allowed values꞉ 'Del2a', 'Del2b', 'Del2c', 'Del4', 'Spring'.

  • maxHoleSize (int, optional) – Maximum size, in cells, that a region of 4-connected NoData cells may be for it to be filled in. Use this option to prevent the filling of large NoData regions (e.g. large clouds in remote sensing images) when you are concerned that values cannot be accurately guessed for those regions. If this option is omitted, all regions will be filled, regardless of size. Must be greater than 0.

  • xEdgesWrap (bool, optional) – If True, the left and right edges of the raster are assumed to be connected and computations along those edges will consider the values on the opposite side of the raster.

  • minValue (float, optional) –

    Minimum allowed value to use when NoData cells are interpolated (or extrapolated). If this parameter is provided, all cells with less than the minimum value will be rounded up to the minimum. This includes not just the cells that had NoData in the original raster and were then interpolated or extrapolated, but also the cells that had values in the original raster.

    Use this parameter when the interpolation/extrapolation algorithm produces impossibly low values. For example, consider a situation in which a chlorophyll concentration raster coincidentally shows a negative gradient approaching a cloud that straddles the edge of the raster. Missing pixels at the edge of the raster will be filled by extrapolation. If the negative gradient is strong enough, the algorithm might extrapolate negative concentrations for the cloudy pixels. This should be impossible; chlorophyll concentration must be zero or higher. To enforce that, you could specify a minimum value of zero (or a very small non-zero number, if exactly zero would be problematic, as might occur if the values were in a log scale).

  • maxValue (float, optional) –

    Maximum allowed value to use when NoData cells are interpolated (or extrapolated). If this parameter is provided, all cells with greater than the maximum value will be rounded up to the maximum. This includes not just the cells that had NoData in the original raster and were then interpolated or extrapolated, but also the cells that had values in the original raster.

    Use this parameter when the interpolation/extrapolation algorithm produces impossibly high values. For example, consider a situation in which a percent sea ice concentration raster shows a positive gradient approaching the coastline but does not provide data right up to shore. Say you wanted to fill the missing cells close to shore and were willing to assume that whatever gradient occurred nearby was reasonable for filling them in. If the positive gradient is strong enough, the algorithm might extrapolate ice concentration values greater than 100 percent, which is impossible. To prevent values from exceeding 100 percent, you could specify a maximum value of 100.

  • where (str, optional) –

    SQL WHERE clause expression that specifies the rows to include. If not provided, all of the rows will be included. If provided but the underlying storage format does not support WHERE clauses, an exception will be raised.

    The exact syntax of this expression depends on the underlying storage format. If the underlying data store will be accessed through ArcGIS, this article may document some of the possible syntax, but not all of it may be supported through ArcGIS’s underlying Python API.

    Minimum length꞉ 1.

  • orderBy (str, optional) –

    SQL ORDER BY clause that specifies the order in which the rows should be accessed. If not provided, the rows will accessed according to the default behavior of the underlying storage format and the programming library used to access it.

    The ORDER BY clause must be a comma-separated list of fields. Each field can optionally be followed by a space and the word ASC to indicate ascending order or DESC to indicate descending order. If neither is specified, ASC is assumed.

    The underlying storage format and library perform the actual evaluation of this parameter and determine the rules of sorting, such as whether string comparisons are case-sensitive or case-insensitive. At present, there is no mechanism to interrogate or manipulate these rules; you must live with the default behavior of the underlying format and library.

    Minimum length꞉ 1. Must match regular expression꞉ \s*\S+(\s+([aA][sS][cC]|[dD][eE][sS][cC]))?\s*(,\s*\S+(\s+([aA][sS][cC]|[dD][eE][sS][cC]))?\s*)*.

  • skipExisting (bool, optional) – If True, processing will be skipped for output rasters that already exist.

  • overwriteExisting (bool, optional) – If True and skipExisting is False, existing output rasters will be overwritten.

  • basePath (str, optional) –

    Base path to prepend to relative paths.

    If a base path is provided, it will be prepended to any relative paths that are obtained from the fields that list the inputs (and outputs, if this tool has outputs). If a base path is not provided, the workspace containing the table will be prepended instead.

    Minimum length꞉ 1.

Returns:

Processed table.

Return type:

str