Expand description
Raster resampling algorithms
This module provides various resampling algorithms for changing the resolution or dimensions of raster data while maintaining spatial accuracy.
§Algorithms
- Nearest neighbor (fastest, preserves exact values)
- Bilinear interpolation (smooth, good for continuous data)
- Bicubic interpolation (higher quality, smoother)
- Lanczos resampling (highest quality, most expensive)
§Example
use oxigdal_algorithms::resampling::{ResamplingMethod, Resampler};
use oxigdal_core::buffer::RasterBuffer;
use oxigdal_core::types::RasterDataType;
// Create a resampler
let resampler = Resampler::new(ResamplingMethod::Bilinear);
// Resample a raster buffer
let src = RasterBuffer::zeros(1000, 1000, RasterDataType::Float32);
let dst = resampler.resample(&src, 500, 500)?;Structs§
- Bicubic
Resampler - Bicubic interpolation resampler
- Bilinear
Resampler - Bilinear interpolation resampler
- Lanczos
Resampler - Lanczos resampler with configurable lobe count
- Nearest
Resampler - Nearest neighbor resampler
- Resampler
- Generic resampler that can use any resampling method
Enums§
- Resampling
Method - Resampling methods