Name

CG_3DUnion — Perform 3D union.

Synopsis

geometry CG_3DUnion(geometry geom1, geometry geom2);

geometry CG_3DUnion(geometry set g1field);

Descrição

[Warning]

CG_3DUnion is deprecated as of 3.5.0. Use CG_3DUnion instead.

Availability: 3.5.0

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

Exemplos

As imagens 3D foram criadas usando o PostGIS xref linkend="ST_AsX3D"/> e interpretadas no HTML usando: X3Dom HTML Javascript rendering library.

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

Geometrias 3D originais cobertas. geom2 é a com transparência.

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

União de geom1 e geom2