<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/geo.regionApproximate.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>geo.regionApproximate</api:function-name><api:suggest>geo.regionapproximate</api:suggest><api:suggest>geo</api:suggest><api:suggest>regionapproximate</api:suggest><api:function-link mode="xquery" fullname="geo:region-approximate">/apidoc/8.0/geo:region-approximate.xml</api:function-link><api:function mode="javascript" name="regionApproximate" 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.regionApproximate"><api:summary>
This function returns a simplified approximation of the region,
using the Douglas-Peucker algorithm. The threshold specifies how close an
approximation this should be in the same units as tolerance.
The tolerance option should be smaller than the threshold.
</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="threshold" type="xs:double"><api:param-description>
  The threshold.
  </api:param-description><api:param-name>threshold</api:param-name><api:param-type>Number</api:param-type></api:param><api:param name="options" type="xs:string*" optional="true"><api:param-description>
    The tolerance, units, coordinate system.
  </api:param-description><api:param-name>options</api:param-name><api:param-type>String[]</api:param-type></api:param></api:params><api:return>cts.region</api:return><api:usage>
</api:usage><api:example>
geo:region-approximate(
  cts:polygon((
    cts:point(0,0),
    cts:point(4,0),
    cts:point(2,10),
    cts:point(2,14),
    cts:point(2,11),
    cts:point(0,4),
    cts:point(0,0))), 400, ("tolerance=1")) =&gt;
    "0,0 2,14 2,11 0,0"

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