User Tools

Site Tools


api:dk11:delphi:gishydrology.tgis_hydrology.flowdirection_tgis_layerpixel_tgis_extent_tgis_layerpixel_boolean

Table of Contents

TGIS_Hydrology.FlowDirection method

DK11 for Delphi | GisHydrology.TGIS_Hydrology.FlowDirection | Constructors | Methods | Events

Generates a flow direction grid from a DEM.

Available also on: .NET | Java | ActiveX.

Syntax

// Delphi
public
  procedure FlowDirection(
    const _dem : TGIS_LayerPixel;
    const _extent : TGIS_Extent;
    const _flowDir : TGIS_LayerPixel;
    const _resolveFlat : Boolean = FLOWDIR_RESOLVE_FLAT
  );
// C++ Builder
public:
  void FlowDirection(
    TGIS_LayerPixel* const _dem,
    TGIS_Extent* const _extent,
    TGIS_LayerPixel* const _flowDir,
    const bool _resolveFlat
  );

Parameters

Name Type Description
_dem TGIS_LayerPixel an input DEM
_extent TGIS_Extent an extent to be processed
_flowDir TGIS_LayerPixel the output grid layer
_resolveFlat Boolean if True, the ResolveFlat tool is performed for remaining cells within flat areas, where the dominant direction can not be determined; if False, above mentioned cells have encoded the direction by summing direction codes of neighbors with the drop value equals 0; default parameter is False

Remarks

The flow direction for a cell is the direction water will flow out of the cell. It is encoded to correspond to the orientation of one of the eight cells that surround the cell as follows:

  • East (E) - 1
  • Southeast (SE) - 2
  • South (S) - 4
  • Southwest (SW) - 8
  • West (W) - 16
  • Northwest (NW) - 32
  • North (N) - 64
  • Northeast (NE) - 128
There are four possible conditions to consider in determining flow direction:
  1. All eight neighboring cells have elevations higher than the center cell. The flow direction is encoded as negative.
  2. The distance-weighted drop from the center cell is higher for one cell in the neighborhood over all of the other seven and theflow direction is assigned to this cell. This condition occurs for most cells (all cells for a hydrologically conditionedd DEM.
  3. When two or more cells are equal in having the greatest distance-weighted drop, the flow direction is arbitrarily assigned at the last occurence of the greatest drop.
  4. All cells are equal. In this case, the cell is located in a flat area and the locations of those neighbors is encoded by summing their neighbor location codes.

References

2021/05/26 01:14

Page Tools