MarkLogic 12 EA 1 Product Documentation
geo:count-vertices

geo:count-vertices(
   $region as cts:region
) as xs:integer

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:count-vertices(
  cts:polygon((cts:point(1,2),cts:point(3,4),cts:point(3,4),cts:point(4,5),
  cts:point(1,2))) )

=> 4
Powered by MarkLogic Server | Terms of Use | Privacy Policy