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.

Parameters
$region A cts region.

Usage Notes

The vertex that closes the ring is only counted once.

For a complex polygon this function returns a count of the vertices in the outer polygon. For points it returns 1. For circles it returns 0. For boxes it returns the number of distinct points in the set (sw, se, nw, ne).

See Also

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