<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/geo.countDistinctVertices.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>geo.countDistinctVertices</api:function-name><api:suggest>geo.countdistinctvertices</api:suggest><api:suggest>geo</api:suggest><api:suggest>countdistinctvertices</api:suggest><api:function-link mode="xquery" fullname="geo:count-distinct-vertices">/apidoc/8.0/geo:count-distinct-vertices.xml</api:function-link><api:function mode="javascript" name="countDistinctVertices" type="builtin" lib="geo" category="SearchBuiltins" subcategory="Geospatial Operations" hidden="false" bucket="MarkLogic Built-In Functions" prefix="geo" namespace="http://marklogic.com/geospatial" fullname="geo.countDistinctVertices"><api:summary>
This function returns a count of the distinct number of vertices in a region.
It takes into account tolerance. 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).
</api:summary><api:params><api:param name="region" type="cts:region"><api:param-description>
  A cts region.
  </api:param-description><api:param-name>region</api:param-name><api:param-type>cts.region</api:param-type></api:param><api:param name="options" type="xs:string*" optional="true"><api:param-description>
    The tolerance.
  </api:param-description><api:param-name>options</api:param-name><api:param-type>String[]</api:param-type></api:param></api:params><api:return>Number</api:return><api:usage>
<p xmlns="http://www.w3.org/1999/xhtml"></p>
</api:usage><api:example>
geo:count-distinct-vertices(
cts:polygon((cts:point(1,2),cts:point(3,4),cts:point(3,4),cts:point(4,5),
cts:point(1,2))) ) =&gt; "3"

</api:example></api:function></api:function-page>