:tocdepth: 3 :py:mod:`gws.base.layer.tree` ============================= .. py:module:: gws.base.layer.tree .. autoapi-nested-parse:: Structures and utilities for tree layers. **Source code:** :source:`gws.base.layer.tree` Module Contents --------------- .. py:class:: Config(*args, **kwargs) Bases: :py:obj:`gws.Config` Configuration for the layer tree. .. py:attribute:: autoLayers :type: Optional[list[gws.base.layer.core.AutoLayersOptions]] Custom configurations for automatically created layers. .. py:attribute:: excludeLayers :type: Optional[gws.gis.source.LayerFilter] Source layers to exclude. .. py:attribute:: flattenLayers :type: Optional[FlattenConfig] Flatten the layer hierarchy. .. py:attribute:: rootLayers :type: Optional[gws.gis.source.LayerFilter] Source layers to use as roots. .. py:class:: FlattenConfig(*args, **kwargs) Bases: :py:obj:`gws.Config` Layer hierarchy flattening .. py:attribute:: level :type: int Flatten level. .. py:attribute:: useGroups :type: bool :value: False Use group names (true) or image layer names (false). .. py:function:: layer_configs_from_args(tca: TreeConfigArgs) -> list[gws.Config] Generate a config tree from a list of source layers. .. py:function:: 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. .. py:class:: TreeConfigArgs(*args, **kwargs) Bases: :py:obj:`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. .. py:attribute:: auto_layers :type: list[gws.base.layer.core.AutoLayersOptions] .. py:attribute:: exclude_slf :type: gws.gis.source.LayerFilter .. py:attribute:: flatten_config :type: FlattenConfig .. py:attribute:: leaf_layer_maker :type: Callable .. py:attribute:: root :type: gws.Root .. py:attribute:: roots_slf :type: gws.gis.source.LayerFilter .. py:attribute:: source_layers :type: list[gws.SourceLayer]