Table of Contents

Class SpatialNumPoints

Namespace
YndigoBlue.Velocity.Functions
Assembly
YndigoBlue.Velocity.dll

Represents the ST_NumPoints spatial property function that returns the number of points in a geometry.

public class SpatialNumPoints : Function, IElement, ICheckItem, IDefaultItem, IFilterItem
Inheritance
SpatialNumPoints
Implements

Remarks

Warning

Spatial functions are not available in the Community Edition of Velocity. They require the Full Edition.

The ST_NumPoints function returns the count of vertices (coordinate points) in a geometry. For linestrings, this is the number of vertices along the line. For polygons, it includes all vertices in all rings. For points, returns 1. For multi-part geometries, returns the total count across all components. The count includes duplicate vertices where rings close. For Geometry types in planar coordinate systems, this is useful for analyzing geometry complexity, simplification decisions, or performance optimization. OGC-compliant.

SpatialNumPoints diagram showing vertex counts

Return Type: Integer (count of vertices).

GeometryST_NumPoints Result
Point1
LineString (4 vertices)4
Rectangle polygon5 (first = last)
Polygon with holeexterior + interior vertices
MultiLineStringSum of all line vertices

Constructors

SpatialNumPoints(Geometry)

Initializes a new instance of ST_NumPoints with a geometry literal.

SpatialNumPoints(Column)

Initializes a new instance of ST_NumPoints with a geometry column.

SpatialNumPoints(Function)

Initializes a new instance of ST_NumPoints for a function result.

SpatialNumPoints(Geography)

Initializes a new instance of ST_NumPoints with a geography literal.