Skip to content

module TopoPyScale.fetch_dem

Methods to fetch DEM from various public repository

TODO:

  • [ ] SRTM
  • [ ] ArcticDEM
  • [ ] ASTER dem
  • [ ] Norwegian DEM
  • [x] Copernicus DEM

function fetch_copernicus_dem

fetch_copernicus_dem(
    directory='.',
    extent=[23, 24, 44, 45],
    product='COP-DEM_GLO-90-DTED/2023_1',
    file_extension=None,
    n_download_threads=1
)

Routine to download Copernicus DEM product for a given extent

Args:

  • directory (str, optional): description. Defaults to '.'.
  • extent (list of int, optional): extent in [east, west, south, north] in lat/lon degrees. Defaults to [23,24,44,45].
  • product (str, optional): name of product to download. Default is 'COP-DEM_GLO-90-DTED/2023_1'
  • file_extension (str, optional): last 7 characters of the file to extract from the tar archive. for DEM, 'DEM.tif' for the DGED products
  • n_download_threads (int): number of download threads

function fetch_dem

fetch_dem(dem_dir, extent, dem_epsg, dem_file, dem_resol=None)

Function to fetch DEM data from SRTM and potentially other sources

Args:

  • dem_dir (str): path to dem folder
  • extent (dict): list of spatial extent in lat-lon [latN, latS, lonW, lonE]
  • epsg (int): epsg projection code
  • dem_file (str): filename of the downloaded DEM. must be myfile.tif

class copernicus_dem

---> Class to download Publicly available Copernicus DEM products

Args:

  • directory (str): directory where to store downloads

method __init__

__init__(directory='.', product=None, n_download_threads=1)

method download_tiles_in_extent

download_tiles_in_extent(extent=[22, 28, 44, 45])

Function to download tiles falling into the extent requested

Args:

  • extent (list, int): [east, west, south, north] longitudes and latitudes of the extent of interest. Defaults to [22,28,44,45].

Returns:

  • dataframe: dataframes of the tile properties (url, lat, lon, etc.)

method extract_all_tar

extract_all_tar(dem_extension='DEM.dt2')

Function to extract DEM file from Copernicus tar file

Args:

  • dem_extension: extension of the DEM raster file. for instance: .dt2, .tif, .dt1

method fetch_copernicus_dem_product_list

fetch_copernicus_dem_product_list()

Function to fetch the list of Copernicus DEM products available to download.


method request_tile_list

request_tile_list(fname_tile=None)

Function to download list of tiles of a given Copernicus product

Args:

  • fname_tile (str, optional): description. Defaults to 'tiles.csv'.

This file was automatically generated via lazydocs.