xdem.dem¶
DEM class and functions.
Contents
Classes¶
DEM¶
- class xdem.dem.DEM(filename_or_dataset, vref_name=None, vref_grid=None, silent=False, **kwargs)[source]¶
Bases:
geoutils.satimg.SatelliteImage- __init__(filename_or_dataset, vref_name=None, vref_grid=None, silent=False, **kwargs)[source]¶
Load digital elevation model data through the Raster class, parse additional attributes from filename or metadata trougth the SatelliteImage class, and then parse vertical reference from DEM product name. For manual input, only one of “vref”, “vref_grid” or “ccrs” is necessary to set the vertical reference.
- Parameters
filename_or_dataset (str, DEM, SatelliteImage, Raster, rio.io.Dataset, rio.io.MemoryFile) – The filename of the dataset.
vref_name (str) – Vertical reference name
vref_grid (str) – Vertical reference grid (any grid file in https://github.com/OSGeo/PROJ-data)
silent – Whether to display vertical reference setting
silent – boolean
- copy(new_array=None)[source]¶
Copy the Raster object in memory
- Parameters
new_array – New array to use for the copied Raster
- Returns
- set_vref(vref_name=None, vref_grid=None, compute_ccrs=False)[source]¶
Set vertical reference with a name or with a grid
- Parameters
vref_name (str) – Vertical reference name
vref_grid (str) – Vertical reference grid (any grid file in https://github.com/OSGeo/PROJ-data)
compute_ccrs (boolean) – Whether to compute the ccrs (read pyproj-data grid file)
- Returns
- to_vref(vref_name='EGM96', vref_grid=None)[source]¶
Convert between vertical references: ellipsoidal heights or geoid grids
- Parameters
vref_name (str) – Vertical reference name
vref_grid (str) – Vertical reference grid (any grid file in https://github.com/OSGeo/PROJ-data)
- Returns