Name

CG_3DDifference — Perform 3D difference

Synopsis

geometry CG_3DDifference(geometry geom1, geometry geom2);

Descrizione

Returns that part of geom1 that is not part of geom2.

Availability: 3.5.0

Questo metodo richiede il backend SFCGAL.

Questo metodo implementa la specifica SQL/MM. SQL-MM IEC 13249-3: 5.1

Questa funzione supporta il 3d e non distrugge gli z-index.

Questa funzione supporta le Polyhedral Surface.

Questa funzione supporta i Triangoli e le Triangulated Irregular Network Surfaces (TIN).

Esempi

3D images were generated using PostGIS ST_AsX3D and rendering in HTML using 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;
                            

Original 3D geometries overlaid. geom2 is the part that will be removed.

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;

What's left after removing geom2