Interpolation

The Interpolation operator artificially increases the resolution of a raster by interpolating the values of the input raster. If the operator is queried with a resolution that is coarser than the input resolution, the interpolation is not applied but the input raster is returned unchanged. Unless a particular input resolution is specified, the resolution of the input raster is used, if it is known.

Parameters

ParameterTypeDescriptionExample Value
interpolationInterpolationMethodthe interpolation method to be used"nearestNeighbor"
inputResolutionInputResolutionthe query resolution for the source operator"source"

Types

The following describes the types used in the parameters.

InterpolationMethod

The operator supports the following interpolation methods:

ValueDescription
nearestNeighborThe value of the nearest neighbor is used.
biLinearThe value is computed by bilinear interpolation.

InputResolution

The operator supports the following input resolutions:

ValueDescription
{"type": "source"}The resolution of the input raster is used.
{"type": "value", "x": 0.1, "y": 0.1}The resolution is specified explicitly.

Inputs

The Interpolation operator expects exactly one raster input.

ParameterType
sourceSingleRasterSource

Errors

If the input resolution is set as "source" but the resolution of the input raster is not known, an error will be thrown.

Example JSON

{
  "type": "Raster",
  "operator": {
    "type": "Interpolation",
    "params": {
      "interpolation": "biLinear",
      "inputResolution": {
        "type": "source"
      }
    },
    "sources": {
      "raster": {
        "type": "GdalSource",
        "params": {
          "data": "ndvi"
        }
      }
    }
  }
}