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.
Return Type: Integer (count of vertices).
| Geometry | ST_NumPoints Result |
|---|---|
| Point | 1 |
| LineString (4 vertices) | 4 |
| Rectangle polygon | 5 (first = last) |
| Polygon with hole | exterior + interior vertices |
| MultiLineString | Sum 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.