Name

ST_Volume — Computes the volume of a 3D geometry. Closed surfaces can have non-zero volume.

Synopsis

float ST_Volume(geometry geom1);

説明

[Warning]

ST_Volume は3.5.0では非推奨です。CG_Volumeを代わりに使います。

Availability: 2.2.0

このメソッドにはSFCGALバックエンドが必要です。

この関数は3次元に対応し、Z値を削除しません。

この関数は多面体サーフェスに対応しています。

この関数は三角形と不規則三角網 (TIN)に対応しています。

このメソッドはSQL/MM仕様の実装です。 SQL-MM IEC 13249-3: 9.1 (ST_3DVolumeと同じ)

Closed surface geometries can have non-zero volume. Use ST_MakeSolid when the geometry value itself must carry the solid flag.

A closed polyhedral surface has volume. ST_MakeSolid makes the solid representation explicit.

SELECT ST_Volume(geom) As cube_surface_vol,
    ST_Volume(ST_MakeSolid(geom)) As solid_surface_vol
    FROM (SELECT 'POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),
    ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)),
    ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),
    ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)),
    ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)),
    ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )'::geometry) As f(geom);
cube_surface_vol | solid_surface_vol
    ------------------+-------------------
    1 |                 1