:orphan:

.. _examples-advanced:

Advanced
========

Examples for setting up **specific coregistration or bias-correction pipelines**, **comparing terrain methods**,
or **refining an error model for DEM uncertainty analysis**.


.. raw:: html

  <div id='sg-tag-list' class='sphx-glr-tag-list'></div>


.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Deramping can help correct rotational or doming errors in elevation data. In xDEM, this approach is implemented through the xdem.coreg.Deramp class.">

.. only:: html

  .. image:: /advanced_examples/images/thumb/sphx_glr_plot_deramp_thumb.png
    :alt:

  :doc:`/advanced_examples/plot_deramp`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Bias-correction with deramping</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Oftentimes, more than two timestamps (DEMs) are analyzed simultaneously. One single dDEM only captures one interval, so multiple dDEMs have to be created. In addition, if multiple masking polygons exist (e.g. glacier outlines from multiple years), these should be accounted for properly. The xdem.DEMCollection is a tool to properly work with multiple timestamps at the same time, and makes calculations of elevation/volume change over multiple years easy.">

.. only:: html

  .. image:: /advanced_examples/images/thumb/sphx_glr_plot_demcollection_thumb.png
    :alt:

  :doc:`/advanced_examples/plot_demcollection`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Working with a collection of DEMs</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="There are many ways of interpolating gaps in elevation differences. In the case of glaciers, one very useful fact is that elevation change generally varies with elevation. This means that if valid pixels exist in a certain elevation bin, their values can be used to fill other pixels in the same approximate elevation. Filling gaps by elevation is the main basis of &quot;hypsometric interpolation approaches&quot;, of which there are many variations of.">

.. only:: html

  .. image:: /advanced_examples/images/thumb/sphx_glr_plot_norm_regional_hypso_thumb.png
    :alt:

  :doc:`/advanced_examples/plot_norm_regional_hypso`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Normalized regional hypsometric interpolation</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Calculating terrain attributes—not only slope and aspect but also curvatures—requires estimating the elevation derivatives of the surface. xDEM offers three different ways to calculate elevation derivatives, which can result in slightly different results.">

.. only:: html

  .. image:: /advanced_examples/images/thumb/sphx_glr_plot_slope_methods_thumb.png
    :alt:

  :doc:`/advanced_examples/plot_slope_methods`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Slope and aspect methods</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Often, biases are spatially variable, and a &quot;global&quot; shift may not be enough to coregister a DEM properly. In the sphx_glr_basic_examples_plot_nuth_kaab.py example, we saw that the method improved the alignment significantly, but there were still possibly nonlinear artefacts in the result. Clearly, nonlinear coregistration approaches are needed. One solution is xdem.coreg.BlockwiseCoreg, a helper to run any Coreg class over an arbitrary grid. Thanks to this tool, local errors are detected more effectively and memory usage is reduced. Indeed, the entire DEM does not need to be loaded into memory, the processes run for each block, also enabling multiprocessing.">

.. only:: html

  .. image:: /advanced_examples/images/thumb/sphx_glr_plot_blockwise_coreg_thumb.png
    :alt:

  :doc:`/advanced_examples/plot_blockwise_coreg`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Blockwise coregistration</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Digital elevation models have errors that are often correlated in space. While many DEM studies used solely short-range variograms to estimate the correlation of elevation measurement errors, recent studies show that variograms of multiple ranges provide larger, more reliable estimates of spatial correlation for DEMs.">

.. only:: html

  .. image:: /advanced_examples/images/thumb/sphx_glr_plot_variogram_estimation_modelling_thumb.png
    :alt:

  :doc:`/advanced_examples/plot_variogram_estimation_modelling`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Estimation and modelling of spatial variograms</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Digital elevation models have a precision that can vary with terrain and instrument-related variables. This variability in variance is called heteroscedasticy, and rarely accounted for in DEM studies (see accuracy-precision). Quantifying elevation heteroscedasticity is essential to use stable terrain as an error proxy for moving terrain, and standardize data towards a stationary variance, necessary to apply spatial statistics (see uncertainty).">

.. only:: html

  .. image:: /advanced_examples/images/thumb/sphx_glr_plot_heterosc_estimation_modelling_thumb.png
    :alt:

  :doc:`/advanced_examples/plot_heterosc_estimation_modelling`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Estimation and modelling of heteroscedasticity</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Digital elevation models have both a precision that can vary with terrain or instrument-related variables, and a spatial correlation of errors that can be due to effects of resolution, processing or instrument noise. Accouting for non-stationarities in elevation errors is essential to use stable terrain as a proxy to infer the precision on other types of terrain and reliably use spatial statistics (see uncertainty).">

.. only:: html

  .. image:: /advanced_examples/images/thumb/sphx_glr_plot_standardization_thumb.png
    :alt:

  :doc:`/advanced_examples/plot_standardization`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Standardization for stable terrain as error proxy</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /advanced_examples/plot_deramp
   /advanced_examples/plot_demcollection
   /advanced_examples/plot_norm_regional_hypso
   /advanced_examples/plot_slope_methods
   /advanced_examples/plot_blockwise_coreg
   /advanced_examples/plot_variogram_estimation_modelling
   /advanced_examples/plot_heterosc_estimation_modelling
   /advanced_examples/plot_standardization


.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-gallery

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download all examples in Python source code: advanced_examples_python.zip </advanced_examples/advanced_examples_python.zip>`

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download all examples in Jupyter notebooks: advanced_examples_jupyter.zip </advanced_examples/advanced_examples_jupyter.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
