AggregateProcessor
Vector processor that aggregates a layer
The polygons are aggregated by value into the aggregation layer with absolute and relative area fields.
Implements the VectorProcessor protocol.
| PARAMETER | DESCRIPTION |
|---|---|
layer_name
|
Layer name
TYPE:
|
aggregation_layer_name
|
Aggregation layer name
TYPE:
|
field
|
Field
TYPE:
|
values
|
Value, values, no values (False or None), or all values (True)
TYPE:
|
background_value
|
Background value
TYPE:
|
absolute_area_field_suffix
|
Suffix of the absolute area field
TYPE:
|
relative_area_field_suffix
|
Suffix of the relative area field
TYPE:
|
new_aggregation_layer_name
|
New aggregation layer name
TYPE:
|
from_config
classmethod
Creates an aggregate processor from the configuration.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
Configuration
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
AggregateProcessor
|
Aggregate processor |
AggregateProcessorConfig
Bases: pydantic.BaseModel
Configuration for the from_config class method of AggregateProcessor
Create the configuration from a config file
- Use null instead of None
- Use false or true instead of False or True
Example
You can create the configuration from a config file.
package: 'aviary'
name: 'AggregateProcessor'
config:
layer_name: 'my_layer'
aggregation_layer_name: 'my_aggregation_layer'
field: 'prediction'
values: true
background_value: null
absolute_area_field_suffix: 'absolute_area'
relative_area_field_suffix: 'relative_area'
new_aggregation_layer_name: 'my_new_aggregation_layer'
| ATTRIBUTE | DESCRIPTION |
|---|---|
layer_name |
Layer name
TYPE:
|
aggregation_layer_name |
Aggregation layer name
TYPE:
|
field |
Field
TYPE:
|
values |
Value, values, no values (False or None), or all values (True) - defaults to True
TYPE:
|
background_value |
Background value - defaults to None
TYPE:
|
absolute_area_field_suffix |
Suffix of the absolute area field - defaults to 'absolute_area'
TYPE:
|
relative_area_field_suffix |
Suffix of the relative area field - defaults to 'relative_area'
TYPE:
|
new_aggregation_layer_name |
New aggregation layer name - defaults to None
TYPE:
|