CG_IsSolid — ジオメトリが立体であるかどうかをテストします。妥当性チェックは行いません。
boolean CG_IsSolid(geometry geom1);
Returns true when the input carries the solid flag, such as a geometry produced by CG_MakeSolid. A closed PolyhedralSurface remains a surface until it is explicitly converted. This tests the representation, not shell closure or validity; no validity check is performed.
Availability: 3.5.0
このメソッドにはSFCGALバックエンドが必要です。
この関数は3次元に対応し、Z値を削除しません。
この関数は多面体サーフェスに対応しています。
この関数は三角形と不規則三角網 (TIN)に対応しています。
Compare the same closed shell before and after converting it to a solid.
WITH data AS (
SELECT 'POLYHEDRALSURFACE Z (
((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 geom
)
SELECT CG_IsSolid(geom) AS shell_is_solid,
CG_IsSolid(CG_MakeSolid(geom)) AS solid_is_solid
FROM data;
f | t