CollectionAggregate (geometry Data Type)

data-types
#tsql#data-types

Syntax

CollectionAggregate ( geometry_collection )

Return Type

geometry

Arguments

geometry_collection

A geometry collection instance.

Remarks

Returns a geometry instance from a collection of geometry types.

Examples

-- Create a geometry collection and aggregate
DECLARE @g geometry = geometry::STGeomFromText('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING(0 0, 2 2))', 0);