Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 5035839f674c88dea1f7928a86fbdc64 > files > 658

geos-devel-3.2.1-3.fc14.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>GEOS: geos::algorithm::CGAlgorithms Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath">
    <ul>
      <li><a class="el" href="namespacegeos.html">geos</a>      </li>
      <li><a class="el" href="namespacegeos_1_1algorithm.html">algorithm</a>      </li>
      <li><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html">geos::algorithm::CGAlgorithms</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>geos::algorithm::CGAlgorithms Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="geos::algorithm::CGAlgorithms" -->
<p>Specifies and implements various fundamental Computational Geometric algorithms. The algorithms supplied in this class are robust for double-precision floating point.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="CGAlgorithms_8h_source.html">CGAlgorithms.h</a>&gt;</code></p>

<p><a href="classgeos_1_1algorithm_1_1CGAlgorithms-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <b>CLOCKWISE</b> = -1, 
<b>COLLINEAR</b>, 
<b>COUNTERCLOCKWISE</b>
 }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <b>RIGHT</b> = -1, 
<b>LEFT</b>, 
<b>STRAIGHT</b>
 }</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#af8deffac604e1c414655ffa2ff7d746d">isPointInRing</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p, const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *ring)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests whether a point lies inside a ring.  <a href="#af8deffac604e1c414655ffa2ff7d746d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a651e8efdf4844618cb47ab7afcc65703"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::isPointInRing" ref="a651e8efdf4844618cb47ab7afcc65703" args="(const geom::Coordinate &amp;p, const std::vector&lt; const geom::Coordinate * &gt; &amp;ring)" -->
static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#a651e8efdf4844618cb47ab7afcc65703">isPointInRing</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p, const std::vector&lt; const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> * &gt; &amp;ring)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Same as above, but taking a vector of const Coordinates (faster). <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#ab674e5769c61cebe6f1b6ff23aeb33c1">locatePointInRing</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p, const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> &amp;ring)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines whether a point lies in the interior, on the boundary, or in the exterior of a ring.  <a href="#ab674e5769c61cebe6f1b6ff23aeb33c1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a007e05d124ab7676297dce5182e2c2a8"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::locatePointInRing" ref="a007e05d124ab7676297dce5182e2c2a8" args="(const geom::Coordinate &amp;p, const std::vector&lt; const geom::Coordinate * &gt; &amp;ring)" -->
static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#a007e05d124ab7676297dce5182e2c2a8">locatePointInRing</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p, const std::vector&lt; const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> * &gt; &amp;ring)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Same as above, but taking a vector of const Coordinates. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#a513d597fbd1c047bbf01e99c50fa14dd">isOnLine</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p, const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *pt)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Test whether a point lies on the given line segment.  <a href="#a513d597fbd1c047bbf01e99c50fa14dd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#a9b6f871f1a5375b026857329026deeb4">isCCW</a> (const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *ring)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes whether a ring defined by an array of Coordinate is oriented counter-clockwise.  <a href="#a9b6f871f1a5375b026857329026deeb4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#a33351aad4c1f535730da279a28a67240">computeOrientation</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p1, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p2, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;q)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the orientation of a point q to the directed line segment p1-p2.  <a href="#a33351aad4c1f535730da279a28a67240"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#a6469b6d34ac00a5522262563203ab736">distancePointLine</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;A, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;B)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the distance from a point p to a line segment AB.  <a href="#a6469b6d34ac00a5522262563203ab736"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#a2918932cfc564a18fe437da2aae1cd4c">distancePointLinePerpendicular</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;A, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;B)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the perpendicular distance from a point p to the (infinite) line containing the points AB.  <a href="#a2918932cfc564a18fe437da2aae1cd4c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#a6c8c2868c0c925fd66f75c3eae087c18">distanceLineLine</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;A, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;B, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;C, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;D)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the distance from a line segment AB to a line segment CD.  <a href="#a6c8c2868c0c925fd66f75c3eae087c18"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b7f8d3bc7caac2c8f559943a17227ef"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::signedArea" ref="a7b7f8d3bc7caac2c8f559943a17227ef" args="(const geom::CoordinateSequence *ring)" -->
static double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#a7b7f8d3bc7caac2c8f559943a17227ef">signedArea</a> (const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *ring)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the signed area for a ring. The area is positive if the ring is oriented CW. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#a8c44b9508174476e70459474e3b28f18">length</a> (const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *pts)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the length of a linestring specified by a sequence of points.  <a href="#a8c44b9508174476e70459474e3b28f18"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#a6a88f58e38168273e4a1e139ea654b91">orientationIndex</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p1, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p2, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;q)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the index of the direction of the point <code>q</code> relative to a vector specified by <code>p1-p2</code>.  <a href="#a6a88f58e38168273e4a1e139ea654b91"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Specifies and implements various fundamental Computational Geometric algorithms. The algorithms supplied in this class are robust for double-precision floating point. </p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a33351aad4c1f535730da279a28a67240"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::computeOrientation" ref="a33351aad4c1f535730da279a28a67240" args="(const geom::Coordinate &amp;p1, const geom::Coordinate &amp;p2, const geom::Coordinate &amp;q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int geos::algorithm::CGAlgorithms::computeOrientation </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>q</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes the orientation of a point q to the directed line segment p1-p2. </p>
<p>The orientation of a point relative to a directed line segment indicates which way you turn to get to q after travelling from p1 to p2.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 if q is counter-clockwise from p1-p2 </dd>
<dd>
-1 if q is clockwise from p1-p2 </dd>
<dd>
0 if q is collinear with p1-p2 </dd></dl>

</div>
</div>
<a class="anchor" id="a6c8c2868c0c925fd66f75c3eae087c18"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::distanceLineLine" ref="a6c8c2868c0c925fd66f75c3eae087c18" args="(const geom::Coordinate &amp;A, const geom::Coordinate &amp;B, const geom::Coordinate &amp;C, const geom::Coordinate &amp;D)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static double geos::algorithm::CGAlgorithms::distanceLineLine </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>B</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>D</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes the distance from a line segment AB to a line segment CD. </p>
<p>Note: NON-ROBUST!</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>A</em>&nbsp;</td><td>a point of one line </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>B</em>&nbsp;</td><td>the second point of (must be different to A) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>C</em>&nbsp;</td><td>one point of the line </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>D</em>&nbsp;</td><td>another point of the line (must be different to A) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6469b6d34ac00a5522262563203ab736"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::distancePointLine" ref="a6469b6d34ac00a5522262563203ab736" args="(const geom::Coordinate &amp;p, const geom::Coordinate &amp;A, const geom::Coordinate &amp;B)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static double geos::algorithm::CGAlgorithms::distancePointLine </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>B</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes the distance from a point p to a line segment AB. </p>
<p>Note: NON-ROBUST!</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>the point to compute the distance for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>A</em>&nbsp;</td><td>one point of the line </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>B</em>&nbsp;</td><td>another point of the line (must be different to A) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the distance from p to line segment AB </dd></dl>

</div>
</div>
<a class="anchor" id="a2918932cfc564a18fe437da2aae1cd4c"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::distancePointLinePerpendicular" ref="a2918932cfc564a18fe437da2aae1cd4c" args="(const geom::Coordinate &amp;p, const geom::Coordinate &amp;A, const geom::Coordinate &amp;B)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static double geos::algorithm::CGAlgorithms::distancePointLinePerpendicular </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>B</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes the perpendicular distance from a point p to the (infinite) line containing the points AB. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>the point to compute the distance for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>A</em>&nbsp;</td><td>one point of the line </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>B</em>&nbsp;</td><td>another point of the line (must be different to A) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the distance from p to line AB </dd></dl>

</div>
</div>
<a class="anchor" id="a9b6f871f1a5375b026857329026deeb4"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::isCCW" ref="a9b6f871f1a5375b026857329026deeb4" args="(const geom::CoordinateSequence *ring)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool geos::algorithm::CGAlgorithms::isCCW </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *&nbsp;</td>
          <td class="paramname"> <em>ring</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes whether a ring defined by an array of Coordinate is oriented counter-clockwise. </p>
<ul>
<li>The list of points is assumed to have the first and last points equal.</li>
<li>This will handle coordinate lists which contain repeated points.</li>
</ul>
<p>This algorithm is <b>only</b> guaranteed to work with valid rings. If the ring is invalid (e.g. self-crosses or touches), the computed result <b>may</b> not be correct.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ring</em>&nbsp;</td><td>an array of coordinates forming a ring </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the ring is oriented counter-clockwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a513d597fbd1c047bbf01e99c50fa14dd"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::isOnLine" ref="a513d597fbd1c047bbf01e99c50fa14dd" args="(const geom::Coordinate &amp;p, const geom::CoordinateSequence *pt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool geos::algorithm::CGAlgorithms::isOnLine </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *&nbsp;</td>
          <td class="paramname"> <em>pt</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Test whether a point lies on the given line segment. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true true if the point is a vertex of the line or lies in the interior of a line segment in the linestring </dd></dl>

</div>
</div>
<a class="anchor" id="af8deffac604e1c414655ffa2ff7d746d"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::isPointInRing" ref="af8deffac604e1c414655ffa2ff7d746d" args="(const geom::Coordinate &amp;p, const geom::CoordinateSequence *ring)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool geos::algorithm::CGAlgorithms::isPointInRing </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *&nbsp;</td>
          <td class="paramname"> <em>ring</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tests whether a point lies inside a ring. </p>
<p>The ring may be oriented in either direction. A point lying exactly on the ring boundary is considered to be inside the ring.</p>
<p>This algorithm does not first check the point against the envelope of the ring.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>point to check for ring inclusion </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ring</em>&nbsp;</td><td>is assumed to have first point identical to last point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if p is inside ring</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classgeos_1_1algorithm_1_1CGAlgorithms.html#ab674e5769c61cebe6f1b6ff23aeb33c1" title="Determines whether a point lies in the interior, on the boundary, or in the exterior of a ring...">locatePointInRing</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a8c44b9508174476e70459474e3b28f18"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::length" ref="a8c44b9508174476e70459474e3b28f18" args="(const geom::CoordinateSequence *pts)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static double geos::algorithm::CGAlgorithms::length </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *&nbsp;</td>
          <td class="paramname"> <em>pts</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes the length of a linestring specified by a sequence of points. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pts</em>&nbsp;</td><td>the points specifying the linestring </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the length of the linestring </dd></dl>

</div>
</div>
<a class="anchor" id="ab674e5769c61cebe6f1b6ff23aeb33c1"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::locatePointInRing" ref="ab674e5769c61cebe6f1b6ff23aeb33c1" args="(const geom::Coordinate &amp;p, const geom::CoordinateSequence &amp;ring)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int geos::algorithm::CGAlgorithms::locatePointInRing </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ring</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Determines whether a point lies in the interior, on the boundary, or in the exterior of a ring. </p>
<p>The ring may be oriented in either direction.</p>
<p>This method does <em>not</em> first check the point against the envelope of the ring.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>point to check for ring inclusion </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ring</em>&nbsp;</td><td>an array of coordinates representing the ring (which must have first point identical to last point) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the <a class="el" href="">Location</a> of p relative to the ring </dd></dl>

</div>
</div>
<a class="anchor" id="a6a88f58e38168273e4a1e139ea654b91"></a><!-- doxytag: member="geos::algorithm::CGAlgorithms::orientationIndex" ref="a6a88f58e38168273e4a1e139ea654b91" args="(const geom::Coordinate &amp;p1, const geom::Coordinate &amp;p2, const geom::Coordinate &amp;q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int geos::algorithm::CGAlgorithms::orientationIndex </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>q</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the index of the direction of the point <code>q</code> relative to a vector specified by <code>p1-p2</code>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>p1</em>&nbsp;</td><td>the origin point of the vector </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>p2</em>&nbsp;</td><td>the final point of the vector </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>q</em>&nbsp;</td><td>the point to compute the direction to</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 if q is counter-clockwise (left) from p1-p2 </dd>
<dd>
-1 if q is clockwise (right) from p1-p2 </dd>
<dd>
0 if q is collinear with p1-p2 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="CGAlgorithms_8h_source.html">CGAlgorithms.h</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Jul 22 2010 for GEOS by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>