cars.applications.dem_generation.dem_generation_wrappers
this module contains tools for the dem generation
Functions
|
Coregistrates the two DEMs given then saves the result. |
|
Add margin to a bounding box |
|
Compute and display statistics of difference between two DEM : |
|
Change transform of an image |
|
Compute the opposite of a DEM : |
|
Downsample median DEM with median resampling |
|
Modify the terrain bounds |
|
Reproject the DEM |
Module Contents
- cars.applications.dem_generation.dem_generation_wrappers.fit_initial_elevation_on_dem_median(dem_to_fit_path: str, dem_ref_path: str, dem_out_path: str)[source]
Coregistrates the two DEMs given then saves the result. The initial elevation will be cropped to reduce computation costs. Returns the transformation applied.
- Parameters:
dem_to_fit_path (str) – Path to the dem to be fitted
dem_ref_path (str) – Path to the dem to fit onto
dem_out_path (str) – Path to save the resulting dem into
- Returns:
coregistration transformation applied
- Return type:
dict
- cars.applications.dem_generation.dem_generation_wrappers.add_margin(bbox, ratio=1)[source]
Add margin to a bounding box :param bbox: input bounding box :type bbox: rasterio.coords.BoundingBox :param ratio: factor of bbox size to add to each side of bbox :type ratio: float
- Returns:
bounding box with margins
- Return type:
rasterio.coords.BoundingBox
- cars.applications.dem_generation.dem_generation_wrappers.compute_stats(diff)[source]
Compute and display statistics of difference between two DEM : Minimum, median, percentiles and maximum
- Parameters:
diff (numpy.array) – altimetric difference between two DEM
- cars.applications.dem_generation.dem_generation_wrappers.edit_transform(input_dem, resolution=None, transform=None)[source]
Change transform of an image :param input_res: path of image :type input_dem: str :param resolution: image resolution for new transform to apply :type resolution: float :param transform: new transform to apply if resolution is not given :type transform: affine.Affine
- cars.applications.dem_generation.dem_generation_wrappers.reverse_dem(input_dem)[source]
Compute the opposite of a DEM : Altitudes sign is changed
- Parameters:
input_dem (str) – path of DEM to reverse
- cars.applications.dem_generation.dem_generation_wrappers.downsample_dem(input_dem, scale, interpolator, median_filter_size=None, default_alt=0)[source]
Downsample median DEM with median resampling
- Parameters:
input_dem (str) – path of DEM to downsample (only one band)