DRAIN

Drainage basin from elevation data


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: References :: Related

Back to top

Description


Generates a drainage network data set using input flow accumulation data.
Back to top

Parameters


drain(file, faccum, dboc, drnthr, dbiw, tex1)

Name Type Caption Length Value range
FILE* str Input file name 1 -    
FACCUM* List[int] Flow accumulation channel 1 - 1 1 - 1024
DBOC* List[int] Output drainage channel 1 - 1 1 - 1024
DRNTHR List[int] Drainage threshold 0 - 1 0 -
Default: 10
DBIW List[int] Raster input window 0 - 4 Xoffset, Yoffset, Xsize, Ysize
TEX1 str Output channel description 0 - 64 Default: Drainage Network

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the PCIDSK image file that contains the flow accumulation data channel.

FACCUM

Specifies the input channel that contains the flow accumulation data, output by DWCON.

DBOC

Specifies the output channel to receive the drainage result. The specified output channel should be of the same type as the input channel (FACCUM); that is, either 16-bit signed integer or 32-bit real.

DRNTHR

Specifies the drainage threshold.

If the value of the accumulation data is less than or equal to the value specified for this parameter, the value will be set to zero. Therefore, only data with accumulation values greater than the specified threshold value will be copied to the output channel.

DBIW

Specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) that is read from the input image. If this parameter is not specified, the entire image is processed by default.

Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

TEX1

Describes (in up to 64 characters) the contents of the output channel.

The default value is "Drainage Network".

Back to top

Details

DRAIN generates a drainage network data set channel using the input flow accumulation data.

There are a total of six functions in this component: DWCON, DRAIN, OVERLND, PPTABLE, SEED, and WTRSHED. To use this functionality, you must first run the DWCON module. Refer to the help for the DWCON function for more information about the workflow for these functions.

The DRAIN function locates the drainage networks (river or stream courses) within the DEM. The output data channel can be viewed using CATALYST Professional Focus. The data will appear as lines representing rivers and streams.

After DWCON is executed, the flow accumulation data set can be used to produce a drainage network data set when cells with values greater than the threshold value (DRNTHR) are selected. The density of the network increases as the threshold value decreases.

The input channel (FACCUM) specifies the flow accumulation data set channel obtained by running the DWCON function.

Back to top

Example

The following example illustrates the DRAIN function.

from pci.drain import *

file	=	'irvine.pix'	# input file
faccum	=	[13]	# flow accumulation channel
dboc	=	[16]	# output channel
drnthr	=	[10]	# drainage threshold.
dbiw	=	[]	# process entire image
tex1	=	''	# default, "Drainage Network"

drain( file, faccum, dboc, drnthr, dbiw, tex1 )
Back to top

References

Jenson, S.K. and Domingue, J.O. "Extracting Topographic Structure from Digital Elevation Data for Geographic Information System Analysis". Photogrammetric Engineering and Remote Sensing, Vol. 54, No. 11, November 1988, pp. 1593-1600.

© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.