Loading

ES|QL ST_NPOINTS function

Embedded
geometry

Expression of type geo_point, geo_shape, cartesian_point or cartesian_shape. If null, the function returns null.

Counts the number of points in the supplied geometry.

geometry result
cartesian_point integer
cartesian_shape integer
geo_point integer
geo_shape integer
FROM airport_city_boundaries
| WHERE abbrev == "CPH"
| EVAL points = ST_NPOINTS(city_boundary)
| KEEP abbrev, airport, points
		
abbrev:keyword airport:text points:integer
CPH Copenhagen 15