cars.applications.rasterization.simple_gaussian_app =================================================== .. py:module:: cars.applications.rasterization.simple_gaussian_app .. autoapi-nested-parse:: this module contains the dense_matching application class. Classes ------- .. autoapisummary:: cars.applications.rasterization.simple_gaussian_app.SimpleGaussian Functions --------- .. autoapisummary:: cars.applications.rasterization.simple_gaussian_app.rasterization_wrapper cars.applications.rasterization.simple_gaussian_app.raster_final_function Module Contents --------------- .. py:class:: SimpleGaussian(conf=None) Bases: :py:obj:`cars.applications.rasterization.abstract_pc_rasterization_app.PointCloudRasterization` PointCloudRasterisation .. py:attribute:: used_method .. py:attribute:: dsm_radius .. py:attribute:: sigma .. py:attribute:: grid_points_division_factor .. py:attribute:: dsm_no_data .. py:attribute:: texture_no_data .. py:attribute:: color_dtype .. py:attribute:: msk_no_data .. py:attribute:: orchestrator :value: None .. py:method:: check_conf(conf) Check configuration :param conf: configuration to check :type conf: dict :return: overloaded configuration :rtype: dict .. py:method:: get_margins(resolution) Get the margin to use for terrain tiles :param resolution: resolution of raster data (in target CRS unit) :type resolution: float :return: margin in meters or degrees .. py:method:: get_optimal_tile_size(max_ram_per_worker, superposing_point_clouds=1, point_cloud_resolution=0.5) Get the optimal tile size to use, depending on memory available :param max_ram_per_worker: maximum ram available :type max_ram_per_worker: int :param superposing_point_clouds: number of point clouds superposing :type superposing_point_clouds: int :param point_cloud_resolution: resolution of point cloud :type point_cloud_resolution: float :return: optimal tile size in meter :rtype: float .. py:method:: 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) Run PointCloudRasterisation application. Creates a CarsDataset filled with dsm tiles. :param point_clouds: 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" :type point_clouds: CarsDataset filled with pandas.DataFrame :param epsg: epsg of raster data :type epsg: str :param output_crs: output_crs of raster data :type output_crs: str :param resolution: resolution of raster data (in target CRS unit) :type resolution: float :param orchestrator: orchestrator used :param dsm_file_name: path of dsm :type dsm_file_name: str :param weights_file_name: path of dsm weights :type weights_file_name: str :param color_file_name: path of color :type color_file_name: str :param classif_file_name: path of classification :type classif_file_name: str :param performance_map_file_name: path of performance map file :type performance_map_file_name: str :param ambiguity_file_name: path of ambiguity file :type ambiguity_file_name: str :param contributing_pair_file_name: path of contributing pair file :type contributing_pair_file_name: str :param filling_file_name: path of filling file :type filling_file_name: str :param color_dtype: output color image type :type color_dtype: str (numpy type) :param dump_dir: directory used for outputs with no associated filename :type dump_dir: str :param performance_map_classes: list for step defining border of class :type performance_map_classes: list or None :param phasing: if activated, we phase the dsm on this point :type phasing: dict :return: 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 .. py:function:: 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) 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 :param cloud: combined cloud :type cloud: pandas.DataFrame :param terrain_region: terrain bounds :param resolution: Produced DSM resolution (meter, degree [EPSG dependent]) :type resolution: float :param epsg_code: epsg code for the CRS of the output DSM :type epsg_code: int :param window: Window considered :type window: int :param margin: margin in pixel to use :type margin: int :param profile: rasterio profile :param list_computed_layers: list of computed output data :type profile: dict :param saving_info: information about CarsDataset ID. :type saving_info: dict :param sigma: sigma for gaussian interpolation. (If None, set to resolution) :param radius: Radius for hole filling. :param dsm_no_data: no data value to use in the final raster :param texture_no_data: no data value to use in the final colored raster :param msk_no_data: no data value to use in the final mask image :param source_pc_names: list of names of point cloud before merging : name of sensors pair or name of point cloud file :param performance_map_classes: list for step defining border of class :type performance_map_classes: list or None :return: digital surface model + projected colors :rtype: xr.Dataset .. py:function:: raster_final_function(orchestrator, future_object) Apply function to current object, reading already rasterized data :param orchestrator: orchestrator :param future_object: Dataset :return: update object