cars.applications.triangulation.triangulation_wrappers
Preprocessing module: contains functions used for triangulation
Functions
|
Add layer point cloud to point cloud dataset |
|
terrain to index conversion |
|
Compute the point cloud height offset from geoid. |
|
generate the point cloud CSV and LAZ filenames of a given tile from its |
|
Compute performance map |
Module Contents
- cars.applications.triangulation.triangulation_wrappers.add_layer(dataset, layer_name, layer_coords, point_cloud)[source]
Add layer point cloud to point cloud dataset
- Parameters:
dataset – input disparity map dataset
layer_name – layer key in disparity dataset
layer_coords – layer axis name in disparity dataset
point_cloud – output point cloud dataset
- cars.applications.triangulation.triangulation_wrappers.interpolate_geoid_height(geoid_filename, positions, interpolation_method='linear')[source]
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)
- Parameters:
geoid_filename (str) – geoid_filename
positions (2D numpy array: (number of points,[long coord, lat coord])) – geodetic coordinates
interpolation_method (str) – default is ‘linear’ (interpn parameter)
- Returns:
geoid height
- Return type:
1 numpy array (number of points)
- cars.applications.triangulation.triangulation_wrappers.geoid_offset(points, geoid_path)[source]
Compute the point cloud height offset from geoid.
- Parameters:
points (xarray.Dataset or pandas.DataFrame) – point cloud data in lat/lon/alt WGS84 (EPSG 4326) coordinates.
geoid_path (string) – path to input geoid file on disk
- Returns:
the same point cloud but using geoid as altimetric reference.
- Return type:
xarray.Dataset or pandas.DataFrame
- cars.applications.triangulation.triangulation_wrappers.generate_point_cloud_file_names(csv_dir: str, laz_dir: str, row: int, col: int, index: dict = None, pair_key: str = 'PAIR_0')[source]
generate the point cloud CSV and LAZ filenames of a given tile from its corresponding row and col. Optionally update the index, if provided.
- Parameters:
csv_dir (str) – target directory for csv files, If None no csv filenames will be generated
laz_dir (str) – target directory for laz files, If None no laz filenames will be generated
row (int) – row index of the tile
col (int) – col index of the tile
index (dict) – product index to update with the filename
pair_key (str) – 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
- cars.applications.triangulation.triangulation_wrappers.compute_performance_map(alti_ref, z_inf, z_sup, ambiguity_map=None, perf_ambiguity_threshold=None)[source]
Compute performance map
- Parameters:
alti_ref (xarray Dataarray) – z
z_inf (xarray Dataarray) – z inf map
z_sup (xarray Dataarray) – z sup map
ambiguity_map (xarray Dataarray) – None or ambiguity map
perf_ambiguity_threshold (None or float) – ambiguity threshold to use