pub enum PixelFunction {
Show 18 variants
Average,
Min,
Max,
Sum,
FirstValid,
LastValid,
WeightedAverage {
weights: Vec<f64>,
},
Ndvi,
Evi,
Ndwi,
BandMath {
expression: String,
},
LookupTable {
table: Vec<(f64, f64)>,
interpolation: String,
},
Conditional {
condition: String,
value_if_true: String,
value_if_false: String,
},
Multiply,
Divide,
SquareRoot,
Absolute,
Custom {
name: String,
},
}Expand description
Pixel function for on-the-fly computation
Variants§
Average
Average of all sources
Min
Minimum of all sources
Max
Maximum of all sources
Sum
Sum of all sources
FirstValid
First valid (non-NoData) value
LastValid
Last valid (non-NoData) value
WeightedAverage
Weighted average (requires weights)
Ndvi
NDVI: (NIR - Red) / (NIR + Red) Requires exactly 2 sources: [Red, NIR]
Evi
Enhanced Vegetation Index: 2.5 * (NIR - Red) / (NIR + 6Red - 7.5Blue + 1) Requires exactly 3 sources: [Red, NIR, Blue]
Ndwi
Normalized Difference Water Index: (Green - NIR) / (Green + NIR) Requires exactly 2 sources: [Green, NIR]
BandMath
Band math expression Supports operations: +, -, *, /, sqrt, pow, abs, min, max Variables are named as B1, B2, B3, etc. corresponding to source bands
LookupTable
Lookup table transformation Maps input values to output values
Fields
Conditional
Conditional logic: if condition then value_if_true else value_if_false Condition format: “B1 > 0.5”, “B1 >= B2”, etc.
Fields
Multiply
Multiply source values
Divide
Divide first source by second (handles division by zero)
SquareRoot
Square root of source value
Absolute
Absolute value of source value
Custom
Custom function (not yet implemented)
Implementations§
Trait Implementations§
Source§impl Clone for PixelFunction
impl Clone for PixelFunction
Source§fn clone(&self) -> PixelFunction
fn clone(&self) -> PixelFunction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more