Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
STLength Method
Collapse the table of content
Expand the table of content

SqlGeography.STLength Method

Returns the total length of the elements in a SqlGeography instance or the SqlGeography instances within a GeometryCollection.

Namespace:  Microsoft.SqlServer.Types
Assembly:  Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)

public function STLength() : SqlDouble

Return Value

Type: SqlDouble
A SqlDouble value containing the total length.

If a SqlGeography instance is closed, its length is calculated as the total length around the instance; the length of any polygon is its perimeter, and the length of a point is 0. The length of a GeometryCollection is found by calculating the sum of the lengths of all of the SqlGeography instances contained within the collection.

Community Additions

ADD
Show:
© 2015 Microsoft