제목

CG_3DArea — 3차원 표면 도형의 면적을 계산합니다. 입체일 경우 0을 반환할 것입니다.

요약

floatCG_3DArea(geometry geom1);

설명

Availability: 3.5.0

This method needs SFCGAL backend.

This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 8.1, 10.5

This function supports 3d and will not drop the z-index.

This function supports Polyhedral surfaces.

This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).

예시

주의: 기본적으로 KWT로부터 빌드된 다면체 표면은 표면 도형이지 입체가 아닙니다. 따라서 표면 면적을 구할 수 있습니다. 입체로 변환하면, 면적을 구할 수 없습니다.

Code
SELECT CG_3DArea(geom) As cube_surface_area,
CG_3DArea(CG_MakeSolid(geom)) As solid_surface_area
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_area │ solid_surface_area
──────────────────┼────────────────────
6                 │ 0