pub mod crs;
pub mod error;
pub mod io;
pub mod mosaic;
pub mod raster;
pub mod resample;
pub mod streaming;
pub mod vector;
pub use crs::CRS;
pub use error::{Error, Result};
pub use mosaic::{MosaicOptions, mosaic};
pub use raster::{GeoTransform, Raster, RasterElement};
pub use resample::{ResampleMethod, resample_to_grid};
pub use streaming::{StripProcessor, WindowAlgorithm};
pub mod prelude {
pub use crate::Algorithm;
pub use crate::crs::CRS;
pub use crate::error::{Error, Result};
pub use crate::raster::{GeoTransform, Raster, RasterElement};
}
pub trait Algorithm {
type Input;
type Output;
type Params: Default;
type Error: std::error::Error;
fn name(&self) -> &'static str;
fn description(&self) -> &'static str;
fn execute(
&self,
input: Self::Input,
params: Self::Params,
) -> std::result::Result<Self::Output, Self::Error>;
fn execute_default(
&self,
input: Self::Input,
) -> std::result::Result<Self::Output, Self::Error> {
self.execute(input, Self::Params::default())
}
}
pub trait ParallelAlgorithm: Algorithm {
fn execute_parallel(
&self,
input: Self::Input,
params: Self::Params,
) -> std::result::Result<Self::Output, Self::Error>;
}