<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/geo.countVertices.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>geo.countVertices</api:function-name><api:suggest>geo.countvertices</api:suggest><api:suggest>geo</api:suggest><api:suggest>countvertices</api:suggest><api:function-link mode="xquery" fullname="geo:count-vertices">/apidoc/8.0/geo:count-vertices.xml</api:function-link><api:function mode="javascript" name="countVertices" 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.countVertices"><api: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).
</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:params><api:return>Number</api:return><api:usage>
<p xmlns="http://www.w3.org/1999/xhtml"></p>
</api:usage><api: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))) ) =&gt; "4"

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