<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/geo.approxCenter.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>geo.approxCenter</api:function-name><api:suggest>geo.approxcenter</api:suggest><api:suggest>geo</api:suggest><api:suggest>approxcenter</api:suggest><api:function-link mode="xquery" fullname="geo:approx-center">/apidoc/8.0/geo:approx-center.xml</api:function-link><api:function mode="javascript" name="approxCenter" 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.approxCenter"><api:summary>
   Return a point approximating the center of the given region.
   For a point, this is the point itself.
   For a circle, it is the center point.
   For a box, it is the point whose latitude is half-way between the northern
   and southern limits and whose longitude is half-way between the western and
   eastern limits.
   For polygons, complex polygons, and linestrings, an approximate centroid
   is returned. This approximation is rough, and useful for quick comparisons.
</api:summary><api:params><api:param name="region" type="cts:region"><api:param-description>
    A geospatial 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>
    Options.  The default is ().
    <p xmlns="http://www.w3.org/1999/xhtml">
      Options include:</p>
      <blockquote xmlns="http://www.w3.org/1999/xhtml"><dl>
        <dt>"box-percent=n"</dt>
        <dd>An integer between 0 and 100 (default is 100) that indicates what
        percentage of a polygon's bounding box slivers should be used in
        constructing the approximate centroid.  Lower numbers use fewer
        slivers, giving faster but less accurate results; larger numbers use
        more slivers, giving slower but more accurate results.
        </dd>
        <dt>"coordinate-system=wgs84"</dt>
        <dd>Use the WGS84 coordinate system.</dd>
        <dt>"coordinate-system=raw"</dt>
        <dd>Use the raw coordinate system.</dd>
     </dl></blockquote>
  </api:param-description><api:param-name>options</api:param-name><api:param-type>String[]</api:param-type></api:param></api:params><api:return>cts.point</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
// Approximate center of London Zoo 
geo.approxCenter(
    cts.polygon([
      cts.point(51.5361190,-0.1590335),
      cts.point(51.5366529,-0.1568234),
      cts.point(51.5372001,-0.1537657),
      cts.point(51.5372868,-0.1527464),
      cts.point(51.5334561,-0.1509440),
      cts.point(51.5332359,-0.1517808),
      cts.point(51.5348643,-0.1584756),
      cts.point(51.5355250,-0.1592481),
      cts.point(51.5360522,-0.1590765)
  ]));

==&gt; cts.point(51.535511,-0.15516526)
</pre></api:example></api:function></api:function-page>