pub struct GpuReprojector { /* private fields */ }Expand description
GPU-based raster reprojector.
On platforms with GPU support this will eventually dispatch to a wgpu
compute shader. Until that path is fully wired up, reproject_cpu
provides a correct CPU-based fallback.
Implementations§
Source§impl GpuReprojector
impl GpuReprojector
Sourcepub fn new(config: ReprojectionConfig) -> Self
pub fn new(config: ReprojectionConfig) -> Self
Construct a new reprojector from the given configuration.
Sourcepub fn config(&self) -> &ReprojectionConfig
pub fn config(&self) -> &ReprojectionConfig
Return a reference to the reprojection configuration.
Sourcepub fn reproject_cpu(&self, src_data: &[f32]) -> Result<Vec<f32>, GpuError>
pub fn reproject_cpu(&self, src_data: &[f32]) -> Result<Vec<f32>, GpuError>
Reproject src_data to the destination grid using a pure-CPU path.
The implementation maps each destination pixel back to source
coordinates via the supplied geotransforms and samples the source
raster. Out-of-bounds source pixels are filled with the nodata
value (or 0.0 when nodata is not configured).
§Errors
Returns GpuError::InvalidKernelParams if the configuration is
invalid or the source data length does not match the declared
source dimensions.