Skip to content

Interpolation

The Interpolation operator increases raster resolution by interpolating values of an input raster.

If queried with a resolution that is coarser than the input resolution, interpolation is not applicable and an error is returned.

The Interpolation operator expects exactly one raster input.

The target resolution can be specified either as an explicit Resolution (in pixel units) or as a Fraction that scales the input resolution.

// Scale the input resolution by a factor of 2 in both x and y directions
InterpolationResolution::Fraction(Fraction { x: 2.0, y: 2.0 })
// Use an explicit resolution of 50×50 pixel units
InterpolationResolution::Resolution(SpatialResolution { x: 50.0, y: 50.0 })
NameTypeDescriptionExamples
interpolationInterpolationMethodInterpolation method.
outputResolutionInterpolationResolutionTarget output resolution.
outputOriginReferencenull or Coordinate2D
NameTypeDescription
rasterRasterOperatorAn operator that produces raster data.
{
"type": "Interpolation",
"params": {
"interpolation": "nearestNeighbor",
"outputResolution": {
"type": "fraction",
"x": 2,
"y": 2
}
},
"sources": {
"raster": {
"type": "MultiBandGdalSource",
"params": {
"data": "sentinel-2-l2a_EPSG32632_U8_20"
}
}
}
}