Name

CG_IsSolid — Prüfen, ob die Geometrie ein Solid ist. Es wird keine Gültigkeitsprüfung durchgeführt.

Übersicht

boolean CG_IsSolid(geometry geom1);

Beschreibung

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.

Verfügbarkeit: 3.5.0

Diese Methode benötigt ein SFCGAL-Backend.

Diese Funktion unterstützt 3d und lässt den Z-Index nicht fallen.

Diese Funktion unterstützt polyedrische Flächen.

Diese Funktion unterstützt Dreiecke und dreieckige unregelmäßige Netzoberflächen (TIN).

Beispiele

Compare the same closed shell before and after converting it to a solid.

Code
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;
Ausgabe von Rastern
f | t
Figure
Geometry figure for visual-cg-issolid-01