This function computes the flow direction in an area based on the digital elevation model (DEM) data in the area.

Syntax

float8[] ST_flow_direction(raster rast, Box box);

Parameters

Parameter Description
rast The raster object, which currently must be a DEM that has only one band.
box The world space of the area to be analyzed.

Description

This function computes the flow direction in an area based on the DEM data in the area by using the D8 flow direction algorithm.

Currently, the raster object must be a DEM that has only one band.

Examples

select st_flow_direction(rast, '((-202286.94,2232375.16),(-202135.0,2232225))'::box, 1000::float8) from t_overflow where id =2;
                               st_flow_direction                                
--------------------------------------------------------------------------------
 {2,2,2,4,4,8,2,2,2,4,4,8,1,1,2,4,8,4,128,128,1,2,4,8,2,2,1,4,4,4,1,1,1,1,4,16}
(1 row)