ExpressionProcessor
Bases: IDMixin
Tiles processor that computes a new channel from an expression
Experimental
ExpressionProcessor is experimental since 1.3.0 and may change without notice.
Additional dependencies
ExpressionProcessor requires the expression dependency group.
Notes
- Requires raster channels
Implements the TilesProcessor protocol.
| PARAMETER | DESCRIPTION |
|---|---|
expression_string
|
Expression string based on the numexpr expression syntax
TYPE:
|
new_channel_name
|
New channel name
TYPE:
|
max_num_threads
|
Maximum number of threads
TYPE:
|
id
property
| RETURNS | DESCRIPTION |
|---|---|
uuid.UUID
|
ID |
from_config
classmethod
Creates an expression processor from the configuration.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
Configuration |
| RETURNS | DESCRIPTION |
|---|---|
ExpressionProcessor
|
Expression processor |
ExpressionProcessorConfig
Bases: pydantic.BaseModel
Configuration for the from_config class method of ExpressionProcessor
Create the configuration from a config file
- Use null instead of None
Usage
You can create the configuration from a config file.
package: 'aviary'
name: 'ExpressionProcessor'
config:
expression_string: '(nir - r) / (nir + r)'
new_channel_name: 'ndvi'
max_num_threads: null
| ATTRIBUTE | DESCRIPTION |
|---|---|
expression_string |
Expression string based on the numexpr expression syntax
TYPE:
|
new_channel_name |
New channel name
TYPE:
|
max_num_threads |
Maximum number of threads - defaults to None
TYPE:
|