STPointN (geography Data Type)

data-types
#tsql#data-types

Syntax

Return Type

geography

Arguments

n

An int expression between 1 and the number of points in the geography instance.

Remarks

Returns the specified point from a geography instance.

Examples

DECLARE @g geography = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);
SELECT @g.STPointN(1).ToString();