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.
Inputs
Section titled “Inputs”The Interpolation operator expects exactly one raster input.
Resolution
Section titled “Resolution”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 directionsInterpolationResolution::Fraction(Fraction { x: 2.0, y: 2.0 })// Use an explicit resolution of 50×50 pixel unitsInterpolationResolution::Resolution(SpatialResolution { x: 50.0, y: 50.0 })Parameters
Section titled “Parameters”| Name | Type | Description | Examples |
|---|---|---|---|
| interpolation | InterpolationMethod | Interpolation method. | |
| outputResolution | InterpolationResolution | Target output resolution. | |
| outputOriginReference | null or Coordinate2D |
Sources
Section titled “Sources”| Name | Type | Description |
|---|---|---|
| raster | RasterOperator | An operator that produces raster data. |
Examples
Section titled “Examples”{ "type": "Interpolation", "params": { "interpolation": "nearestNeighbor", "outputResolution": { "type": "fraction", "x": 2, "y": 2 } }, "sources": { "raster": { "type": "MultiBandGdalSource", "params": { "data": "sentinel-2-l2a_EPSG32632_U8_20" } } }}