"""WMS PPNC / Walonmap — built-in companion plugin.
Loads all PPNC and Walonmap WMS layers into the active WolfMapViewer:
- Background: historical PPNC orthophotos (1971 – 2023) and France orthos.
- Foreground: water / limits / cadastral plans (EAU, LIMITES, R3C, PLAN_REGLEMENT).
"""
from wolfhece._builtin_plugins.wms_base import WmsLayerCompanion
from wolfhece.PyTranslate import _
[docs]
class WmsPpncCompanion(WmsLayerCompanion):
"""Companion plugin that loads PPNC / Walonmap WMS layers."""
[docs]
def _do_load_layers(self) -> None:
from wolfhece.wolf_texture import imagetexture
v = self.proxy._viewer
xmin = xmax = ymin = ymax = 0
orthos = {
'IMAGERIE': {
'Last one': 'ORTHO_LAST',
'1971': 'ORTHO_1971',
'1994-2000': 'ORTHO_1994_2000',
'2006-2007': 'ORTHO_2006_2007',
'2009-2010': 'ORTHO_2009_2010',
'2012-2013': 'ORTHO_2012_2013',
'2015': 'ORTHO_2015',
'2016': 'ORTHO_2016',
'2017': 'ORTHO_2017',
'2018': 'ORTHO_2018',
'2019': 'ORTHO_2019',
'2020': 'ORTHO_2020',
'2021': 'ORTHO_2021',
'2022 printemps': 'ORTHO_2022_PRINTEMPS',
'2022 \u00e9t\u00e9': 'ORTHO_2022_ETE',
'2023 \u00e9t\u00e9': 'ORTHO_2023_ETE',
},
}
forelist = {
'EAU': {
'Aqualim': 'RES_LIMNI_DGARNE',
'Alea': 'ALEA_INOND',
'Lidaxes': 'LIDAXES',
},
'LIMITES': {
'Secteurs Statistiques': 'LIMITES_QS_STATBEL',
'Limites administratives': 'LIMITES_ADMINISTRATIVES',
},
'R3C': {'Limites Communes': 'Municipalities'},
'PLAN_REGLEMENT': {
'Plan Parcellaire 2021': 'CADMAP_2021_PARCELLES',
'Plan Parcellaire 2022': 'CADMAP_2022_PARCELLES',
'Plan Parcellaire 2023': 'CADMAP_2023_PARCELLES',
'Plan Parcellaire 2024': 'CADMAP_2024_PARCELLES',
},
}
for k, item in orthos.items():
for m, subitem in item.items():
self._add_wms('wmsback',
imagetexture('PPNC', m, k, subitem,
v, xmin, xmax, ymin, ymax, -99999, 1024),
'PPNC ' + m)
self._add_wms('wmsback',
imagetexture('PPNC', 'Orthos France', 'OI.OrthoimageCoverage.HR', '',
v, xmin, xmax, ymin, ymax, -99999, 1024,
France=True, epsg='EPSG:2154'),
'Orthos France')
for k, item in forelist.items():
for m, subitem in item.items():
self._add_wms('wmsfore',
imagetexture('PPNC', m, k, subitem,
v, xmin, xmax, ymin, ymax, -99999, 1024),
m)
self.proxy.set_status(_('PPNC / Walonmap WMS layers loaded.'))