名称

ST_ZSize — Returns the Z size of a 2D or 3D bounding box or a geometry.

大纲

float ST_ZSize(box3d aGeomorBox2DorBox3D);

描述

Returns the Z size of a 2D or 3D bounding box or a geometry, computed as ST_ZMax(aGeomorBox2DorBox3D) - ST_ZMin(aGeomorBox2DorBox3D).

[注意]

虽然此函数仅针对 box3d 定义,但由于自动转换,它也适用于 box2d 和几何值。 但是,它不会接受几何图形或 box2d 文本表示,因为它们不会自动转换。

该函数支持 3d 并且不会丢失 z-index。

此方法支持圆形字符串和曲线。

Availability: 3.7.0

示例

Code
SELECT ST_ZSize('BOX3D(1 2 3,4 5 6)');
栅格输出
3
Code
SELECT ST_ZSize('LINESTRING(1 3 4,5 6 7)'::geometry);
栅格输出
3
Figure
Geometry figure for visual-st-zsize-02