cars.applications.rasterization.simple_gaussian

this module contains the dense_matching application class.

Module Contents

Classes

SimpleGaussian

PointsCloudRasterisation

Functions

rasterization_wrapper(cloud, resolution, epsg, window, ...)

Wrapper for rasterization step :

class cars.applications.rasterization.simple_gaussian.SimpleGaussian(conf=None)

Bases: cars.applications.rasterization.point_cloud_rasterization.PointCloudRasterization

PointsCloudRasterisation

check_conf(conf)

Check configuration

Parameters

conf (dict) – configuration to check

Returns

overloaded configuration

Return type

dict

get_resolution()
get_margins()
run(merged_points_cloud, epsg, orchestrator=None, dsm_file_name=None, color_file_name=None)

Run PointsCloudRasterisation application.

Creates a CarsDataset filled with dsm tiles.

Parameters
  • merged_points_cloud (CarsDataset filled with pandas.DataFrame) –

    merged point cloud. 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: “clr”, “msk”, “data_valid”, “coord_epi_geom_i”, “coord_epi_geom_j”,”idx_im_epi”

      • attrs with keys “epsg”, “ysize”, “xsize”, “xstart”, “ystart”

    • attributes contraining “bounds”, “ysize”, “xsize”, “epsg”

  • epsg (str) – epsg of raster data

  • orchestrator – orchestrator used

  • dsm_file_name (str) – path of dsm

  • color_file_name (str) – path of color

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”

    • attrs with keys: “epsg”

  • attributes contraining: None

:rtype : CarsDataset filled with xr.Dataset

cars.applications.rasterization.simple_gaussian.rasterization_wrapper(cloud, resolution, epsg, window, profile, saving_info=None, sigma: float = None, radius: int = 1, dsm_no_data: int = np.nan, color_no_data: int = np.nan, msk_no_data: int = 65535, grid_points_division_factor: int = None)

Wrapper for rasterization step : - Convert a list of clouds to correct epsg - Rasterize it with associated colors

Parameters
  • cloud (pandas.DataFrame) – combined cloud

  • 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

  • profile (dict) – rasterio profile

  • saving_info (dict) – informations 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

  • color_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

  • grid_points_division_factor – number of blocs to use to divide the grid points (memory optimization, reduce the highest memory peak). If it is not set, the factor is automatically set to construct 700000 points blocs.

Returns

digital surface model + projected colors

Return type

xr.Dataset