qgreenland/util/config.py
def _deref_layers(cfg):
    """Dereferences layers in `cfg`, modifying `cfg`.

    Expects boundaries to already be dereferenced.
    """
    layers_config = cfg['layers']
    datasets_config = cfg['datasets']
    project_config = cfg['project']
    for layer_config in layers_config:
        # Populate related dataset configuration
        if 'dataset' not in layer_config:
            dataset_id, source_id = layer_config['data_source'].split('.')
            dataset_config = _find_in_list_by_id(datasets_config, dataset_id)
            layer_config['dataset'] = dataset_config

            layer_config['source'] = _find_in_list_by_id(dataset_config['sources'],
                                                         source_id)
            del layer_config['dataset']['sources']

        # Always default to the background extent
        boundary_name = layer_config.get('boundary', 'background')

        layer_config['boundary'] = project_config['boundaries'][boundary_name]
Dereferences layers in `cfg`, modifying `cfg`.

    Expects boundaries to already be dereferenced.
    
Dereferences layers in `cfg`, modifying `cfg`.
Expects boundaries to already be dereferenced.
Dereferences layers in ` cfg ` modifying ` cfg ` . Expects boundaries to already be dereferenced .
def _deref_layers(cfg):
    layers_config = cfg['layers']
    datasets_config = cfg['datasets']
    project_config = cfg['project']
    for layer_config in layers_config:
        if 'dataset' not in layer_config:
            dataset_id, source_id = layer_config['data_source'].split('.')
            dataset_config = _find_in_list_by_id(datasets_config, dataset_id)
            layer_config['dataset'] = dataset_config
            layer_config['source'] = _find_in_list_by_id(dataset_config['sources'],
                                                         source_id)
            del layer_config['dataset']['sources']
        boundary_name = layer_config.get('boundary', 'background')
        layer_config['boundary'] = project_config['boundaries'][boundary_name]
def _deref_layers ( cfg ) : layers_config = cfg [ 'layers' ] datasets_config = cfg [ 'datasets' ] project_config = cfg [ 'project' ] for layer_config in layers_config : if 'dataset' not in layer_config : dataset_id , source_id = layer_config [ 'data_source' ] . split ( '.' ) dataset_config = _find_in_list_by_id ( datasets_config , dataset_id ) layer_config [ 'dataset' ] = dataset_config layer_config [ 'source' ] = _find_in_list_by_id ( dataset_config [ 'sources' ] , source_id ) del layer_config [ 'dataset' ] [ 'sources' ] boundary_name = layer_config . get ( 'boundary' , 'background' ) layer_config [ 'boundary' ] = project_config [ 'boundaries' ] [ boundary_name ]
Dereferences layers in `cfg`, modifying `cfg`.
Dereferences layers in ` cfg ` modifying ` cfg ` .
"""Dereferences layers in `cfg`, modifying `cfg`.

    Expects boundaries to already be dereferenced.
    """ # Populate related dataset configuration # Always default to the background extent
cfg