1pub mod crs;
13pub mod error;
14pub mod io;
15pub mod mosaic;
16pub mod raster;
17pub mod resample;
18pub mod streaming;
19pub mod vector;
20
21pub use crs::CRS;
22pub use error::{Error, Result};
23pub use mosaic::{MosaicOptions, mosaic};
24pub use raster::{GeoTransform, Raster, RasterElement};
25pub use resample::{ResampleMethod, resample_to_grid};
26pub use streaming::{StripProcessor, WindowAlgorithm};
27
28pub mod prelude {
30 pub use crate::Algorithm;
31 pub use crate::crs::CRS;
32 pub use crate::error::{Error, Result};
33 pub use crate::raster::{GeoTransform, Raster, RasterElement};
34}
35
36pub trait Algorithm {
40 type Input;
42 type Output;
44 type Params: Default;
46 type Error: std::error::Error;
48
49 fn name(&self) -> &'static str;
51
52 fn description(&self) -> &'static str;
54
55 fn execute(
57 &self,
58 input: Self::Input,
59 params: Self::Params,
60 ) -> std::result::Result<Self::Output, Self::Error>;
61
62 fn execute_default(
64 &self,
65 input: Self::Input,
66 ) -> std::result::Result<Self::Output, Self::Error> {
67 self.execute(input, Self::Params::default())
68 }
69}
70
71pub trait ParallelAlgorithm: Algorithm {
73 fn execute_parallel(
75 &self,
76 input: Self::Input,
77 params: Self::Params,
78 ) -> std::result::Result<Self::Output, Self::Error>;
79}