wolfhece.lifewatch
Module Contents
- class wolfhece.lifewatch.LifeWatch_Legend[source]
Bases:
enum.Enum
https://www.mdpi.com/2306-5729/8/1/13
Map Class Map Code Related EAGLE Code Percentage of Land Area [%] Based on 2018 Product Water 10 LCC-3 0.73 Natural Material Surfaces with less than 10% vegetation 15 LCC-1_2 0.32 Artificially sealed ground surface 20 LCC-1_1_1_3 5.75 Building, specific structures and facilities 21 LCC-1_1_1_1 || LCC-1_1_1_2 1.99 Herbaceous in rotation during the year (e.g., crops) 30 LCC-2_2 23.94 Grassland with intensive management 35 LCC-2_2 27.57 Grassland and scrub of biological interest 40 LCC-2_2 1.82 Inundated grassland and scrub of biological interest 45 LCC-2_2 & LCH-4_4_2 0.22 Vegetation of recently disturbed area (e.g., clear cut) 48 LCC-2_2 & LCH-3_8 2.64 Coniferous trees (≥3 m) 50 LCC-2_1_1 & LCH-3_1_1 11.24 Small coniferous trees (<3 m) 51 LCC-2_1_2 & LCH-3_1_1 0.40 Broadleaved trees (≥3 m) 55 LCC-2_1_1 & LCH-3_1_2 21.63 Small broadleaved trees (<3 m) and shrubs 56 LCC-2_1_2 & LCH-3_1_2 1.75
Color Table (RGB with 256 entries) from tiff file 10: 10,10,210 15: 210,210,210 20: 20,20,20 21: 210,0,0 30: 230,230,130 35: 235,170,0 40: 240,40,240 45: 145,245,245 48: 148,118,0 50: 50,150,50 51: 0,151,151 55: 55,255,0 56: 156,255,156
46: 246,146,246,255 11: 254,254,254,255
- classmethod colors(rgba: bool = False) list[tuple[int, int, int] | tuple[int, int, int, int]] [source]
Return the color of the class as a tuple (R, G, B)
- classmethod colors2codes(array: numpy.ndarray | PIL.Image.Image, aswolf: bool = True) numpy.ndarray [source]
Convert the color of the class to the code of the class :param array: numpy array or PIL image
- wolfhece.lifewatch.get_LifeWatch_bounds(year: int, xmin: float, ymin: float, xmax: float, ymax: float, format: Literal[wolfhece.wolf_array.WolfArray, NUMPY, RGB, RGBA, Palette] = 'WolfArray', force_size: bool = True) wolfhece.wolf_array.WolfArray | numpy.ndarray | PIL.Image.Image [source]
- wolfhece.lifewatch.get_LifeWatch_Wallonia(year: int, format: Literal[wolfhece.wolf_array.WolfArray, NUMPY, RGB, RGBA, Palette] = 'WolfArray') wolfhece.wolf_array.WolfArray | numpy.ndarray | PIL.Image.Image [source]
Get the Wallonia LifeWatch map for the given year :param year: year of the map :param asimage: if True, return the image as PIL image, else return numpy array :return: numpy array or PIL image
- wolfhece.lifewatch.get_LifeWatch_center_width_height(year: int, x: float, y: float, width: float = 2000, height: float = 2000, format: Literal[wolfhece.wolf_array.WolfArray, NUMPY, RGB, RGBA, Palette] = 'WolfArray') wolfhece.wolf_array.WolfArray | numpy.ndarray | PIL.Image.Image [source]
Get the LifeWatch map for the given year and center :param year: year of the map :param x: x coordinate of the center :param y: y coordinate of the center :param asimage: if True, return the image as PIL image, else return numpy array :return: numpy array or PIL image
- wolfhece.lifewatch.count_pixels(array: numpy.ndarray | wolfhece.wolf_array.WolfArray) dict[int, int] [source]
Count the number of pixels for each code in the array :param array: numpy array or WolfArray :return: dictionary with the code as key and the number of pixels as value
- wolfhece.lifewatch.get_areas(array: numpy.ndarray | wolfhece.wolf_array.WolfArray) dict[int, float] [source]
Get the areas of each code in the array :param array: numpy array or WolfArray :return: dictionary with the code as key and the area in m² as value