From d31d0745680414ecfaa2bb4cad844a81d962ca62 Mon Sep 17 00:00:00 2001 From: vschaffn Date: Fri, 22 Nov 2024 12:09:28 +0100 Subject: [PATCH] docs: add dem_coregistration function in doc --- doc/source/api.md | 8 ++++++++ doc/source/coregistration.md | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/source/api.md b/doc/source/api.md index e46532cc..085378ba 100644 --- a/doc/source/api.md +++ b/doc/source/api.md @@ -231,6 +231,14 @@ To build and pass your coregistration pipeline to {func}`~xdem.DEM.coregister_3d coreg.Coreg.meta ``` +#### Quick coregistration +```{eval-rst} +.. autosummary:: + :toctree: gen_modules/ + + coreg.workflows.dem_coregistration +``` + ### Affine coregistration #### Parent object (to define custom methods) diff --git a/doc/source/coregistration.md b/doc/source/coregistration.md index efc4e930..d0b6119c 100644 --- a/doc/source/coregistration.md +++ b/doc/source/coregistration.md @@ -55,7 +55,8 @@ my_coreg_pipeline = xdem.coreg.ICP() + xdem.coreg.NuthKaab() my_coreg_pipeline = xdem.coreg.NuthKaab() ``` -Then, coregistering a pair of elevation data can be done by calling {func}`xdem.DEM.coregister_3d` from the DEM that should be aligned. +Then, coregistering a pair of elevation data can be done by calling {func}`xdem.coreg.workflows.dem_coregistration`, or +{func}`xdem.DEM.coregister_3d` from the DEM that should be aligned. ```{code-cell} ipython3 :tags: [hide-cell] @@ -66,12 +67,18 @@ Then, coregistering a pair of elevation data can be done by calling {func}`xdem. import geoutils as gu import numpy as np import matplotlib.pyplot as plt +from xdem.coreg.workflows import dem_coregistration # Open a reference and to-be-aligned DEM ref_dem = xdem.DEM(xdem.examples.get_path("longyearbyen_ref_dem")) tba_dem = xdem.DEM(xdem.examples.get_path("longyearbyen_tba_dem")) ``` +```{code-cell} ipython3 +# Coregister by calling the dem_coregistration function +aligned_dem = dem_coregistration(tba_dem, ref_dem, coreg_method=my_coreg_pipeline) +``` + ```{code-cell} ipython3 # Coregister by calling the DEM method aligned_dem = tba_dem.coregister_3d(ref_dem, my_coreg_pipeline)