<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/geo.polygonIntersects.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>geo.polygonIntersects</api:function-name><api:suggest>geo.polygonintersects</api:suggest><api:suggest>geo</api:suggest><api:suggest>polygonintersects</api:suggest><api:function-link mode="xquery" fullname="geo:polygon-intersects">/apidoc/8.0/geo:polygon-intersects.xml</api:function-link><api:function mode="javascript" name="polygonIntersects" 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.polygonIntersects"><api:summary>
  Returns true if the polygon intersects with a region.
</api:summary><api:params><api:param name="polygon" type="cts:polygon"><api:param-description>
  A geographic polygon.
  </api:param-description><api:param-name>polygon</api:param-name><api:param-type>cts.polygon</api:param-type></api:param><api:param name="region" type="cts:region*"><api:param-description>
    One or more geographic regions (boxes, circles, polygons, or points).
    Where multiple regions are specified, return true if any region intersects
    the target polygon.
  </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 for the operation. The default is ().
  <p xmlns="http://www.w3.org/1999/xhtml">Options include:</p>
    <p xmlns="http://www.w3.org/1999/xhtml">Options include:</p>
      <blockquote xmlns="http://www.w3.org/1999/xhtml">
        <dl>
        <dt>"coordinate-system=wgs84"</dt>
        <dd>Use the WGS84 coordinate system.</dd>
        <dt>"units=miles"</dt>
        <dd>Distance (for circles) is measured in miles.</dd>
        <dt>"boundaries-included"</dt>
        <dd>Points on boxes', circles', and polygons' boundaries are counted
        as matching.  This is the default.</dd>
        <dt>"boundaries-excluded"</dt>
        <dd>Points on boxes', circles', and polygons' boundaries are not 
    counted as matching.</dd>
        <dt>"boundaries-latitude-excluded"</dt>
        <dd>Points on boxes' latitude boundaries are not counted as 
    matching.</dd>
        <dt>"boundaries-longitude-excluded"</dt>
        <dd>Points on boxes' longitude boundaries are not counted as 
    matching.</dd>
        <dt>"boundaries-south-excluded"</dt>
        <dd>Points on the boxes' southern boundaries are not counted as 
    matching.</dd>
        <dt>"boundaries-west-excluded"</dt>
        <dd>Points on the boxes' western boundaries are not counted as 
    matching.</dd>
        <dt>"boundaries-north-excluded"</dt>
        <dd>Points on the boxes' northern boundaries are not counted as 
    matching.</dd>
        <dt>"boundaries-east-excluded"</dt>
        <dd>Points on the boxes' eastern boundaries are not counted as 
    matching.</dd>
        <dt>"boundaries-circle-excluded"</dt>
        <dd>Points on circles' boundary are not counted as matching.</dd>
        <dt>"boundaries-endpoints-excluded"</dt>
        <dd>Points on linestrings' boundary (the endpoints) are not counted as matching.</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>Boolean</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
// Is Regent's Park within a mile of the American School in London? Yes 

geo.polygonIntersects(
    cts.polygon([
      cts.point(51.5298921,-0.1674557),
      cts.point(51.5327487,-0.1660395),
      cts.point(51.5343504,-0.1644945),
      cts.point(51.5354716,-0.1620483),
      cts.point(51.5367796,-0.1574993),
      cts.point(51.5374737,-0.1526499),
      cts.point(51.5369398,-0.1488304),
      cts.point(51.5351513,-0.1468134),
      cts.point(51.5319478,-0.1460838),
      cts.point(51.5284771,-0.1460409),
      cts.point(51.5253265,-0.1455688),
      cts.point(51.5237779,-0.1450968),
      cts.point(51.5227899,-0.1461697),
      cts.point(51.5233507,-0.1478004),
      cts.point(51.5246323,-0.1483583),
      cts.point(51.5248192,-0.1587868),
      cts.point(51.5266348,-0.1604605),
      cts.point(51.5292514,-0.1644945),
      cts.point(51.5298387,-0.1665545)
    ]),
    cts.circle(1,cts.point(51.5347842,-0.1766932)));
==&gt; true

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