geo:count-vertices( $region as cts:region ) as xs:integer
This function returns a count of the number of vertices in a region.
Parameters | |
---|---|
region | A cts region. |
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).
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
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.