wolfhece.wolf_vrt ================= .. py:module:: wolfhece.wolf_vrt .. autoapi-nested-parse:: 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 --------------- .. py:function:: create_vrt(wdir: str, fout: str = 'out.vrt', format: str = 'tif') Agglomération de tous les fichiers .tif dans un layer virtuel .vrt :param wdir: working directory :type wdir: str :param fout: output file :type fout: str :param format: format of the files to process :type format: str .. py:function:: _get_diverged_relative_path(path: pathlib.Path, base: pathlib.Path) -> pathlib.Path Get relative path from base to path, even if they only share part of their paths. More general than the next function "_get_relative_path", especially for not "child/parents paths" .. py:function:: _get_relative_path(path: pathlib.Path, base: pathlib.Path) Get relative path from base to path :param path: path to get relative path :type path: Path :param base: base path :type base: Path .. py:function:: create_vrt_from_files(files: list[pathlib.Path] = [], fout: pathlib.Path = 'assembly.vrt') Agglomération de tous les fichiers énumérés dans files dans un layer virtuel .vrt :param files: list of files to process :type files: list[Path] :param fout: output file :type fout: Path .. py:function:: create_vrt_from_files_first_based(files: list[pathlib.Path] = [], fout: pathlib.Path = 'assembly.vrt', Nodata: float = 99999.0) Agglomération de tous les fichiers énumérés dans files dans un layer virtuel .vrt Restreint l'emprise et force la résolution sur le premier fichier listé .. py:function:: create_vrt_from_diverged_files(files: list[pathlib.Path] = [], fout: pathlib.Path = 'assembly.vrt') Agglomération de tous les fichiers énumérés dans files dans un layer virtuel .vrt :param files: list of files to process :type files: list[Path] :param fout: output file :type fout: Path .. py:function:: create_vrt_from_diverged_files_first_based(files: list[pathlib.Path] = [], fout: pathlib.Path = 'assembly.vrt', Nodata: float = 99999.0) Agglomération de tous les fichiers énumérés dans files dans un layer virtuel .vrt Restreint l'emprise et force la résolution sur le premier fichier listé .. py:function:: translate_vrt2tif(fn: str, fout: str = None) Translate vrt file to tif file :param fn: (str) '.vrt' file to translate :param fout: (str, optional) '.tif' file out. Defaults to None --> fn+'.tif' .. py:function:: crop_vrt(fn: str, crop: list, fout: str = None) Crop vrt file :param fn: (str) '.vrt' file to crop :type fn: str :param crop: (list) Bounds [[xmin, xmax], [ymin,ymax]] aka [[xLL, xUR], [yLL,yUR]] :type crop: list :param fout: (str, optional) '.tif' file out. Defaults to None --> fn+'_crop.tif' :type fout: str .. py:function:: create_contours(files: list[pathlib.Path] = [], fout: pathlib.Path = 'assembly.vec', color_exterior: tuple = (255, 0, 0), color_interior: tuple = (0, 0, 255), width: int = 3, ignore_first: bool = True, create_extern: bool = True, create_intern: bool = True, force_mask_border: bool = True) -> wolfhece.PyVertexvectors.Zones Create contour/footprint from files :param files: list of files to process :type files: list[Path] :param fout: output file :type fout: Path - if None, no output file :param color_exterior: RGB color for exterior contour :type color_exterior: tuple :param color_interior: RGB color for interior contour :type color_interior: tuple :param width: width of the contour :type width: int :param ignore_first: ignore the first file in the list :type ignore_first: bool :param create_extern: create exterior contour :type create_extern: bool :param create_intern: create interior contour :type create_intern: bool :param force_mask_border: force masked data along borders -- [0,:], [-1,:], [:,0], [:,-1 :type force_mask_border: bool .. py:data:: dir :value: 'D:\\OneDrive\\OneDrive - Universite de Liege\\Crues\\2021-07 Vesdre\\CSC - Convention -...