topotoolbox.load_dem

Contents

topotoolbox.load_dem#

topotoolbox.load_dem(dem: str, cache: bool = True) GridObject[source]#

Downloads a DEM from the TopoToolbox/DEMs repository. Find possible names by using ‘get_dem_names()’.

Parameters:
  • dem (str) – Name of the DEM to be downloaded.

  • cache (bool, optional) – If true, the DEM will be cached. Defaults to True.

Returns:

A GridObject generated from the downloaded DEM.

Return type:

GridObject

Example

>>> import topotoolbox
>>> import matplotlib.pyplot as plt
>>> dem = topotoolbox.load_dem('taiwan')
>>> _= dem.plot(cmap='terrain')
>>> plt.show()

(Source code, png, hires.png, pdf)

../_images/topotoolbox-load_dem-1.png