cars.applications.rasterization.simple_gaussian_app
this module contains the dense_matching application class.
Classes
PointCloudRasterisation |
Functions
|
Wrapper for rasterization step : |
|
Apply function to current object, reading already rasterized data |
Module Contents
- class cars.applications.rasterization.simple_gaussian_app.SimpleGaussian(conf=None)[source]
Bases:
cars.applications.rasterization.abstract_pc_rasterization_app.PointCloudRasterizationPointCloudRasterisation
- used_method
- dsm_radius
- sigma
- grid_points_division_factor
- dsm_no_data
- texture_no_data
- color_dtype
- msk_no_data
- orchestrator = None
- check_conf(conf)[source]
Check configuration
- Parameters:
conf (dict) – configuration to check
- Returns:
overloaded configuration
- Return type:
dict
- get_margins(resolution)[source]
Get the margin to use for terrain tiles
- Parameters:
resolution (float) – resolution of raster data (in target CRS unit)
- Returns:
margin in meters or degrees
- get_optimal_tile_size(max_ram_per_worker, superposing_point_clouds=1, point_cloud_resolution=0.5)[source]
Get the optimal tile size to use, depending on memory available
- Parameters:
max_ram_per_worker (int) – maximum ram available
superposing_point_clouds (int) – number of point clouds superposing
point_cloud_resolution (float) – resolution of point cloud
- Returns:
optimal tile size in meter
- Return type:
float
- run(point_clouds, epsg, output_crs, resolution, orchestrator=None, dsm_file_name=None, weights_file_name=None, color_file_name=None, classif_file_name=None, performance_map_file_name=None, ambiguity_file_name=None, contributing_pair_file_name=None, filling_file_name=None, color_dtype=None, dump_dir=None, performance_map_classes=None, phasing=None)[source]
Run PointCloudRasterisation application.
Creates a CarsDataset filled with dsm tiles.
- Parameters:
point_clouds (CarsDataset filled with pandas.DataFrame) –
merged point cloud or list of array point clouds
. CarsDataset contains:
Z x W Delayed tiles. Each tile will be a future pandas DataFrame containing:
data with keys “x”, “y”, “z”, “corr_msk” optional: “texture”, “mask”, “data_valid”, “z_inf”, “z_sup” “coord_epi_geom_i”, “coord_epi_geom_j”, “idx_im_epi”
attrs with keys “epsg”, “ysize”, “xsize”, “xstart”, “ystart”
attributes containing “bounds”, “ysize”, “xsize”, “epsg”
OR
- Tuple(list of CarsDataset Arrays, bounds). With list of point
clouds: list of CarsDataset of type array, with: - data with keys x”, “y”, “z”, “corr_msk”, “z_inf”, “z_sup” optional: “texture”, “mask”, “data_valid”, “coord_epi_geom_i”, “coord_epi_geom_j”, “idx_im_epi”
epsg (str) – epsg of raster data
output_crs (str) – output_crs of raster data
resolution (float) – resolution of raster data (in target CRS unit)
orchestrator – orchestrator used
dsm_file_name (str) – path of dsm
weights_file_name (str) – path of dsm weights
color_file_name (str) – path of color
classif_file_name (str) – path of classification
performance_map_file_name (str) – path of performance map file
ambiguity_file_name (str) – path of ambiguity file
contributing_pair_file_name (str) – path of contributing pair file
filling_file_name (str) – path of filling file
color_dtype (str (numpy type)) – output color image type
dump_dir (str) – directory used for outputs with no associated filename
performance_map_classes (list or None) – list for step defining border of class
phasing (dict) – if activated, we phase the dsm on this point
- Returns:
raster DSM. CarsDataset contains:
Z x W Delayed tiles. Each tile will be a future xarray Dataset containing:
data : with keys : “hgt”, “img”, “raster_msk”,optional : “n_pts”, “pts_in_cell”, “hgt_mean”, “hgt_stdev”, “hgt_inf”, “hgt_sup”
attrs with keys: “epsg”
attributes containing: None
:rtype : CarsDataset filled with xr.Dataset
- cars.applications.rasterization.simple_gaussian_app.rasterization_wrapper(cloud, resolution, epsg, profile, window=None, terrain_region=None, terrain_full_roi=None, list_computed_layers: List[str] = None, saving_info=None, sigma: float = None, radius: int = 1, dsm_no_data: int = np.nan, texture_no_data: int = np.nan, color_dtype: str = 'float32', msk_no_data: int = 255, source_pc_names=None, performance_map_classes=None)[source]
Wrapper for rasterization step : - Convert a list of clouds to correct epsg - Rasterize it with associated colors
- if terrain_region is not provided: region is computed from point cloud,
with margin to use
- Parameters:
cloud (pandas.DataFrame) – combined cloud
terrain_region – terrain bounds
resolution (float) – Produced DSM resolution (meter, degree [EPSG dependent])
epsg_code (int) – epsg code for the CRS of the output DSM
window (int) – Window considered
margin (int) – margin in pixel to use
profile (dict) – rasterio profile
list_computed_layers – list of computed output data
saving_info (dict) – information about CarsDataset ID.
sigma – sigma for gaussian interpolation. (If None, set to resolution)
radius – Radius for hole filling.
dsm_no_data – no data value to use in the final raster
texture_no_data – no data value to use in the final colored raster
msk_no_data – no data value to use in the final mask image
source_pc_names – list of names of point cloud before merging : name of sensors pair or name of point cloud file
performance_map_classes (list or None) – list for step defining border of class
- Returns:
digital surface model + projected colors
- Return type:
xr.Dataset