wolfhece.pywalous

Author: HECE - University of Liege, Pierre Archambeau Date: 2024

Copyright (c) 2024 University of Liege. All rights reserved.

This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited.

Module Contents

wolfhece.pywalous.HYDROLOGY_LANDUSE_FR[source]
wolfhece.pywalous.HYDROLOGY_LANDUSE_EN[source]

//metawal.wallonie.be/geonetwork/srv/api/records/86462606-4a21-49c8-ab9e-564ccba681b7/attachments/DescriptionLegende_WALOUS_OCS.pdf

1. Revêtement artificiel du sol: cette classe reprend tous les revêtements artificiels du sol de nature peu ou pas perméable (ex béton, le bitume ou les pavés). Ceci comprend le réseau routier, les trottoirs, les terrasses, les parkings (les emplacements de parking semiperméables non végétalisés sont également dans cette catégorie) et les terrains ou pistes de sport en matériaux synthétiques. 2. Constructions artificielles hors sol : cette classe reprend tous les bâtiments et autres constructions s’élevant au-dessus du sol. 3. Réseau ferroviaire : cette classe reprend les rails et ballasts des chemins de fer encore en activité (les RaVEL entre dans la classe 1). Cette classe se différencie de la classe 1 par sa grande perméabilité. 4. Sols nus : cette classe inclut tout type de roche mère n’étant couverte par des végétaux supérieurs à aucun moment de l’année. Ces sols sont soit naturels (roches affleurantes, falaises, berges caillouteuses…), soit générés par l’activité humaine (extraction, sols compactés, coupe à blanc de l’année…) 5. Eaux de surface : cette classe comprend toutes les surfaces d’eau libre, naturelles ou artificielles. Ceci inclut donc à la fois les cours d’eau (rivières, fleuves et canaux) et les plans d’eau (mares, étangs, lacs, bassins de décantation, piscines extérieures). 6. Couvert herbacé en rotation : cette classe reprend les parcelles combinant un couvert herbacé une partie de l’année et un sol nu temporairement mis à nu. On y retrouve toutes les cultures annuelles, ainsi que les prairies temporaires succédant à une culture annuelle. 7. Couvert herbacé continu : cette classe reprend tous les sols recouverts par de la végétation herbacée tout au long de l’année. Cette végétation peut être d’origine naturelle (landes, mégaphorbiaies, tourbières, pelouses naturelles, végétation rudérale recolonisant une friche ou une ancienne coupe à blanc…), agricole (prés et prairies non labourés dans la saison) ou artificielle (jardin, terrains de sport, parcs…) 8. Arbres résineux : cette classe comprend tous les arbres de plus de 3 m (isolés, en haie ou en peuplement) du groupe des résineux (gymnosperme). 9. Arbres feuillus : cette classe comprend tous les arbres de plus de 3 m (isolés, en haie ou en peuplement) du groupe des feuillus (angiosperme). 80. Arbustes résineux : cette classe comprend tous les arbres et arbustes de moins de 3 m (isolés, en haie ou en peuplement) du groupe des résineux (gymnosperme). 90. Arbustes feuillus : cette classe comprend tous les arbres et arbuste de moins de 3 m (isolés, en haie ou en peuplement) du groupe des feuillus (angiosperme).

<paletteEntry color=”#8a8a8a” value=”1” alpha=”255” label=”Revêtement artificiel au sol”/> <paletteEntry color=”#dc0f0f” value=”2” alpha=”255” label=”Constructions artificielles hors sol”/> <paletteEntry color=”#4e4e4e” value=”3” alpha=”255” label=”Réseau ferroviaire”/> <paletteEntry color=”#d0d0d0” value=”4” alpha=”255” label=”Sols nus”/> <paletteEntry color=”#2461f7” value=”5” alpha=”255” label=”Eaux de surface”/> <paletteEntry color=”#ffff73” value=”6” alpha=”255” label=”Couvert herbacé en rotation dans l’année (ex: culture annuelle)”/> <paletteEntry color=”#e9ffbe” value=”7” alpha=”255” label=”Couvert herbacé toute l’année”/> <paletteEntry color=”#003200” value=”8” alpha=”255” label=”Résineux (> 3m)”/> <paletteEntry color=”#007800” value=”80” alpha=”255” label=”Résineux (≤ 3m)”/> <paletteEntry color=”#28c828” value=”9” alpha=”255” label=”Feuillus (> 3m)”/> <paletteEntry color=”#b7e8b0” value=”90” alpha=”255” label=”Feuillus (≤ 3m)”/> <paletteEntry color=”#e5ea3f” value=”0” alpha=”0” label=”Pas de données”/>

Type:

Extrait de https

wolfhece.pywalous.WALOUS_OCS[source]
wolfhece.pywalous.WALOUS_OCS_COLORMAP[source]
wolfhece.pywalous.WALOUS_OCS2MANNING[source]
wolfhece.pywalous.WALOUS_OCS2HYDROLOGY[source]
wolfhece.pywalous.WALOUS_UTS_MAJ_NIV1[source]
wolfhece.pywalous.WALOUS_UTS_MAJ_NIV2[source]
wolfhece.pywalous.WALOUS_UTS_COLORMAP_MAJ_NIV1[source]
wolfhece.pywalous.WALOUS_UTS_COLORMAP_MAJ_NIV2[source]
wolfhece.pywalous.WALOUS_UTS2MANNING_MAJ_NIV1[source]
wolfhece.pywalous.WALOUS_UTS2MANNING_MAJ_NIV2[source]
wolfhece.pywalous.get_palette_walous_uts(which: Literal['MAJ_NIV1', 'MAJ_NIV2']) wolfhece.PyPalette.wolfpalette[source]

Get the palette for WALOUS

:return : palette

wolfhece.pywalous.get_palette_walous_ocs() wolfhece.PyPalette.wolfpalette[source]

Get the palette for WALOUS OCS

:return : palette

wolfhece.pywalous.update_palette_walous_uts(which: Literal['UTS_MAJ_NIV1', 'UTS_MAJ_NIV2'], pal: wolfhece.PyPalette.wolfpalette)[source]

Update the palette for WALOUS MAJ_NIV1

:param pal : palette to update :return : updated palette

wolfhece.pywalous.update_palette_walous_ocs(pal: wolfhece.PyPalette.wolfpalette)[source]

Update the palette for WALOUS OCS

:param pal : palette to update :return : updated palette

class wolfhece.pywalous.Walous_data(dir_data: str = '', fn: str = 'WAL_UTS__2018_L72', extension: str = '.shp', bounds: list[float, float, float, float] | list[list[float, float], list[float, float]] = None)[source]

La donnée Walous est liée à l’utilisation des sols en Wallonie

source : https://geoportail.wallonie.be/walous

Cette classe permet la manipulation de la donnée dans le cadre du projet MODREC et plus spécifiquement la distribution d’un coefficient de frottement sur base de la donnée Walous.

_dir = ''[source]
_fn = ''[source]
_extension = '.shp'[source]
_gdf = None[source]
read(force: bool = False, bounds: list[float, float, float, float] | list[list[float, float], list[float, float]] = None)[source]

Read data from file

:param force : force to read even read was done before :param bounds : [xmin, ymin, xmax, ymax] or [[xmin, xmax], [ymin, ymax]]

write(fnout: str = 'out_clip.shp')[source]

Write _gdf to file

:param fnout : output filename

to_file(fn: str = 'out_clip.shp')[source]

Alias to write

:param fn : output filename

rasterize(bounds: list[float, float, float, float] | list[list[float, float], list[float, float]], layer: Literal['UTS_MAJ_NIV1', 'UTS_MAJ_NIV2'] = 'UTS_MAJ_NIV1', fn_out: str = 'out.tif', pixel_size: float = 0.5, NoData_value: float = -99999.0, num_type=gdal.GDT_Float32)[source]

Rasterization of polygon data to tif.

:param bounds : [xmin, ymin, xmax, ymax] or [[xmin, xmax], [ymin, ymax]] :param layer : layer to rasterize :param fn_out : output filename :param pixel_size : pixel size :param NoData_value : NoData value :param num_type : type of the number

class wolfhece.pywalous.DlgMapWalous2Manning(parent, title: str = _('Mapping WALOUS value to ...'), which: Literal['UTS_MAJ_NIV1', 'UTS_MAJ_NIV2', 'OCS_MANNING', 'OCS_HYDROLOGY'] = 'UTS_MAJ_NIV1')[source]

Bases: wx.Dialog

Inheritance diagram of wolfhece.pywalous.DlgMapWalous2Manning

Modal dialog for mapping WALOUS value to another ones

_table[source]
on_ok(event)[source]
on_cancel(event)[source]
get_mapping() dict[source]
class wolfhece.pywalous.DlgMapWalousOCS2Manning(parent, title: str = _('Mapping WALOUS value to ...'))[source]

Bases: DlgMapWalous2Manning

Inheritance diagram of wolfhece.pywalous.DlgMapWalousOCS2Manning

Modal dialog for mapping WALOUS value to another ones

This dialog is used to map WALOUS values to hydrology values. It inherits from DlgMapWalous2Manning and overrides the initialization to set the correct column labels and values.

class wolfhece.pywalous.DlgMapWalous2Hydrology(parent, title: str = _('Mapping WALOUS value to ...'))[source]

Bases: DlgMapWalous2Manning

Inheritance diagram of wolfhece.pywalous.DlgMapWalous2Hydrology

Modal dialog for mapping WALOUS value to another ones

This dialog is used to map WALOUS values to hydrology values. It inherits from DlgMapWalous2Manning and overrides the initialization to set the correct column labels and values.

class wolfhece.pywalous.Walous_UTS_Legend(*args, **kw)[source]

Bases: wx.Dialog

Inheritance diagram of wolfhece.pywalous.Walous_UTS_Legend

Show the legend of WALOUS

_text_v1[source]
_text_v2[source]
_legend_v1[source]
_legend_v2[source]
close()[source]
class wolfhece.pywalous.Walous_OCS_Legend(*args, **kw)[source]

Bases: wx.Dialog

Inheritance diagram of wolfhece.pywalous.Walous_OCS_Legend

Show the legend of WALOUS OCS

_text[source]
_legend[source]
close()[source]
wolfhece.pywalous.get_array_WALOUS_OCS(fname: pathlib.Path, spatial_res: float, bounds: list[float, float, float, float] | list[list[float, float], list[float, float]]) wolfhece.wolf_array.WolfArray | None[source]

Get WALOUS OCS as WolfArray

Parameters:
  • fname – path to the WALOUS OCS file

  • spatial_res – desired spatial resolution (in m)

  • bounds – [xmin, ymin, xmax, ymax] or [[xmin, xmax], [ymin, ymax]]

Returns:

WolfArray or None if error

wolfhece.pywalous.get_array_WALOUS_OCS_2023_10m(spatial_res: float, bounds: list[float, float, float, float] | list[list[float, float], list[float, float]]) wolfhece.wolf_array.WolfArray | None[source]

Get WALOUS OCS 2023 as WolfArray

Parameters:
  • spatial_res – desired spatial resolution (in m)

  • bounds – [xmin, ymin, xmax, ymax] or [[xmin, xmax], [ymin, ymax]]

Returns:

WolfArray or None if error

wolfhece.pywalous.get_array_WALOUS_OCS_2023_4m(spatial_res: float, bounds: list[float, float, float, float] | list[list[float, float], list[float, float]]) wolfhece.wolf_array.WolfArray | None[source]

Get WALOUS OCS 2023 as WolfArray

Parameters:
  • spatial_res – desired spatial resolution (in m)

  • bounds – [xmin, ymin, xmax, ymax] or [[xmin, xmax], [ymin, ymax]]

Returns:

WolfArray or None if error

wolfhece.pywalous.get_array_WALOUS_OCS_2020_10m(spatial_res: float, bounds: list[float, float, float, float] | list[list[float, float], list[float, float]]) wolfhece.wolf_array.WolfArray | None[source]

Get WALOUS OCS 2020 as WolfArray

Parameters:
  • spatial_res – desired spatial resolution (in m)

  • bounds – [xmin, ymin, xmax, ymax] or [[xmin, xmax], [ymin, ymax]]

Returns:

WolfArray or None if error

wolfhece.pywalous.get_array_WALOUS_OCS_2020_4m(spatial_res: float, bounds: list[float, float, float, float] | list[list[float, float], list[float, float]]) wolfhece.wolf_array.WolfArray | None[source]

Get WALOUS OCS 2020 as WolfArray

Parameters:
  • spatial_res – desired spatial resolution (in m)

  • bounds – [xmin, ymin, xmax, ymax] or [[xmin, xmax], [ymin, ymax]]

Returns:

WolfArray or None if error

wolfhece.pywalous.get_array_WALOUS_UTS(fname: pathlib.Path, fnout: pathlib.Path, spatial_res: float, bounds: list[float, float, float, float] | list[list[float, float], list[float, float]], which: Literal['UTS_MAJ_NIV1', 'UTS_MAJ_NIV2'] = 'UTS_MAJ_NIV1') wolfhece.wolf_array.WolfArray | None[source]

Get WALOUS UTS as WolfArray

Parameters:
  • fname – path to the WALOUS UTS file

  • spatial_res – desired spatial resolution (in m)

  • bounds – [xmin, ymin, xmax, ymax] or [[xmin, xmax], [ymin, ymax]]

  • which – which level to use (‘UTS_MAJ_NIV1’ or ‘UTS_MAJ_NIV2’)

Returns:

WolfArray or None if error