API Documentation

API Documentation#

topotoolbox.GridObject()

A class containing all information of a Digital Elevation Model (DEM).

topotoolbox.FlowObject(grid)

A class containing containing (water-) flow information about a given digital elevation model (DEM).

topotoolbox.show(*grid[, dpi, cmap])

Display one or more GridObject instances using Matplotlib.

topotoolbox.read_tif(path)

Generate a new GridObject from a .tif file.

topotoolbox.write_tif(dem, path)

Write a GridObject instance to a GeoTIFF file.

topotoolbox.load_dem(dem[, cache])

Downloads a DEM from the TopoToolbox/DEMs repository.

topotoolbox.get_dem_names()

Returns a list of provided example Digital Elevation Models (DEMs).

topotoolbox.get_cache_contents()

Returns the contents of the cache directory.

topotoolbox.clear_cache([filename])

Deletes the cache directory and its contents.

topotoolbox.gen_random([hillsize, rows, ...])

Generate a GridObject instance that is generated with OpenSimplex noise.

topotoolbox.gen_random_bool([rows, columns, ...])

Generate a GridObject instance that contains only randomly generated Boolean values.