cars.applications.dem_generation.rasterization
this module contains the dichotomic dem generation application class.
Module Contents
Classes
Rasterization |
Functions
|
Change transform of an image |
|
Compute the opposite of a DEM : |
|
Downsample median DEM with median resampling |
|
Launch bulldozer on a DEM to smooth it |
|
Compute and display statistics of difference between two DEM : |
- class cars.applications.dem_generation.rasterization.Rasterization(conf=None)[source]
Bases:
cars.applications.dem_generation.dem_generation.DemGenerationRasterization
- check_conf(conf)[source]
Check configuration
- Parameters
conf (dict) – configuration to check
- Returns
overloaded configuration
- Return type
dict
- run(triangulated_matches_list, output_dir, geoid_path, dem_roi_to_use=None, initial_elevation=None, cars_orchestrator=None)
Run dichotomic dem generation using matches
- Parameters
triangulated_matches_list (list(pandas.Dataframe)) – list of triangulated matches positions must be in a metric system
output_dir (str) – directory to save dem
geoid_path – geoid path
dem_roi_to_use – dem roi polygon to use as roi
- Returns
dem data computed with mean, min and max. dem is also saved in disk, and paths are available in attributes. (DEM_MEDIAN_PATH, DEM_MIN_PATH, DEM_MAX_PATH)
- Return type
- cars.applications.dem_generation.rasterization.edit_transform(input_dem, resolution=None, transform=None)[source]
Change transform of an image :param input_res: path of image :type input_dem: str :param resolution: image resolution for new transform to apply :type resolution: float :param transform: new transform to apply if resolution is not given :type transform: affine.Affine
- cars.applications.dem_generation.rasterization.reverse_dem(input_dem)[source]
Compute the opposite of a DEM : Altitudes sign is changed
- Parameters
input_dem (str) – path of DEM to reverse
- cars.applications.dem_generation.rasterization.downsample_dem(input_dem, scale)[source]
Downsample median DEM with median resampling
- Parameters
input_dem (str) – path of DEM to downsample (only one band)
- cars.applications.dem_generation.rasterization.launch_bulldozer(input_dem, output_dir, cars_orchestrator, max_object_size)[source]
Launch bulldozer on a DEM to smooth it
- Parameters
input_dem (str) – path of DEM to reverse
output_dir (str) – directory where bulldozer output is dumped
cars_orchestrator (Orchestrator) – orchestrator of the whole pipeline (used to get number of workers)
max_object_size (int) – bulldozer parameter “max_object_size”