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.

DEM#

Examples using xdem.DEM#

Elevation error map

Elevation error map

Spatial correlation of errors

Spatial correlation of errors

DEM subtraction

DEM subtraction

Nuth and Kääb coregistration

Nuth and Kääb coregistration

Iterative Closest Point coregistration

Iterative Closest Point coregistration

Spatial propagation of elevation errors

Spatial propagation of elevation errors

Terrain attributes

Terrain attributes

Bias correction with deramping

Bias correction with deramping

Working with a collection of DEMs

Working with a collection of DEMs

Blockwise coregistration

Blockwise coregistration

Normalized regional hypsometric interpolation

Normalized regional hypsometric interpolation

Slope and aspect methods

Slope and aspect methods

Estimation and modelling of spatial variograms

Estimation and modelling of spatial variograms

Estimation and modelling of heteroscedasticity

Estimation and modelling of heteroscedasticity

Standardization for stable terrain as error proxy

Standardization for stable terrain as error proxy

Opening a DEM#

DEM(filename_or_dataset[, vcrs, silent])

The digital elevation model.

DEM.info([stats])

Summarize information about the raster.

Create from an array#

DEM.from_array(data, transform, crs[, ...])

Create a DEM from a numpy array and the georeferencing information.

Unique attributes#

Note

A DEM inherits four unique attributes from Raster, see the dedicated section of GeoUtils’ API.

DEM.vcrs

Vertical coordinate reference system of the DEM.

Derived attributes#

DEM.ccrs

Compound horizontal and vertical coordinate reference system of the DEM.

Vertical referencing#

DEM.set_vcrs(new_vcrs)

Set the vertical coordinate reference system of the DEM.

DEM.to_vcrs(dst_vcrs[, src_vcrs])

Convert the DEM to another vertical coordinate reference system.

dDEM#

dDEM(raster, start_time, end_time[, error])

A difference-DEM object.

DEMCollection#

dDEM#

DEMCollection(dems[, timestamps, outlines, ...])

A temporal collection of DEMs.

Coreg#

Overview of co-registration class structure:

Inheritance diagram of xdem.coreg.base, xdem.coreg.affine, xdem.coreg.biascorr

Coregistration, pipeline and blockwise#

xdem.coreg.Coreg([meta])

Generic co-registration processing class.

xdem.coreg.CoregPipeline(pipeline)

A sequential set of co-registration processing steps.

xdem.coreg.BlockwiseCoreg(step, subdivision)

Block-wise co-registration processing class to run a step in segmented parts of the grid.

Affine coregistration methods#

Generic parent class:

xdem.coreg.AffineCoreg([subsample, matrix, meta])

Generic affine coregistration class.

Convenience classes for specific coregistrations:

xdem.coreg.VerticalShift([vshift_func, ...])

DEM vertical shift correction.

xdem.coreg.NuthKaab([max_iterations, ...])

Nuth and Kääb (2011) DEM coregistration.

xdem.coreg.ICP([max_iterations, tolerance, ...])

Iterative Closest Point DEM coregistration.

xdem.coreg.Tilt([subsample])

DEM tilting.

Bias-correction (including non-affine coregistration) methods#

Generic parent class:

xdem.coreg.BiasCorr([fit_or_bin, fit_func, ...])

Parent class of bias correction methods: non-rigid coregistrations.

Classes for any 1-, 2- and N-D biases:

xdem.coreg.BiasCorr1D([fit_or_bin, ...])

Bias-correction along a single variable (e.g., angle, terrain attribute).

xdem.coreg.BiasCorr2D([fit_or_bin, ...])

Bias-correction along two variables (e.g., X/Y coordinates, slope and curvature simultaneously).

xdem.coreg.BiasCorrND([fit_or_bin, ...])

Bias-correction along N variables (e.g., simultaneously slope, curvature, aspect and elevation).

Convenience classes for specific corrections:

xdem.coreg.Deramp([poly_order, fit_or_bin, ...])

Correct for a 2D polynomial along X/Y coordinates, for example from residual camera model deformations.

xdem.coreg.DirectionalBias([angle, ...])

Bias correction for directional biases, for example along- or across-track of satellite angle.

xdem.coreg.TerrainBias([terrain_attribute, ...])

Correct a bias according to terrain, such as elevation or curvature.

Terrain attributes#

xdem.terrain

Terrain attribute calculations, such as slope, aspect, hillshade, curvature and ruggedness indexes.

Volume integration methods#

xdem.volume

Volume change calculation tools (aimed for glaciers).

Fitting methods#

xdem.fit

Functions to perform normal, weighted and robust fitting.

Filtering methods#

xdem.filters

Filters to remove outliers and reduce noise in DEMs.

Spatial statistics methods#

xdem.spatialstats

Spatial statistical tools to estimate uncertainties related to DEMs