Name

ST_3DUnion — Perform 3D union.

Synopsis

geometry ST_3DUnion(geometry geom1, geometry geom2);

geometry ST_3DUnion(geometry set g1field);

설명

2.2.0 버전부터 사용할 수 있습니다.

Availability: 3.3.0 aggregate variant was added

This method needs SFCGAL backend.

This method implements the SQL/MM specification.

SQL-MM IEC 13249-3: 5.1

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).

Aggregate variant: returns a geometry that is the 3D union of a rowset of geometries. The ST_3DUnion() function is an "aggregate" function in the terminology of PostgreSQL. That means that it operates on rows of data, in the same way the SUM() and AVG() functions do and like most aggregates, it also ignores NULL geometries.

예시

PostGIS ST_AsX3D 를 통해 3차원 영상을 생성한 다음 X3Dom HTML 자바스크립트 렌더링 라이브러리 를 이용해서 HTML로 렌더링합니다.

SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'),
 50, 'quad_segs=2'),0,0,30) AS geom1,
        ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(80 80)'),
 50, 'quad_segs=1'),0,0,30) AS geom2;
                

원본 3차원 도형들이 중첩합니다. geom2를 반투명하게 표현했습니다.

SELECT ST_3DUnion(geom1,geom2)
FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'),
 50, 'quad_segs=2'),0,0,30) AS geom1,
        ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(80 80)'),
 50, 'quad_segs=1'),0,0,30) AS geom2 ) As t;

geom1과 geom2의 통합

참고

ST_Extrude, ST_AsX3D, ST_3DIntersection ST_3DDifference