ConvexHullAggregate(geometry 数据类型)

适用于:SQL ServerAzure SQL 数据库Azure SQL 托管实例Microsoft Fabric 预览版中的 SQL 数据库

为一组给定的 geometry 对象返回一个凸包。

Syntax

  
ConvexHullAggregate ( geometry_operand )  

Arguments

geometry_operand
一个 geometry 类型的表列,表示一组 geometry 对象。

Return Types

SQL Server 返回类型:geometry

Exception

在输入值无效时引发 FormatException。 请参阅 STIsValid(geometry 数据类型)

Remarks

在输入为空或具有不同的 SRID 时,方法返回 null。 请参阅空间引用标识符 (SRID)

方法忽略 null 输入

Note

如果所有输入值均为 null,则方法返回 null

Examples

下面的示例在一个表变量列中返回几何图形对象集的凸包。

-- Setup table variable for ConvexHullAggregate example  
DECLARE @Geom TABLE  
(  
shape geometry,  
shapeType nvarchar(50)  
)  
INSERT INTO @Geom(shape,shapeType) VALUES('CURVEPOLYGON(CIRCULARSTRING(2 3, 4 1, 6 3, 4 5, 2 3))', 'Circle'),  
('POLYGON((1 1, 4 1, 4 5, 1 5, 1 1))', 'Rectangle');  
-- Perform ConvexHullAggregate on @Geom.shape column  
SELECT geometry::ConvexHullAggregate(shape).ToString()  
FROM @Geom;

See Also

扩展静态几何图形方法