Sophie

Sophie

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

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::LineIntersector 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_1LineIntersector.html">geos::algorithm::LineIntersector</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>geos::algorithm::LineIntersector Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="geos::algorithm::LineIntersector" -->
<p>A <a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html" title="A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...">LineIntersector</a> is an algorithm that can both test whether two line segments intersect and compute the intersection point if they do.  
<a href="#_details">More...</a></p>

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

<p><a href="classgeos_1_1algorithm_1_1LineIntersector-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>DONT_INTERSECT</b> = 0, 
<b>DO_INTERSECT</b> = 1, 
<b>COLLINEAR</b> = 2
 }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#abe8a444de55358c303d74c765e24b109a41ea06e310475a259b08e43598705fed">NO_INTERSECTION</a> = 0, 
<a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#abe8a444de55358c303d74c765e24b109ac27172d289eac55bb325f5eb73564b56">POINT_INTERSECTION</a> = 1, 
<a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#abe8a444de55358c303d74c765e24b109a7feb3f604c1af5bfe7e422a084b0eade">COLLINEAR_INTERSECTION</a> = 2
 }</td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3b6ab0a165a1dd34a9cb410887f40913"></a><!-- doxytag: member="geos::algorithm::LineIntersector::LineIntersector" ref="a3b6ab0a165a1dd34a9cb410887f40913" args="(const geom::PrecisionModel *initialPrecisionModel=NULL)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>LineIntersector</b> (const <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">geom::PrecisionModel</a> *initialPrecisionModel=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#a788a8925549e86880cd4f263140845cc">isInteriorIntersection</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests whether either intersection point is an interior point of one of the input segments.  <a href="#a788a8925549e86880cd4f263140845cc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#a620174e9d2f136ee37bd4f8cc966f288">isInteriorIntersection</a> (int inputLineIndex)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests whether either intersection point is an interior point of the specified input segment.  <a href="#a620174e9d2f136ee37bd4f8cc966f288"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#a742294f2808e7d07387771ca31a6c07f">setPrecisionModel</a> (const <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">geom::PrecisionModel</a> *newPM)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Force computed intersection to be rounded to a given precision model.  <a href="#a742294f2808e7d07387771ca31a6c07f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#aafe1a3029946d270c4f79503d4abd8ff">computeIntersection</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;p1, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p2)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute the intersection of a point p and the line p1-p2.  <a href="#aafe1a3029946d270c4f79503d4abd8ff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05ea0783ab6adef9152f3b882efa31d7"></a><!-- doxytag: member="geos::algorithm::LineIntersector::computeIntersection" ref="a05ea0783ab6adef9152f3b882efa31d7" args="(const geom::Coordinate &amp;p1, const geom::Coordinate &amp;p2, const geom::Coordinate &amp;p3, const geom::Coordinate &amp;p4)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#a05ea0783ab6adef9152f3b882efa31d7">computeIntersection</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;p3, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p4)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the intersection of the lines p1-p2 and p3-p4. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6101cab64b058fc4a08587a4ae32af58"></a><!-- doxytag: member="geos::algorithm::LineIntersector::toString" ref="a6101cab64b058fc4a08587a4ae32af58" args="() const " -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><b>toString</b> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#a6189821070c6a9081cb2bce8c3c54091">hasIntersection</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#a7e383aa9d5f900c1d107ce78c4de9d79">getIntersectionNum</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of intersection points found.  <a href="#a7e383aa9d5f900c1d107ce78c4de9d79"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#a938b9f5eb11695238aa68754e6b3b25a">getIntersection</a> (int intIndex) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the intIndex'th intersection point.  <a href="#a938b9f5eb11695238aa68754e6b3b25a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#ad5045a086917ab106515c73d6ed1e6a2">isIntersection</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;pt) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Test whether a point is a intersection point of two line segments.  <a href="#ad5045a086917ab106515c73d6ed1e6a2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#a19d15a24c61e942bd83be9ae43cda5fc">isProper</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests whether an intersection is proper.  <a href="#a19d15a24c61e942bd83be9ae43cda5fc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#a82e559675ab185d38c3696c041fa93ac">getIntersectionAlongSegment</a> (int segmentIndex, int intIndex)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the intIndex'th intersection point in the direction of a specified input line segment.  <a href="#a82e559675ab185d38c3696c041fa93ac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#ac0429209ca409502ca8d8a933b60edf5">getIndexAlongSegment</a> (int segmentIndex, int intIndex)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the index of the intIndex'th intersection point in the direction of a specified input line segment.  <a href="#ac0429209ca409502ca8d8a933b60edf5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#a275d3ab3d2fd8d3cb9335816abed530a">getEdgeDistance</a> (int geomIndex, int intIndex) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the "edge distance" of an intersection point along the specified input line segment.  <a href="#a275d3ab3d2fd8d3cb9335816abed530a"></a><br/></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"><a class="anchor" id="ad3b0c7b64e8e86a00f5ded4e9898165b"></a><!-- doxytag: member="geos::algorithm::LineIntersector::interpolateZ" ref="ad3b0c7b64e8e86a00f5ded4e9898165b" args="(const geom::Coordinate &amp;p, const geom::Coordinate &amp;p0, const geom::Coordinate &amp;p1)" -->
static double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#ad3b0c7b64e8e86a00f5ded4e9898165b">interpolateZ</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;p0, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a Z value being the interpolation of Z from p0 and p1 at the given point p. <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_1LineIntersector.html#acdd0af88c0da30b78d381b17914dca94">computeEdgeDistance</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;p0, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the "edge distance" of an intersection point p in an edge.  <a href="#acdd0af88c0da30b78d381b17914dca94"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad28d55013c5d7df0ca36eadaeb06c6bb"></a><!-- doxytag: member="geos::algorithm::LineIntersector::nonRobustComputeEdgeDistance" ref="ad28d55013c5d7df0ca36eadaeb06c6bb" args="(const geom::Coordinate &amp;p, const geom::Coordinate &amp;p1, const geom::Coordinate &amp;p2)" -->
static double&nbsp;</td><td class="memItemRight" valign="bottom"><b>nonRobustComputeEdgeDistance</b> (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;p1, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1e7508254753523e4f8277ba76bc96a2"></a><!-- doxytag: member="geos::algorithm::LineIntersector::hasIntersection" ref="a1e7508254753523e4f8277ba76bc96a2" args="(const geom::Coordinate &amp;p, const geom::Coordinate &amp;p1, const geom::Coordinate &amp;p2)" -->
static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html#a1e7508254753523e4f8277ba76bc96a2">hasIntersection</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;p1, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;p2)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Same as above but doen's compute intersection point. Faster. <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_1LineIntersector.html#a97a04a7c7894f88f4c86c488b32f7921">isSameSignAndNonZero</a> (double a, double b)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns false if both numbers are zero.  <a href="#a97a04a7c7894f88f4c86c488b32f7921"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A <a class="el" href="classgeos_1_1algorithm_1_1LineIntersector.html" title="A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...">LineIntersector</a> is an algorithm that can both test whether two line segments intersect and compute the intersection point if they do. </p>
<p>The intersection point may be computed in a precise or non-precise manner. Computing it precisely involves rounding it to an integer. (This assumes that the input coordinates have been made precise by scaling them to an integer grid.) </p>
<hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="abe8a444de55358c303d74c765e24b109"></a><!-- doxytag: member="geos::algorithm::LineIntersector::@3" ref="abe8a444de55358c303d74c765e24b109" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="abe8a444de55358c303d74c765e24b109a41ea06e310475a259b08e43598705fed"></a><!-- doxytag: member="NO_INTERSECTION" ref="abe8a444de55358c303d74c765e24b109a41ea06e310475a259b08e43598705fed" args="" -->NO_INTERSECTION</em>&nbsp;</td><td>
<p>Indicates that line segments do not intersect. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abe8a444de55358c303d74c765e24b109ac27172d289eac55bb325f5eb73564b56"></a><!-- doxytag: member="POINT_INTERSECTION" ref="abe8a444de55358c303d74c765e24b109ac27172d289eac55bb325f5eb73564b56" args="" -->POINT_INTERSECTION</em>&nbsp;</td><td>
<p>Indicates that line segments intersect in a single point. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abe8a444de55358c303d74c765e24b109a7feb3f604c1af5bfe7e422a084b0eade"></a><!-- doxytag: member="COLLINEAR_INTERSECTION" ref="abe8a444de55358c303d74c765e24b109a7feb3f604c1af5bfe7e422a084b0eade" args="" -->COLLINEAR_INTERSECTION</em>&nbsp;</td><td>
<p>Indicates that line segments intersect in a line segment. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="acdd0af88c0da30b78d381b17914dca94"></a><!-- doxytag: member="geos::algorithm::LineIntersector::computeEdgeDistance" ref="acdd0af88c0da30b78d381b17914dca94" args="(const geom::Coordinate &amp;p, const geom::Coordinate &amp;p0, const geom::Coordinate &amp;p1)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static double geos::algorithm::LineIntersector::computeEdgeDistance </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>p0</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>p1</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 "edge distance" of an intersection point p in an edge. </p>
<p>The edge distance is a metric of the point along the edge. The metric used is a robust and easy to compute metric function. It is <b>not</b> equivalent to the usual Euclidean metric. It relies on the fact that either the x or the y ordinates of the points in the edge are unique, depending on whether the edge is longer in the horizontal or vertical direction.</p>
<p>NOTE: This function may produce incorrect distances for inputs where p is not precisely on p1-p2 (E.g. p = (139,9) p1 = (139,10), p2 = (280,1) produces distanct 0.0, which is incorrect.</p>
<p>My hypothesis is that the function is safe to use for points which are the result of <b>rounding</b> points which lie on the line, but not safe to use for <b>truncated</b> points. </p>

</div>
</div>
<a class="anchor" id="aafe1a3029946d270c4f79503d4abd8ff"></a><!-- doxytag: member="geos::algorithm::LineIntersector::computeIntersection" ref="aafe1a3029946d270c4f79503d4abd8ff" args="(const geom::Coordinate &amp;p, const geom::Coordinate &amp;p1, const geom::Coordinate &amp;p2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void geos::algorithm::LineIntersector::computeIntersection </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>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><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compute the intersection of a point p and the line p1-p2. </p>
<p>This function computes the boolean value of the hasIntersection test. The actual value of the intersection (if there is one) is equal to the value of <code>p</code>. </p>

</div>
</div>
<a class="anchor" id="a275d3ab3d2fd8d3cb9335816abed530a"></a><!-- doxytag: member="geos::algorithm::LineIntersector::getEdgeDistance" ref="a275d3ab3d2fd8d3cb9335816abed530a" args="(int geomIndex, int intIndex) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double geos::algorithm::LineIntersector::getEdgeDistance </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>geomIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>intIndex</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes the "edge distance" of an intersection point along the specified input line segment. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>segmentIndex</em>&nbsp;</td><td>is 0 or 1 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>intIndex</em>&nbsp;</td><td>is 0 or 1</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the edge distance of the intersection point </dd></dl>

</div>
</div>
<a class="anchor" id="ac0429209ca409502ca8d8a933b60edf5"></a><!-- doxytag: member="geos::algorithm::LineIntersector::getIndexAlongSegment" ref="ac0429209ca409502ca8d8a933b60edf5" args="(int segmentIndex, int intIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int geos::algorithm::LineIntersector::getIndexAlongSegment </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>segmentIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>intIndex</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes the index of the intIndex'th intersection point in the direction of a specified input line segment. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>segmentIndex</em>&nbsp;</td><td>is 0 or 1 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>intIndex</em>&nbsp;</td><td>is 0 or 1</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the index of the intersection point along the segment (0 or 1) </dd></dl>

</div>
</div>
<a class="anchor" id="a938b9f5eb11695238aa68754e6b3b25a"></a><!-- doxytag: member="geos::algorithm::LineIntersector::getIntersection" ref="a938b9f5eb11695238aa68754e6b3b25a" args="(int intIndex) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>&amp; geos::algorithm::LineIntersector::getIntersection </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>intIndex</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the intIndex'th intersection point. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>intIndex</em>&nbsp;</td><td>is 0 or 1</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the intIndex'th intersection point </dd></dl>

</div>
</div>
<a class="anchor" id="a82e559675ab185d38c3696c041fa93ac"></a><!-- doxytag: member="geos::algorithm::LineIntersector::getIntersectionAlongSegment" ref="a82e559675ab185d38c3696c041fa93ac" args="(int segmentIndex, int intIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>&amp; geos::algorithm::LineIntersector::getIntersectionAlongSegment </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>segmentIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>intIndex</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes the intIndex'th intersection point in the direction of a specified input line segment. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>segmentIndex</em>&nbsp;</td><td>is 0 or 1 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>intIndex</em>&nbsp;</td><td>is 0 or 1</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the intIndex'th intersection point in the direction of the specified input line segment </dd></dl>

</div>
</div>
<a class="anchor" id="a7e383aa9d5f900c1d107ce78c4de9d79"></a><!-- doxytag: member="geos::algorithm::LineIntersector::getIntersectionNum" ref="a7e383aa9d5f900c1d107ce78c4de9d79" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int geos::algorithm::LineIntersector::getIntersectionNum </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the number of intersection points found. </p>
<p>This will be either 0, 1 or 2. </p>

</div>
</div>
<a class="anchor" id="a6189821070c6a9081cb2bce8c3c54091"></a><!-- doxytag: member="geos::algorithm::LineIntersector::hasIntersection" ref="a6189821070c6a9081cb2bce8c3c54091" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::algorithm::LineIntersector::hasIntersection </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Tests whether the input geometries intersect.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the input geometries intersect </dd></dl>

</div>
</div>
<a class="anchor" id="a788a8925549e86880cd4f263140845cc"></a><!-- doxytag: member="geos::algorithm::LineIntersector::isInteriorIntersection" ref="a788a8925549e86880cd4f263140845cc" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::algorithm::LineIntersector::isInteriorIntersection </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tests whether either intersection point is an interior point of one of the input segments. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if either intersection point is in the interior of one of the input segments </dd></dl>

</div>
</div>
<a class="anchor" id="a620174e9d2f136ee37bd4f8cc966f288"></a><!-- doxytag: member="geos::algorithm::LineIntersector::isInteriorIntersection" ref="a620174e9d2f136ee37bd4f8cc966f288" args="(int inputLineIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::algorithm::LineIntersector::isInteriorIntersection </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>inputLineIndex</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tests whether either intersection point is an interior point of the specified input segment. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if either intersection point is in the interior of the input segment </dd></dl>

</div>
</div>
<a class="anchor" id="ad5045a086917ab106515c73d6ed1e6a2"></a><!-- doxytag: member="geos::algorithm::LineIntersector::isIntersection" ref="ad5045a086917ab106515c73d6ed1e6a2" args="(const geom::Coordinate &amp;pt) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::algorithm::LineIntersector::isIntersection </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>pt</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Test whether a point is a intersection point of two line segments. </p>
<p>Note that if the intersection is a line segment, this method only tests for equality with the endpoints of the intersection segment. It does <b>not</b> return true if the input point is internal to the intersection segment.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the input point is one of the intersection points. </dd></dl>

</div>
</div>
<a class="anchor" id="a19d15a24c61e942bd83be9ae43cda5fc"></a><!-- doxytag: member="geos::algorithm::LineIntersector::isProper" ref="a19d15a24c61e942bd83be9ae43cda5fc" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::algorithm::LineIntersector::isProper </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tests whether an intersection is proper. </p>
<p>The intersection between two line segments is considered proper if they intersect in a single point in the interior of both segments (e.g. the intersection is a single point and is not equal to any of the endpoints).</p>
<p>The intersection between a point and a line segment is considered proper if the point lies in the interior of the segment (e.g. is not equal to either of the endpoints).</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the intersection is proper </dd></dl>

</div>
</div>
<a class="anchor" id="a97a04a7c7894f88f4c86c488b32f7921"></a><!-- doxytag: member="geos::algorithm::LineIntersector::isSameSignAndNonZero" ref="a97a04a7c7894f88f4c86c488b32f7921" args="(double a, double b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool geos::algorithm::LineIntersector::isSameSignAndNonZero </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&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>Returns false if both numbers are zero. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if both numbers are positive or if both numbers are negative. </dd></dl>

</div>
</div>
<a class="anchor" id="a742294f2808e7d07387771ca31a6c07f"></a><!-- doxytag: member="geos::algorithm::LineIntersector::setPrecisionModel" ref="a742294f2808e7d07387771ca31a6c07f" args="(const geom::PrecisionModel *newPM)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void geos::algorithm::LineIntersector::setPrecisionModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">geom::PrecisionModel</a> *&nbsp;</td>
          <td class="paramname"> <em>newPM</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Force computed intersection to be rounded to a given precision model. </p>
<p>No getter is provided, because the precision model is not required to be specified. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>precisionModel</em>&nbsp;</td><td>the PrecisionModel to use for rounding </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="LineIntersector_8h_source.html">LineIntersector.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>