Name

ST_NumPoints — 返回LineString或CircularString中的点数。

Synopsis

integer ST_NumPoints(geometry g1);

描述

返回ST_LineString值或ST_CircularString值中的点数。1.4之前的版本仅适用于等级库状态的线串。从1.4开始,这是ST_NPoints的别名,它返回的不只是线串的顶点数。请考虑改用ST_NPoints,它具有多用途,可用于多种几何图形类型。

This method implements the OGC Simple Features Implementation Specification for SQL 1.1.

This method implements the SQL/MM specification. SQL-MM 3:7.2.4

示例

SELECT ST_NumPoints(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)'));
                --result
                4
                

另请参阅

ST_NPoints