适用于:SQL Server
Azure SQL 数据库
Azure SQL 托管实例
Microsoft Fabric 中的 SQL 数据库
为一组给定的 geography 对象返回边界对象。 所生成的 geography 对象包含多个圆弧段。
Syntax
EnvelopeAggregate ( geography_operand )
Arguments
geography_operand
geography 类型的表列,其中保存要对其执行包络线聚合操作的 geography 对象的集合。
返回类型
SQL Server 返回类型:geography
Remarks
当产生的边界对象大于半球时,将返回 FullGlobe 对象。 此方法不精确。
如果输入具有不同的 SRID,方法返回 null。 请参阅空间引用标识符 (SRID)。
方法忽略 null 输入。
Note
如果所有输入值均为 null,则方法返回 null。
Examples
下面的示例对城市内的一组 geography 位置点执行 EnvelopeAggregate。
USE AdventureWorks2022
GO
SELECT City,
geography::EnvelopeAggregate(SpatialLocation) AS SpatialLocation
FROM Person.Address
WHERE PostalCode LIKE('981%')
GROUP BY City;