ConvexHullAggregate (geography Data Type)

**APPLIES TO:** ![yes](media/yes.png)SQL Server (starting with 2008) ![yes](media/yes.png)Azure SQL Database ![no](media/no.png)Azure SQL Data Warehouse ![no](media/no.png)Parallel Data Warehouse

Returns a convex hull for a given set of geography objects.

Syntax

  
ConvexHullAggregate ( geography_operand )  

Arguments

geography_operand
Is a geography type table column that represents a set of geography objects.

Return Types

SQL Server return type: geography

Exception

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

Remarks

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

Method ignores null inputs.

[!NOTE]
Method returns null if all inputted values are null.

Examples

The following example returns a convex hull of the set of geography objects.

USE AdventureWorks2012  
GO  
SELECT geography::ConvexHullAggregate(SpatialLocation).ToString() AS SpatialLocation  
FROM Person.Address  
WHERE City LIKE ('Bothell')

See Also

Extended Static Geography Methods