:py:mod:`cars.applications.dem_generation.dem_generation_tools` =============================================================== .. py:module:: cars.applications.dem_generation.dem_generation_tools .. autoapi-nested-parse:: this module contains tools for the dem generation Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: cars.applications.dem_generation.dem_generation_tools.fit_initial_elevation_on_dem_median cars.applications.dem_generation.dem_generation_tools.add_margin .. py:function:: fit_initial_elevation_on_dem_median(dem_to_fit_path: str, dem_ref_path: str, dem_out_path: str) Coregistrates the two DEMs given then saves the result. The initial elevation will be cropped to reduce computation costs. Returns the transformation applied. :param dem_to_fit_path: Path to the dem to be fitted :type dem_to_fit_path: str :param dem_ref_path: Path to the dem to fit onto :type dem_ref_path: str :param dem_out_path: Path to save the resulting dem into :type dem_out_path: str :return: coregistration transformation applied :rtype: dict .. py:function:: add_margin(bbox, ratio=1) 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 :return: bounding box with margins :rtype: rasterio.coords.BoundingBox