cars.data_structures.format_transformation ========================================== .. py:module:: cars.data_structures.format_transformation .. autoapi-nested-parse:: Contains function for format transformation between region and windows: Functions --------- .. autoapisummary:: cars.data_structures.format_transformation.grid_margins_2_overlaps cars.data_structures.format_transformation.get_corresponding_indexes cars.data_structures.format_transformation.terrain_coords_to_pix cars.data_structures.format_transformation.region_margins_from_window cars.data_structures.format_transformation.reduce_overlap Module Contents --------------- .. py:function:: grid_margins_2_overlaps(grid, margins_fun) Convert margins to overlap grid format used in CarsDatasets :param grid: region grid :type grid: np.ndarray :param margins_fun: function to compute margis :type margins_fun: fun :return: overlap grid left, overlap grid right :rtype: np.ndarray, np.ndarray .. py:function:: get_corresponding_indexes(row, col) Get point cloud tiling grid indexes, corresponding to given raster indexes. In rasterio convention. :param row: row :type row: int :param col: col :type col: int :return: corresponding indexes (row, col) :rtype: tuple(int, int) .. py:function:: terrain_coords_to_pix(point_cloud_cars_ds, resolution) Compute the tiling grid in pixels, from a tiling grid in geocoordinates :param point_cloud_cars_ds: point clouds :type point_cloud_cars_ds: CarsDataset :param resolution: resolution :type resolution: float :return: new tiling grid :rtype: np.ndarray .. py:function:: region_margins_from_window(window, left_overlaps, right_overlaps, used_disp_min=None, used_disp_max=None) Convert window to margins. Add used disp min and max used for resampling :param window: window to use :type window: Dict :param left_overlaps: left overlap to use :type left_overlaps: Dict :param right_overlaps: right overlap to use :type right_overlaps: Dict :param used_disp_min: min disp min used in resampling :param used_disp_max: max disp max used in resampling :return: Region, Margin :rtype: Tuple(List, List) .. py:function:: reduce_overlap(current_overlaps, new_margin) Reduce overlap with margin :param current_overlaps: overlap array :type current_overlaps: np.ndarray :param new_margin: margin to use :type new_margin: int :return: new overlap array