Name

CG_3DDifference — Representar diferença 3D

Synopsis

geometry CG_3DDifference(geometry geom1, geometry geom2);

Descrição

Retorna aquela parte de geom1 que não faz parte de geom2.

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

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 parte que será removida.

SELECT CG_3DDifference(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;

O que restou depois de remover geom2