Sophie

Sophie

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

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::RayCrossingCounter 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_1RayCrossingCounter.html">geos::algorithm::RayCrossingCounter</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<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::RayCrossingCounter Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="geos::algorithm::RayCrossingCounter" -->
<p>Counts the number of segments crossed by a horizontal ray extending to the right from a given point, in an incremental fashion.  
<a href="#_details">More...</a></p>

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

<p><a href="classgeos_1_1algorithm_1_1RayCrossingCounter-members.html">List of all members.</a></p>
<table class="memberdecls">
<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="a3e9bfc20a94a21c1a12f19cad62e34ca"></a><!-- doxytag: member="geos::algorithm::RayCrossingCounter::RayCrossingCounter" ref="a3e9bfc20a94a21c1a12f19cad62e34ca" args="(const geom::Coordinate &amp;point)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>RayCrossingCounter</b> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &amp;point)</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_1RayCrossingCounter.html#ac6141964164d1f11d5358f367f0323a8">countSegment</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)</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_1RayCrossingCounter.html#aa1a0b63601c69e817aa262617667a41b">isOnSegment</a> ()</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_1RayCrossingCounter.html#a464a75933dd4d4142fb5382fc57ba21e">getLocation</a> ()</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_1RayCrossingCounter.html#ac83a02448d715c95644c13a03c7b5532">isPointInPolygon</a> ()</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 int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1RayCrossingCounter.html#a7ca13054217a0080cf226bd374a26f08">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="memItemLeft" align="right" valign="top"><a class="anchor" id="afe295df2dab9c3d95e5984296816efbe"></a><!-- doxytag: member="geos::algorithm::RayCrossingCounter::locatePointInRing" ref="afe295df2dab9c3d95e5984296816efbe" 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_1RayCrossingCounter.html#afe295df2dab9c3d95e5984296816efbe">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">Semantically equal to the above, just different args encoding. <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Counts the number of segments crossed by a horizontal ray extending to the right from a given point, in an incremental fashion. </p>
<p>This can be used to determine whether a point lies in a <a class="el" href="">Polygonal</a> geometry. The class determines the situation where the point lies exactly on a segment. When being used for Point-In-Polygon determination, this case allows short-circuiting the evaluation.</p>
<p>This class handles polygonal geometries with any number of shells and holes. The orientation of the shell and hole rings is unimportant. In order to compute a correct location for a given polygonal geometry, it is essential that <b>all</b> segments are counted which </p>
<ul>
<li>
touch the ray </li>
<li>
lie in in any ring which may contain the point </li>
</ul>
<p>The only exception is when the point-on-segment situation is detected, in which case no further processing is required. The implication of the above rule is that segments which can be a priori determined to <em>not</em> touch the ray (i.e. by a test of their bounding box or Y-extent) do not need to be counted. This allows for optimization by indexing.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Martin Davis </dd></dl>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac6141964164d1f11d5358f367f0323a8"></a><!-- doxytag: member="geos::algorithm::RayCrossingCounter::countSegment" ref="ac6141964164d1f11d5358f367f0323a8" args="(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::RayCrossingCounter::countSegment </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>Counts a 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>p1</em>&nbsp;</td><td>an endpoint of the segment </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>p2</em>&nbsp;</td><td>another endpoint of the segment </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a464a75933dd4d4142fb5382fc57ba21e"></a><!-- doxytag: member="geos::algorithm::RayCrossingCounter::getLocation" ref="a464a75933dd4d4142fb5382fc57ba21e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int geos::algorithm::RayCrossingCounter::getLocation </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gets the <a class="el" href="">Location</a> of the point relative to the ring, polygon or multipolygon from which the processed segments were provided. </p>
<p>This method only determines the correct location if <b>all</b> relevant segments must have been processed.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the Location of the point </dd></dl>

</div>
</div>
<a class="anchor" id="aa1a0b63601c69e817aa262617667a41b"></a><!-- doxytag: member="geos::algorithm::RayCrossingCounter::isOnSegment" ref="aa1a0b63601c69e817aa262617667a41b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::algorithm::RayCrossingCounter::isOnSegment </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Reports whether the point lies exactly on one of the supplied segments. This method may be called at any time as segments are processed. If the result of this method is <code>true</code>, no further segments need be supplied, since the result will never change again.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the point lies exactly on a segment </dd></dl>

</div>
</div>
<a class="anchor" id="ac83a02448d715c95644c13a03c7b5532"></a><!-- doxytag: member="geos::algorithm::RayCrossingCounter::isPointInPolygon" ref="ac83a02448d715c95644c13a03c7b5532" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::algorithm::RayCrossingCounter::isPointInPolygon </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Tests whether the point lies in or on the ring, polygon or multipolygon from which the processed segments were provided. </p>
<p>This method only determines the correct location if <b>all</b> relevant segments must have been processed.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the point lies in or on the supplied polygon </dd></dl>

</div>
</div>
<a class="anchor" id="a7ca13054217a0080cf226bd374a26f08"></a><!-- doxytag: member="geos::algorithm::RayCrossingCounter::locatePointInRing" ref="a7ca13054217a0080cf226bd374a26f08" 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::RayCrossingCounter::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 the <a class="el" href="">Location</a> of a point in a ring. This method is an exemplar of how to use this class.</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 test </td></tr>
    <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>the location of the point in the ring </dd></dl>

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