cars.applications.triangulation.triangulation_wrappers ====================================================== .. py:module:: cars.applications.triangulation.triangulation_wrappers .. autoapi-nested-parse:: Preprocessing module: contains functions used for triangulation Functions --------- .. autoapisummary:: cars.applications.triangulation.triangulation_wrappers.add_layer cars.applications.triangulation.triangulation_wrappers.interpolate_geoid_height cars.applications.triangulation.triangulation_wrappers.geoid_offset cars.applications.triangulation.triangulation_wrappers.generate_point_cloud_file_names cars.applications.triangulation.triangulation_wrappers.compute_performance_map Module Contents --------------- .. py:function:: add_layer(dataset, layer_name, layer_coords, point_cloud) Add layer point cloud to point cloud dataset :param dataset: input disparity map dataset :param layer_name: layer key in disparity dataset :param layer_coords: layer axis name in disparity dataset :param point_cloud: output point cloud dataset .. py:function:: interpolate_geoid_height(geoid_filename, positions, interpolation_method='linear') terrain to index conversion retrieve geoid height above ellispoid This is a modified version of the Shareloc interpolate_geoid_height function that supports Nan positions (return Nan) :param geoid_filename: geoid_filename :type geoid_filename: str :param positions: geodetic coordinates :type positions: 2D numpy array: (number of points,[long coord, lat coord]) :param interpolation_method: default is 'linear' (interpn parameter) :type interpolation_method: str :return: geoid height :rtype: 1 numpy array (number of points) .. py:function:: geoid_offset(points, geoid_path) Compute the point cloud height offset from geoid. :param points: point cloud data in lat/lon/alt WGS84 (EPSG 4326) coordinates. :type points: xarray.Dataset or pandas.DataFrame :param geoid_path: path to input geoid file on disk :type geoid_path: string :return: the same point cloud but using geoid as altimetric reference. :rtype: xarray.Dataset or pandas.DataFrame .. py:function:: generate_point_cloud_file_names(csv_dir: str, laz_dir: str, row: int, col: int, index: dict = None, pair_key: str = 'PAIR_0') generate the point cloud CSV and LAZ filenames of a given tile from its corresponding row and col. Optionally update the index, if provided. :param csv_dir: target directory for csv files, If None no csv filenames will be generated :type csv_dir: str :param laz_dir: target directory for laz files, If None no laz filenames will be generated :type laz_dir: str :param row: row index of the tile :type row: int :param col: col index of the tile :type col: int :param index: product index to update with the filename :type index: dict :param pair_key: current product key (used in index), if a list is given a filename will be added to the index for each element of the list :type pair_key: str .. py:function:: compute_performance_map(alti_ref, z_inf, z_sup, ambiguity_map=None, perf_ambiguity_threshold=None) Compute performance map :param alti_ref: z :type alti_ref: xarray Dataarray :param z_inf: z inf map :type z_inf: xarray Dataarray :param z_sup: z sup map :type z_sup: xarray Dataarray :param ambiguity_map: None or ambiguity map :type ambiguity_map: xarray Dataarray :param perf_ambiguity_threshold: ambiguity threshold to use :type perf_ambiguity_threshold: None or float