pub struct RasterDsl { /* private fields */ }Expand description
Main DSL interface
Implementations§
Source§impl RasterDsl
impl RasterDsl
Sourcepub fn set_opt_level(&mut self, level: OptLevel)
pub fn set_opt_level(&mut self, level: OptLevel)
Sets the optimization level
Sourcepub fn execute(
&self,
expression: &str,
bands: &[RasterBuffer],
) -> Result<RasterBuffer>
pub fn execute( &self, expression: &str, bands: &[RasterBuffer], ) -> Result<RasterBuffer>
Parses and executes a DSL expression
§Arguments
expression- The DSL expression or program to executebands- Input raster bands (B1, B2, etc.)
§Examples
use oxigdal_algorithms::dsl::RasterDsl;
use oxigdal_core::buffer::RasterBuffer;
use oxigdal_core::types::RasterDataType;
let band1 = RasterBuffer::zeros(10, 10, RasterDataType::Float32);
let band2 = RasterBuffer::zeros(10, 10, RasterDataType::Float32);
let dsl = RasterDsl::new();
let result = dsl.execute("B1 + B2", &[band1, band2])?;Sourcepub fn compile(&self, expression: &str) -> Result<CompiledProgram>
pub fn compile(&self, expression: &str) -> Result<CompiledProgram>
Compiles a DSL expression to a reusable compiled program
Sourcepub fn functions(&self) -> &FunctionRegistry
pub fn functions(&self) -> &FunctionRegistry
Gets the function registry
Sourcepub fn list_functions(&self) -> Vec<&'static str>
pub fn list_functions(&self) -> Vec<&'static str>
Lists all available function names
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RasterDsl
impl RefUnwindSafe for RasterDsl
impl Send for RasterDsl
impl Sync for RasterDsl
impl Unpin for RasterDsl
impl UnsafeUnpin for RasterDsl
impl UnwindSafe for RasterDsl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more