globalmapper.GenerateWatershed

globalmapper.GenerateWatershed([GM_LayerHandle_t32] aLayerList, GM_WatershedParams_t aWatershedParms, uint32 aReserved=0) GM_Error_t32, GM_LayerHandle_t32, GM_LayerHandle_t32[source]

Performs a watershed calculation on the loaded terrain layers, generating a stream network and optionally a set of drainage area features for each stream. There is also a way to find ridge lines rather than generating a stream network. The returned stream and drainage layers must be closed with CloseLayer when you are done with them.

If you would rather find ridge lines rather than a drainage network, pass in the GM_Watershed_FindRidgeLines flag in the GM_WatershedParams_t.mFlags parameter. The ridge line calculation is the same as a stream calculation on an inverted terrain, so the parameters have basically the same meaning.

Parameters:
  • aLayerList ([GM_LayerHandle_t32]) – List of elevation layers to use or None for all

  • aWatershedParms (GM_WatershedParams_t) – Parameters for generating watershed

  • aReserved (uint32) – Reserved for later use, defaults to 0

Returns:

Error Code

Return type:

GM_Error_t32

Returns:

Created stream layer

Return type:

GM_LayerHandle_t32

Returns:

Created drainage area layer (if created)

Return type:

GM_LayerHandle_t32