Skip to content

Latest commit

 

History

History
408 lines (289 loc) · 7 KB

api.md

File metadata and controls

408 lines (289 loc) · 7 KB

(api)=

API reference

This page provides a summary of xDEM’s API. For more details and examples, refer to the relevant chapters in the main part of the documentation.

.. currentmodule:: xdem
.. minigallery:: xdem.DEM
      :add-heading:

DEM

A {class}`~xdem.DEM` inherits all raster methods and attributes from the {class}`~geoutils.Raster` object of GeoUtils.
Below, we only repeat some core attributes and methods of GeoUtils, see
[the Raster API in GeoUtils](https://geoutils.readthedocs.io/en/latest/api.html#raster) for the full list.

Opening or saving

.. autosummary::
    :toctree: gen_modules/

    DEM
    DEM.save

Plotting or summarize info

.. autosummary::
    :toctree: gen_modules/

    DEM.info
    DEM.plot

Create from an array

.. autosummary::
    :toctree: gen_modules/

    DEM.from_array

(api-dem-attrs)=

Unique attributes

Inherited from {class}~geoutils.Raster

.. autosummary::
    :toctree: gen_modules/

    DEM.data
    DEM.crs
    DEM.transform
    DEM.nodata
    DEM.area_or_point

Specific to {class}~xdem.DEM

.. autosummary::
    :toctree: gen_modules/

    DEM.vcrs

Other attributes

Inherited from {class}~geoutils.Raster

See the full list in the Raster API of GeoUtils.

.. autosummary::
    :toctree: gen_modules/

    DEM.res
    DEM.bounds
    DEM.width
    DEM.height
    DEM.shape

Georeferencing

Inherited from {class}~geoutils.Raster

.. autosummary::
    :toctree: gen_modules/

    DEM.set_nodata
    DEM.set_area_or_point
    DEM.info
    DEM.reproject
    DEM.crop

Vertical referencing for {class}~xdem.DEM

.. autosummary::
    :toctree: gen_modules/

    DEM.set_vcrs
    DEM.to_vcrs

Raster-vector interface

See the full list of vector methods in [GeoUtils' documentation](https://geoutils.readthedocs.io/en/latest/api.html#vector).
.. autosummary::
    :toctree: gen_modules/

    DEM.polygonize
    DEM.proximity
    DEM.to_pointcloud
    DEM.interp_points

Terrain attributes

.. autosummary::
    :toctree: gen_modules/

    DEM.slope
    DEM.aspect
    DEM.hillshade
    DEM.curvature
    DEM.profile_curvature
    DEM.planform_curvature
    DEM.maximum_curvature
    DEM.topographic_position_index
    DEM.terrain_ruggedness_index
    DEM.roughness
    DEM.rugosity
    DEM.fractal_roughness

Or to get multiple related terrain attributes at once (for performance):

.. autosummary::
    :toctree: gen_modules/

    DEM.get_terrain_attribute

Coregistration and bias corrections

To build and pass your coregistration pipeline to {func}`~xdem.DEM.coregister_3d`, see the API of {ref}`api-geo-handle`.
.. autosummary::
    :toctree: gen_modules/

    DEM.coregister_3d

Uncertainty analysis

.. autosummary::
    :toctree: gen_modules/

    DEM.estimate_uncertainty

(api-geo-handle)=

Coreg

Overview of co-registration class structure:

.. inheritance-diagram:: xdem.coreg.base.Coreg xdem.coreg.affine xdem.coreg.biascorr
        :top-classes: xdem.coreg.Coreg

Coregistration, pipeline and blockwise

.. autosummary::
    :toctree: gen_modules/

    coreg.Coreg
    coreg.CoregPipeline
    coreg.blockwise.BlockwiseCoreg

Fitting and applying transforms

.. autosummary::
    :toctree: gen_modules/

    coreg.Coreg.fit_and_apply
    coreg.Coreg.fit
    coreg.Coreg.apply

Extracting metadata

.. autosummary::
    :toctree: gen_modules/

    coreg.Coreg.info
    coreg.Coreg.meta

Quick coregistration

.. autosummary::
    :toctree: gen_modules/

    coreg.workflows.dem_coregistration

Affine coregistration

Parent object (to define custom methods)

.. autosummary::
    :toctree: gen_modules/

    coreg.AffineCoreg

Coregistration methods

.. autosummary::
    :toctree: gen_modules/

    coreg.VerticalShift
    coreg.NuthKaab
    coreg.DhMinimize
    coreg.ICP

Manipulating affine transforms

.. autosummary::
    :toctree: gen_modules/

    coreg.AffineCoreg.from_matrix
    coreg.AffineCoreg.to_matrix
    coreg.AffineCoreg.from_translations
    coreg.AffineCoreg.to_translations
    coreg.AffineCoreg.from_rotations
    coreg.AffineCoreg.to_rotations

    coreg.apply_matrix
    coreg.invert_matrix

Bias-correction

Parent object (to define custom methods)

.. autosummary::
    :toctree: gen_modules/

    coreg.BiasCorr

Bias-correction methods

.. autosummary::
    :toctree: gen_modules/

    coreg.Deramp
    coreg.DirectionalBias
    coreg.TerrainBias

Uncertainty analysis

Several uncertainty functionalities of xDEM are being implemented directly in SciKit-GStat for spatial statistics
(e.g., fitting a sum of variogram models, pairwise subsampling for grid data). This will allow to simplify several
function inputs and outputs, by relying on a single {func}`~skgstat.Variogram` object.

This will trigger API changes in future package versions.

Core routines for heteroscedasticity, spatial correlations, error propagation

.. autosummary::
    :toctree: gen_modules/

    spatialstats.infer_heteroscedasticity_from_stable
    spatialstats.infer_spatial_correlation_from_stable
    spatialstats.spatial_error_propagation

Sub-routines for heteroscedasticity

.. autosummary::
    :toctree: gen_modules/

    spatialstats.nd_binning
    spatialstats.interp_nd_binning
    spatialstats.two_step_standardization

Sub-routines for spatial correlations

.. autosummary::
    :toctree: gen_modules/

    spatialstats.sample_empirical_variogram
    spatialstats.fit_sum_model_variogram
    spatialstats.correlation_from_variogram

Sub-routines for error propagation

.. autosummary::
    :toctree: gen_modules/

    spatialstats.number_effective_samples

Empirical validation

.. autosummary::
    :toctree: gen_modules/

    spatialstats.patches_method

Plotting for uncertainty analysis

.. autosummary::
    :toctree: gen_modules/

    spatialstats.plot_variogram
    spatialstats.plot_1d_binning
    spatialstats.plot_2d_binning

Stand-alone functions (moved)

.. autosummary::
    :toctree: gen_modules/

    spatialstats.nmad

Development classes (removal or re-factoring)

The {class}`xdem.dDEM` and {class}`xdem.DEMCollection` classes will be removed or re-factored in the near future.

dDEM

.. autosummary::
    :toctree: gen_modules/

    dDEM

DEMCollection

.. autosummary::
    :toctree: gen_modules/

    DEMCollection