CollectionAggregate (geography Data Type)
Collapse the table of content
Expand the table of content

CollectionAggregate (geography Data Type)


Creates a GeometryCollection instance from a set of geography objects.

Applies to: SQL Server (SQL Server 2012 through current version), Azure SQL Database.
ConvexHullAggregate ( geography_operand )  

Is a geography type table column that represents a set of geography objects to be listed in the GeometryCollection instance.

SQL Server return type: geography

Throws a FormatException when there are input values that are not valid. See STIsValid (geography Data Type)

Method returns null when the input is empty or the input has different SRIDs. See Spatial Reference Identifiers (SRIDs)

Method ignores null inputs.

System_CAPS_ICON_note.jpg Note

Method returns null if all inputted values are null.

The following example returns a GeometryCollection instance that contains a set of geography objects.

USE AdventureWorks2012


SELECT geography::CollectionAggregate(SpatialLocation).ToString() AS SpatialLocation

FROM Person.Address

WHERE City LIKE ('Bothell')

Extended Static Geography Methods

Community Additions

© 2016 Microsoft