Name

ST_3DDifference — 执行三维差异

Synopsis

geometry ST_3DDifference(geometry geom1, geometry geom2);

描述

返回geom1中不属于geom2的部分。

可用性:2.2.0

This method needs SFCGAL backend.

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

示例

3D图像是使用PostGIS生成的 ST_AsX3D 并使用以下命令在HTML中呈现 X3Dom HTML Java脚本渲染库

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;
                

覆盖原始3D几何图形。Geom2是将被移除的部分。

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

移除geom2后还剩下什么

另请参阅

ST_Extrude, ST_AsX3D, ST_3DIntersection ST_3DUnion