Loading TOC...

geo.countVertices

geo.countVertices(
   $region as cts.region
) as Number

Summary

This function returns a count of the number of vertices in a region. The vertex that closes the ring is only counted once. For a complex polygon this is a count of the vertices in the outer polygon. For points it returns 1, for circles it returns 0, and for boxes it returns the number of distinct points in the set (sw, se, nw, ne).

Parameters
$region A cts region.

Example

geo.countVertices(
  cts.polygon([cts.point(1,2),cts.point(3,4),cts.point(3,4),cts.point(4,5),
  cts.point(1,2)]) )

// => 4

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy