gws.gis.source

Source code: gws.gis.source

Package Contents

gws.gis.source.check_layers(layers: Iterable[gws.SourceLayer], revert: bool = False) list[gws.SourceLayer]

Insert our properties in the source layer tree.

Also remove empty layers.

Parameters:
  • layers – List of source layers

  • revert – Revert the order of layers and sub-layers.

gws.gis.source.combined_crs_list(layers: list[gws.SourceLayer]) list[gws.Crs]

Return an intersection of crs supported by each source layer.

gws.gis.source.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.

gws.gis.source.layer_matches(sl: gws.SourceLayer, f: LayerFilter) bool

Check if a source layer matches the filter

class gws.gis.source.LayerFilter(*args, **kwargs)

Bases: gws.Data

Source layer filter

isGroup: bool | None

if true, match only group layers

isImage: bool | None

if true, match only images layers

isQueryable: bool | None

if true, match only queryable layers

isVisible: bool | None

if true, match only visible layers

level: int = 0

match only layers at this level

names: list[str] | None

match these layer names (top-to-bottom order)

pattern: gws.Regex = ''

match layers whose full path matches a pattern

titles: list[str] | None

match these layer titles