Export (0) Print
Expand All
Expand Minimize

SqlGeography.STPointN Method

Returns the specified point in a SqlGeography instance.

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

public function STPointN(
	n : int
) : SqlGeography

Parameters

n
Type: Int32
An int expression between 1 and the number of points in the SqlGeography instance.

Return Value

Type: Microsoft.SqlServer.Types.SqlGeography
A SqlGeography representing the specified point in the calling instance.

If a SqlGeography instance is user-created, the STPointN method returns the point specified by expression by ordering the points in the order in which they were originally input.

If a SqlGeography instance is constructed by the system, STPointN returns the point specified by expression by ordering all the points in the same order they would be output: first by geography instance, then by ring within the instance (if appropriate), and then by point within the ring. This order is deterministic.

If this method is called with a value less than 1, it throws an ArgumentOutOfRangeException.

If this method is called with a value greater than the number of points in the instance, it returns a null reference (Nothing in Visual Basic).

Community Additions

ADD
Show:
© 2014 Microsoft