Source code for wolfhece._builtin_plugins.wms_flood2021.companion

"""WMS Crue juillet 2021 — built-in companion plugin.

Loads WMS layers for the July 2021 flood event:
- Background: PPNC inundated zone extents and IDW maps (EAU / ZONES_INONDEES*).
- Background: IGN post-flood orthophotos (orthoimage_flood).
"""
from wolfhece._builtin_plugins.wms_base import WmsLayerCompanion
from wolfhece.PyTranslate import _


[docs] class WmsFlood2021Companion(WmsLayerCompanion): """Companion plugin that loads July 2021 flood WMS layers."""
[docs] def _do_load_layers(self) -> None: from wolfhece.wolf_texture import imagetexture v = self.proxy._viewer xmin = xmax = ymin = ymax = 0 data_2021 = { 'EAU': { 'IDW': 'ZONES_INONDEES_IDW', 'Emprise': 'ZONES_INONDEES', 'Emprise wo Alea': 'ZONES_INONDEES_wo_alea', }, } ign_postflood2021 = { 'PostFlood2021': {'Flood 2021': 'orthoimage_flood'}, } for k, item in data_2021.items(): for m, subitem in item.items(): self._add_wms('wmsback', imagetexture('PPNC', m, k, subitem, v, xmin, xmax, ymin, ymax, -99999, 1024), 'Data 2021 ' + m) for k, item in ign_postflood2021.items(): for m, subitem in item.items(): self._add_wms('wmsback', imagetexture('IGN 2021', m, k, subitem, v, xmin, xmax, ymin, ymax, -99999, 1024, postFlood2021=True), 'orthos post2021') self.proxy.set_status(_('July 2021 flood WMS layers loaded.'))