:tocdepth: 3 :py:mod:`gws.gis.source` ======================== .. py:module:: gws.gis.source **Source code:** :source:`gws.gis.source` Package Contents ---------------- .. py:function:: check_layers(layers: Iterable[gws.SourceLayer], revert: bool = False) -> list[gws.SourceLayer] Insert our properties in the source layer tree. Also remove empty layers. :param layers: List of source layers :param revert: Revert the order of layers and sub-layers. .. py:function:: combined_bounds(layers: list[gws.SourceLayer], crs: gws.Crs) -> Optional[gws.Bounds] .. py:function:: combined_crs_list(layers: list[gws.SourceLayer]) -> list[gws.Crs] Return an intersection of crs supported by each source layer. .. py:function:: filter_layers(layers: list[gws.SourceLayer], slf: LayerFilter = None, is_group: bool = None, is_image: bool = None, is_queryable: bool = None, is_visible: bool = None) -> list[gws.SourceLayer] Filter source layers by the given layer filter. .. py:function:: layer_matches(sl: gws.SourceLayer, f: LayerFilter) -> bool Check if a source layer matches the filter .. py:class:: LayerFilter(*args, **kwargs) Bases: :py:obj:`gws.Data` Source layer filter .. py:attribute:: isGroup :type: Optional[bool] If true, match only group layers. .. py:attribute:: isImage :type: Optional[bool] If true, match only images layers. .. py:attribute:: isQueryable :type: Optional[bool] If true, match only queryable layers. .. py:attribute:: isVisible :type: Optional[bool] If true, match only visible layers. .. py:attribute:: level :type: int :value: 0 Match only layers at this level. .. py:attribute:: names :type: Optional[list[str]] Match these layer names (top-to-bottom order). .. py:attribute:: pattern :type: gws.Regex :value: '' Match layers whose full path matches a pattern. .. py:attribute:: titles :type: Optional[list[str]] Match these layer titles.