cars.pipelines.parameters.dsm_inputs
CARS dsm inputs
Module Contents
Functions
|
Check the inputs given |
|
Check dsm, mask, color, classif given |
|
Modify input file path to absolute path |
|
Get the optimal tile size to use, depending on memory available |
|
Check if the dsm are phased, and if resolution and epsg code are equivalent |
|
Merge all the dsms |
|
Merge all the variables |
|
Update data |
- cars.pipelines.parameters.dsm_inputs.check_dsm_inputs(conf, config_json_dir=None)[source]
Check the inputs given
- Parameters
conf (dict) – configuration of inputs
config_json_dir (str) – directory of used json, if user filled paths with relative paths
- Returns
overloader inputs
- Return type
dict
- cars.pipelines.parameters.dsm_inputs.check_input_size(dsm, classif, color, mask)[source]
Check dsm, mask, color, classif given
Images must have same size
- Parameters
dsm (str) – phased dsm path
classif (str) – classif path
color (str) – color path
mask (str) – mask path
- cars.pipelines.parameters.dsm_inputs.modify_to_absolute_path(config_json_dir, overloaded_conf)[source]
Modify input file path to absolute path
- Parameters
config_json_dir (str) – directory of the json configuration
overloaded_conf – overloaded configuration json
- Dict overloaded_conf
dict
- cars.pipelines.parameters.dsm_inputs.get_optimal_tile_size(max_ram_per_worker, global_bounds, resolution=0.5)[source]
Get the optimal tile size to use, depending on memory available
- Parameters
max_ram_per_worker (int) – maximum ram available
global_bounds (list) – bounds of the final dsm
resolution (float) – resolution
- Returns
optimal tile size in meter
- Return type
float
- cars.pipelines.parameters.dsm_inputs.check_phasing(dsm_dict)[source]
Check if the dsm are phased, and if resolution and epsg code are equivalent
- Parameters
dsm_dict (dict) – list of phased dsm
- cars.pipelines.parameters.dsm_inputs.merge_dsm_infos(dict_path, orchestrator, roi_poly, dump_dir=None, dsm_file_name=None, color_file_name=None, classif_file_name=None, filling_file_name=None, performance_map_file_name=None, ambiguity_file_name=None, mask_file_name=None, contributing_pair_file_name=None)[source]
Merge all the dsms
- Parameters
dict_path (dict) – path of all variables from all dsms
orchestrator – orchestrator used
dump_dir (str) – output path
dsm_file_name (str) – name of the dsm output file
color_file_name (str) – name of the color output file
classif_file_name (str) – name of the classif output file
filling_file_name (str) – name of the filling output file
performance_map_file_name (str) – name of the performance_map output file
ambiguity_file_name (str) – name of the ambiguity output file
mask_file_name (str) – name of the mask output file
contributing_pair_file_name – name of contributing_pair output file
:rtype : CarsDataset filled with xr.Dataset
- cars.pipelines.parameters.dsm_inputs.dsm_merging_wrapper(dict_path, tile_bounds, resolution, profile, saving_info=None)[source]
Merge all the variables
- Parameters
dict_path (dict) – path of all variables from all dsms
tile_bounds (list) – list of tiles coordinates
resolution (list) – resolution of the dsms
profile (OrderedDict) – profile of the global dsm
- Saving_info
the saving infos
- cars.pipelines.parameters.dsm_inputs.assemblage(out, current_weights, method, intersect_bounds, tile_bounds, height, width, band_description=None)[source]
Update data
- Parameters
out (list of path) – the data to update
current_weights (list of path) – the current weights of the data
method (str) – the method used to update the data
intersect_bounds (list of bounds) – the bounds intersection
height (int) – the height of the tile
width (int) – the width of the tile
band_description (str of list) – the band description of the data