gws.base.layer.tree
¶
Structures and utilities for tree layers.
Source code: gws.base.layer.tree
Module Contents¶
- class gws.base.layer.tree.Config(*args, **kwargs)¶
Bases:
gws.Config
Object configuration.
- autoLayers: list[gws.base.layer.core.AutoLayersOptions] | None¶
custom configurations for automatically created layers
- excludeLayers: gws.gis.source.LayerFilter | None¶
source layers to exclude
- flattenLayers: FlattenConfig | None¶
flatten the layer hierarchy
- rootLayers: gws.gis.source.LayerFilter | None¶
source layers to use as roots
- class gws.base.layer.tree.FlattenConfig(*args, **kwargs)¶
Bases:
gws.Config
Layer hierarchy flattening
- level: int¶
flatten level
- useGroups: bool = False¶
use group names (true) or image layer names (false)
- gws.base.layer.tree.layer_configs_from_args(tca: TreeConfigArgs) list[gws.Config] ¶
Generate a config tree from a list of source layers.
- gws.base.layer.tree.layer_configs_from_layer(layer: gws.base.layer.core.Object, source_layers: list[gws.SourceLayer], leaf_layer_maker: Callable) list[gws.Config] ¶
Generate a config tree from a list of source layers and the main layer config.
- class gws.base.layer.tree.TreeConfigArgs(*args, **kwargs)¶
Bases:
gws.Data
Basic data object.
This object can be instantiated by passing one or or
dict
arguments and/or keyword args. All dicts keys and keywords become attributes of the object.Accessing an undefined attribute returns
None
and no error is raised, unless the attribute name starts with an underscore.- auto_layers: list[gws.base.layer.core.AutoLayersOptions]¶
- exclude_slf: gws.gis.source.LayerFilter¶
- flatten_config: FlattenConfig¶
- leaf_layer_maker: Callable¶
- roots_slf: gws.gis.source.LayerFilter¶
- source_layers: list[gws.SourceLayer]¶