def __init__(self): """ init method for wms server """ data_access_dict = mss_wms_settings.data for key in data_access_dict: data_access_dict[key].setup() self.hsec_drivers = {} for key in data_access_dict: self.hsec_drivers[key] = mss_plot_driver.HorizontalSectionDriver( data_access_dict[key]) self.vsec_drivers = {} for key in data_access_dict: self.vsec_drivers[key] = mss_plot_driver.VerticalSectionDriver( data_access_dict[key]) self.hsec_layer_registry = {} for layer, datasets in mss_wms_settings.register_horizontal_layers: self.register_hsec_layer(datasets, layer) self.vsec_layer_registry = {} for layer, datasets in mss_wms_settings.register_vertical_layers: self.register_vsec_layer(datasets, layer)
def __init__(self): """ init method for wms server """ data_access_dict = mss_wms_settings.data for key in data_access_dict: data_access_dict[key].setup() self.hsec_drivers = {} for key in data_access_dict: self.hsec_drivers[key] = mss_plot_driver.HorizontalSectionDriver( data_access_dict[key]) self.vsec_drivers = {} for key in data_access_dict: self.vsec_drivers[key] = mss_plot_driver.VerticalSectionDriver( data_access_dict[key]) self.lsec_drivers = {} for key in data_access_dict: self.lsec_drivers[key] = mss_plot_driver.LinearSectionDriver( data_access_dict[key]) self.hsec_layer_registry = {} for layer, datasets in mss_wms_settings.register_horizontal_layers: self.register_hsec_layer(datasets, layer) self.vsec_layer_registry = {} for layer, datasets in mss_wms_settings.register_vertical_layers: self.register_vsec_layer(datasets, layer) self.lsec_layer_registry = {} if not hasattr(mss_wms_settings, "register_linear_layers"): logging.info( "Since 4.0.0 MSS has support for linear layers in the mss_wms_settings.py.\n" "Look at the documentation for an example " "https://mss.readthedocs.io/en/stable/deployment.html#configuration-file-of-the-wms-server" ) mss_wms_settings.register_linear_layers = [] for layer in mss_wms_settings.register_linear_layers: if len(layer) == 3: self.register_lsec_layer(layer[2], layer[1], layer_class=layer[0]) elif len(layer) == 4: self.register_lsec_layer(layer[3], layer[1], layer[2], layer[0]) else: self.register_lsec_layer(layer[1], layer_class=layer[0])