Computes the water depth at each pixel within a specified area, given a digital elevation model (DEM) and a total precipitation volume.
Syntax
float8[] ST_Overflow(raster rast, Box box, float8 value)Parameters
| Parameter | Type | Description |
|---|---|---|
rast | raster | The DEM raster object. Currently must be a single-band raster. |
box | box | The bounding box of the area to analyze. Must use the same coordinate system as rast. |
value | float8 | The total precipitation volume for the area, in cubic meters. |
Description
ST_Overflow computes the water depth at each raster pixel within the specified bounding box, given a DEM and a total precipitation volume.
The function returns a float8[] array where each element corresponds to one pixel within the bounding box.
Limitations:
rastcurrently must be a single-band DEM. Multi-band rasters are not supported.boxmust use the same coordinate system as the DEM.
Example
Query the water depth distribution for a bounding box with a precipitation input of 10,000 cubic meters:
SELECT st_overflow(rast, '((-195516.0,2230052.0),(-194626.0,2230942.0))'::box, 10000::float8)
FROM t_overflow
WHERE id = 1;The result is a float8[] array. Each element represents the water depth at the corresponding pixel:
{0,0,0,...,1.43427103409668,...,0.434271034096678,...}
(1 row)该文章对您有帮助吗?