ST_POINTN

functionsupportedCore SQL functions

docs.snowflake.com ↗

Geospatial functions

Returns a Point at a specified index in a LineString.

Syntax

ST_POINTN( <geography_or_geometry_expression> , <index> )

Parameters

NameRequiredDescription
geography_or_geometry_expressionrequiredThe argument must be an expression of type GEOGRAPHY or GEOMETRY that represents a LineString.
indexrequiredThe index of the Point to return. The index must be an integer. A negative index is interpreted as the offset from the end of the LineString. For example, -1 is interpreted as the last Point in the LineString, -2 is interpreted as the second to the last Point, etc.

Returns

The function returns a value of type GEOGRAPHY or GEOMETRY that contains the Point at the specified index of the LineString.

Usage notes

See also

Referenced by