ST_Overflow

更新时间:
复制 MD 格式

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

ParameterTypeDescription
rastrasterThe DEM raster object. Currently must be a single-band raster.
boxboxThe bounding box of the area to analyze. Must use the same coordinate system as rast.
valuefloat8The 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:

  • rast currently must be a single-band DEM. Multi-band rasters are not supported.

  • box must 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)