wolfhece.acceptability.Parallels
Author: University of Liege, HECE, LEMA 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.acceptability.Parallels.parallel_gpd_clip(layer: list[str], file_path: str, Study_Area: str, output_dir: str, number_procs: int = 1)[source]
Clip the layers to the study area.
Process the layers in parallel.
FIXME: The GPKG driver is it totally parallel compliant?
- Parameters:
layer – List of layers to clip
file_path – The path to the file
Study_Area – The study area
output_dir – The output directory where the clipped layers are stored
number_procs – The number of processors to use
- wolfhece.acceptability.Parallels.parallel_v2r(manager: wolfhece.acceptability.func.Accept_Manager, attribute: str, pixel: float, number_procs: int = 1, convert_to_sparse: bool = False)[source]
Convert the vector layers to raster.
Process the layers in parallel.
- Remark:
It is permitted to execute this function in multiprocessing because we write separate files.
- Parameters:
manager – The Accept_Manager object
attribute – The attribute to convert to raster
pixel – The pixel size of the raster
number_procs – The number of processors to use
- wolfhece.acceptability.Parallels.parallel_datamod(manager: wolfhece.acceptability.func.Accept_Manager, picc: geopandas.GeoDataFrame, capa: geopandas.GeoDataFrame, number_procs: int = 1)[source]
Apply the data modification to the layers.
Process the layers in parallel.
- Remark:
It is permitted to execute this function in multiprocessing because we write separate files.
- Parameters:
manager – The Accept_Manager object
number_procs – The number of processors to use