cars.applications.rasterization.rasterization_algo ================================================== .. py:module:: cars.applications.rasterization.rasterization_algo .. autoapi-nested-parse:: This module is responsible for the rasterization step: - it contains all functions related to 3D representation on a 2D raster grid TODO: refactor in several files and remove too-many-lines Functions --------- .. autoapisummary:: cars.applications.rasterization.rasterization_algo.simple_rasterization_dataset_wrapper cars.applications.rasterization.rasterization_algo.compute_vector_raster_and_stats cars.applications.rasterization.rasterization_algo.rasterize Module Contents --------------- .. py:function:: simple_rasterization_dataset_wrapper(cloud: pandas.DataFrame, resolution: float, epsg: int, xstart: float = None, ystart: float = None, xsize: int = None, ysize: int = None, sigma: float = None, radius: int = 1, dsm_no_data: int = np.nan, texture_no_data: int = np.nan, msk_no_data: int = 255, list_computed_layers: List[str] = None, source_pc_names: List[str] = None, performance_map_classes: List[float] = None, cloud_global_id: int = None) -> xarray.Dataset Wrapper of simple_rasterization that has xarray.Dataset as inputs and outputs. :param cloud: cloud to rasterize :param resolution: Resolution of rasterized cells, expressed in cloud CRS units or None :param epsg: epsg code for the CRS of the final raster :param color_list: Additional list of images with bands to rasterize (same size as cloud_list), or None :param xstart: xstart of the rasterization grid (if None, will be estimated by the function) :param ystart: ystart of the rasterization grid (if None, will be estimated by the function) :param xsize: xsize of the rasterization grid (if None, will be estimated by the function) :param ysize: ysize of the rasterization grid (if None, will be estimated by the function) :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 list_computed_layers: list of computed output data :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 :param cloud_global_id: global id of pair :type cloud_global_id: int :return: Rasterized cloud .. py:function:: compute_vector_raster_and_stats(cloud: pandas.DataFrame, x_start: float, y_start: float, x_size: int, y_size: int, resolution: float, sigma: float, radius: int, list_computed_layers: List[str] = None, cloud_global_id: int = None) -> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, List[str], Union[None, numpy.ndarray, list, dict]] Compute vectorized raster and its statistics. :param cloud: Combined cloud as returned by the create_combined_cloud function :param x_start: x start of the rasterization grid :param y_start: y start of the rasterization grid :param x_size: x size of the rasterization grid :param y_size: y size of the rasterization grid :param resolution: Resolution of rasterized cells, expressed in cloud CRS units or None. :param sigma: Sigma for gaussian interpolation. If None, set to resolution :param radius: Radius for hole filling. :param list_computed_layers: list of computed output data :param cloud_global_id: global id of pair :return: a tuple with rasterization results and statistics. .. py:function:: rasterize(cloud: pandas.DataFrame, resolution: float, epsg: int, x_start: float, y_start: float, x_size: int, y_size: int, sigma: float = None, radius: int = 1, hgt_no_data: int = -32768, texture_no_data: int = 0, msk_no_data: int = 255, list_computed_layers: List[str] = None, source_pc_names: List[str] = None, performance_map_classes: List[float] = None, cloud_global_id: int = None) -> Union[xarray.Dataset, None] Rasterize a point cloud with its color bands to a Dataset that also contains quality statistics. :param cloud: Combined cloud as returned by the create_combined_cloud function :param resolution: Resolution of rasterized cells, expressed in cloud CRS units or None. :param epsg: epsg code for the CRS of the final raster :param x_start: x start of the rasterization grid :param y_start: y start of the rasterization grid :param x_size: x size of the rasterization grid :param y_size: y size of the rasterization grid :param sigma: sigma for gaussian interpolation. If None, set to resolution :param radius: Radius for hole filling. :param hgt_no_data: no data value to use for height :param texture_no_data: no data value to use for color :param msk_no_data: no data value to use in the final mask image :param list_computed_layers: list of computed output data :param source_pc_names: list of source pc names :param performance_map_classes: list for step defining border of class :type performance_map_classes: list or None :param cloud_global_id: global id of pair :return: Rasterized cloud color and statistics.