共用方式為


EnvelopeAggregate (geometry 資料類型)

傳回一組指定 geometry 物件的週框方塊。

語法

EnvelopeAggregate ( geometry_operand )

引數

  • geometry_operand
    這是 geometry 類型資料表資料行,代表一組 geometry 物件。

傳回類型

SQL Server 傳回類型:geometry

例外狀況

輸入的值無效時,會擲回 FormatException。 請參閱<STIsValid (geometry 資料類型)>。

備註

輸入是空的或輸入具有不同 SRID 時,方法會傳回 null。 請參閱<空間參考識別碼 (SRID)>。

方法會忽略 null 輸入。

[!附註]

如果所有輸入值為 null,方法會傳回 null。

範例

下列範例會傳回資料表變數資料行中物件集的週框方塊。

-- Setup table variable for EnvelopeAggregate 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 EnvelopeAggregate on @Geom.shape column

SELECT geometry::EnvelopeAggregate(shape).ToString()

FROM @Geom;

請參閱

其他資源

擴充的靜態幾何方法