pygeoc.postTauDEM module

post process of TauDEM.

@author: Liangjun Zhu

@changlog: - 12-04-12 jz - origin version. - 16-07-01 lj - reorganized for pygeoc. - 17-06-25 lj - check by pylint and reformat by Google style.

class pygeoc.postTauDEM.DinfUtil

Bases: object

Utility functions based on Dinf flow direction

static check_orthogonal(angle)

Check the given Dinf angle based on D8 flow direction encoding code by ArcGIS

static compress_dinf(angle, nodata)

Compress dinf flow direction to D8 direction with weight follows ArcGIS D8 codes. :param angle: D-inf flow direction angle :param nodata: NoData value

返回:
  1. Updated Dinf values
  2. Compressed flow direction follows ArcGIS D8 codes rule
  3. Weight of the first direction
static dinf_downslope_direction(a)

Get the downslope directions of an dinf direction value :param a: Dinf value

返回:downslope directions
static downstream_index_dinf(dinfdir_value, i, j)

find downslope coordinate for Dinf of TauDEM :param dinfdir_value: dinf direction value :param i: current row :param j: current col

返回:downstream (row, col)s
static output_compressed_dinf(dinfflowang, compdinffile, weightfile)

Output compressed Dinf flow direction and weight to raster file :param dinfflowang: Dinf flow direction raster file :param compdinffile: Compressed D8 flow code :param weightfile: The correspond weight

class pygeoc.postTauDEM.StreamnetUtil

Bases: object

Utility functions of stream network

static assign_stream_id_raster(stream_file, subbasin_file, out_stream_file)

Assign stream link ID according to subbasin ID. :param stream_file: input stream raster file :param subbasin_file: subbasin raster file :param out_stream_file: output stream raster file

static serialize_streamnet(streamnet_file, output_reach_file)

Eliminate reach with zero length and return the reach ID map. :param streamnet_file: original stream net ESRI shapefile :param output_reach_file: serialized stream net, ESRI shapefile

返回:newly assigned}
返回类型:id pairs {origin
pygeoc.postTauDEM.main()

Test code