特定の geometry オブジェクト セットの境界ボックスを返します。
構文
EnvelopeAggregate ( geometry_operand )
引数
- geometry_operand
geometry オブジェクトのセットを表す geometry 型のテーブルの列を指定します。
戻り値の型
SQL Server の戻り値の型: geometry
例外
入力値が無効である場合は、FormatException をスローします。 「STIsValid (geometry データ型)」を参照してください。
説明
入力が空である場合または入力の SRID が異なる場合は、null が返されます。 「SRID (Spatial Reference Identifier)」を参照してください。
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;
注