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 digital elevation model (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.
The raster object must be a DEM value that has only one band.
Example
select st_flow_direction(rast, '((-202286.94,2232375.16),(-202135.0,2232225))'::box) 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)