Sophie

Sophie

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

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::geom::LineSegment 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_1geom.html">geom</a>      </li>
      <li><a class="el" href="classgeos_1_1geom_1_1LineSegment.html">geos::geom::LineSegment</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<h1>geos::geom::LineSegment Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="geos::geom::LineSegment" -->
<p><code>#include &lt;<a class="el" href="LineSegment_8h_source.html">LineSegment.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for geos::geom::LineSegment:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classgeos_1_1geom_1_1LineSegment.png" usemap="#geos::geom::LineSegment_map" alt=""/>
  <map id="geos::geom::LineSegment_map" name="geos::geom::LineSegment_map">
<area href="classgeos_1_1simplify_1_1TaggedLineSegment.html" alt="geos::simplify::TaggedLineSegment" shape="rect" coords="0,56,207,80"/>
</map>
</div>

<p><a href="classgeos_1_1geom_1_1LineSegment-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="aaa9cfa92a785030d1357a31d9b510dad"></a><!-- doxytag: member="geos::geom::LineSegment::LineSegment" ref="aaa9cfa92a785030d1357a31d9b510dad" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#aaa9cfa92a785030d1357a31d9b510dad">LineSegment</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Segemnt end. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa099bcbbf18504d135bced07df1b46fc"></a><!-- doxytag: member="geos::geom::LineSegment::LineSegment" ref="aa099bcbbf18504d135bced07df1b46fc" args="(const LineSegment &amp;ls)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>LineSegment</b> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;ls)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a105348291a24edfce16b8fa243793fb4"></a><!-- doxytag: member="geos::geom::LineSegment::LineSegment" ref="a105348291a24edfce16b8fa243793fb4" args="(const Coordinate &amp;c0, const Coordinate &amp;c1)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#a105348291a24edfce16b8fa243793fb4">LineSegment</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;c0, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;c1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> with the given start and end Coordinates. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2ff6b0bb555727c6bd9e7e97c637ccb"></a><!-- doxytag: member="geos::geom::LineSegment::LineSegment" ref="ad2ff6b0bb555727c6bd9e7e97c637ccb" args="(double x0, double y0, double x1, double y1)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><b>LineSegment</b> (double x0, double y0, double x1, double y1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9935eb41cd0e137612d8f0728f5e28b"></a><!-- doxytag: member="geos::geom::LineSegment::setCoordinates" ref="ab9935eb41cd0e137612d8f0728f5e28b" args="(const Coordinate &amp;c0, const Coordinate &amp;c1)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>setCoordinates</b> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;c0, const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;c1)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5076e5e34040d86e52911db03e1e0182"></a><!-- doxytag: member="geos::geom::LineSegment::operator[]" ref="a5076e5e34040d86e52911db03e1e0182" args="(size_t i) const " -->
const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (size_t i) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad55e79a1c0915e8608386f91f9442530"></a><!-- doxytag: member="geos::geom::LineSegment::operator[]" ref="ad55e79a1c0915e8608386f91f9442530" args="(size_t i)" -->
<a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>operator[]</b> (size_t i)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa8192c84e07aa76f514b37627fa98fba"></a><!-- doxytag: member="geos::geom::LineSegment::setCoordinates" ref="aa8192c84e07aa76f514b37627fa98fba" args="(const LineSegment &amp;ls)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><b>setCoordinates</b> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;ls)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1fe66eb4b8536e7ec078fa7e1942d78d"></a><!-- doxytag: member="geos::geom::LineSegment::getLength" ref="a1fe66eb4b8536e7ec078fa7e1942d78d" args="() const " -->
double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#a1fe66eb4b8536e7ec078fa7e1942d78d">getLength</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the length of the line segment. <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_1geom_1_1LineSegment.html#a8391aa2103c0116e38e9dc7b1e28f36e">isHorizontal</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests whether the segment is horizontal.  <a href="#a8391aa2103c0116e38e9dc7b1e28f36e"></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_1geom_1_1LineSegment.html#a3a0e0267d47cfa11c26ea338febe3b4c">isVertical</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests whether the segment is vertical.  <a href="#a3a0e0267d47cfa11c26ea338febe3b4c"></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_1geom_1_1LineSegment.html#a716d81e2e4b4cc445f4972e1515ced3a">orientationIndex</a> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;seg) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac66881f2ff1268940d892a79a03eee92"></a><!-- doxytag: member="geos::geom::LineSegment::orientationIndex" ref="ac66881f2ff1268940d892a79a03eee92" args="(const LineSegment *seg) const " -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><b>orientationIndex</b> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> *seg) 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_1geom_1_1LineSegment.html#a7eb5055c4a37d5a9f4a2a86f1af18363">orientationIndex</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;p) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines the orientation index of a <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> relative to this segment.  <a href="#a7eb5055c4a37d5a9f4a2a86f1af18363"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6d69f6d61ad2dbe03eafae4e73a23116"></a><!-- doxytag: member="geos::geom::LineSegment::reverse" ref="a6d69f6d61ad2dbe03eafae4e73a23116" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#a6d69f6d61ad2dbe03eafae4e73a23116">reverse</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reverses the direction of the line segment. <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_1geom_1_1LineSegment.html#a80f3d6aab7d8a3e527833731194f7b72">normalize</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Puts the line segment into a normalized form.  <a href="#a80f3d6aab7d8a3e527833731194f7b72"></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_1geom_1_1LineSegment.html#a55f97e764496162bdcb2c15e9042c3b0">angle</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#a90f621b439f8c48c424568477e53d9ad">midPoint</a> (<a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;ret) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the midpoint of the segment.  <a href="#a90f621b439f8c48c424568477e53d9ad"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21859b2efae5bf0c6718cb69c36bd64f"></a><!-- doxytag: member="geos::geom::LineSegment::distance" ref="a21859b2efae5bf0c6718cb69c36bd64f" args="(const LineSegment &amp;ls) const " -->
double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#a21859b2efae5bf0c6718cb69c36bd64f">distance</a> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;ls) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the distance between this line segment and another one. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a81d6bfa59368dca81ee820b250b6653f"></a><!-- doxytag: member="geos::geom::LineSegment::distance" ref="a81d6bfa59368dca81ee820b250b6653f" args="(const Coordinate &amp;p) const " -->
double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#a81d6bfa59368dca81ee820b250b6653f">distance</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;p) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the distance between this line segment and a point. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a47e38e1b78e9dadaff5a8cf039be2b15"></a><!-- doxytag: member="geos::geom::LineSegment::distancePerpendicular" ref="a47e38e1b78e9dadaff5a8cf039be2b15" args="(const Coordinate &amp;p) const " -->
double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#a47e38e1b78e9dadaff5a8cf039be2b15">distancePerpendicular</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;p) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the perpendicular distance between the (infinite) line defined by this line segment and a point. <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_1geom_1_1LineSegment.html#a8756a769e85cf820f66044987f504848">pointAlong</a> (double segmentLengthFraction, <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;ret) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> that lies a given fraction along the line defined by this segment.  <a href="#a8756a769e85cf820f66044987f504848"></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_1geom_1_1LineSegment.html#ab3444614a2f2e056aec36d360dec264b">pointAlongOffset</a> (double segmentLengthFraction, double offsetDistance, <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;ret) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> that lies a given fraction along the line defined by this segment and offset from the segment by a given distance.  <a href="#ab3444614a2f2e056aec36d360dec264b"></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_1geom_1_1LineSegment.html#a40296de9666ba70e56873a3bc19293da">projectionFactor</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;p) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute the projection factor for the projection of the point p onto this <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a>.  <a href="#a40296de9666ba70e56873a3bc19293da"></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_1geom_1_1LineSegment.html#ada37d3025cb4a1ccd40405f8c14fc0bb">segmentFraction</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;inputPt) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the fraction of distance (in <code>[0.0, 1.0]</code>) that the projection of a point occurs along this line segment.  <a href="#ada37d3025cb4a1ccd40405f8c14fc0bb"></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_1geom_1_1LineSegment.html#ad4468ac21831e174364a8b9b022b4057">project</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;p, <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;ret) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute the projection of a point onto the line determined by this line segment.  <a href="#ad4468ac21831e174364a8b9b022b4057"></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_1geom_1_1LineSegment.html#a33bb21b64638ca65f54cb2f7ddf8deec">project</a> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;seg, <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;ret) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Project a line segment onto this line segment and return the resulting line segment.  <a href="#a33bb21b64638ca65f54cb2f7ddf8deec"></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_1geom_1_1LineSegment.html#a32476249bd06932a852b00e335757a5d">closestPoint</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;p, <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;ret) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the closest point on this line segment to another point.  <a href="#a32476249bd06932a852b00e335757a5d"></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_1geom_1_1LineSegment.html#a5b96fff51bec598be67c1a0add93263e">compareTo</a> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compares this object with the specified object for order.  <a href="#a5b96fff51bec598be67c1a0add93263e"></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_1geom_1_1LineSegment.html#a4f8d76d0fafccf247b69953aab3896a0">equalsTopo</a> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns <code>true</code> if <code>other</code> is topologically equal to this <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> (e.g. irrespective of orientation).  <a href="#a4f8d76d0fafccf247b69953aab3896a0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">CoordinateSequence</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#a6d4aad85abd1878636304ee12631e26f">closestPoints</a> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;line)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af5045a497a2e11275451e30e27bf846a"></a><!-- doxytag: member="geos::geom::LineSegment::closestPoints" ref="af5045a497a2e11275451e30e27bf846a" args="(const LineSegment *line)" -->
<a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">CoordinateSequence</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>closestPoints</b> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> *line)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#a583161deb5df2e8ce1b834b16f12db70">intersection</a> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;line, <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;coord) 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_1geom_1_1LineSegment.html#a8b0caff76881fa12bf090fa5395b1ef3">lineIntersection</a> (const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;line, <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;coord) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Computes the intersection point of the lines defined by two segments, if there is one.  <a href="#a8b0caff76881fa12bf090fa5395b1ef3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::auto_ptr&lt; <a class="el" href="classgeos_1_1geom_1_1LineString.html">LineString</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#af604255267dca77a0de917f84b1f8c34">toGeometry</a> (const <a class="el" href="classgeos_1_1geom_1_1GeometryFactory.html">GeometryFactory</a> &amp;gf) const </td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac3286355f41210086e4eab4498b46ba9"></a><!-- doxytag: member="geos::geom::LineSegment::p0" ref="ac3286355f41210086e4eab4498b46ba9" args="" -->
<a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>p0</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9382e49d86a10de5d5be69560824d900"></a><!-- doxytag: member="geos::geom::LineSegment::p1" ref="a9382e49d86a10de5d5be69560824d900" args="" -->
<a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html#a9382e49d86a10de5d5be69560824d900">p1</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Segment start. <br/></td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad7f0e1ac0c774fca24372d1181e5748f"></a><!-- doxytag: member="geos::geom::LineSegment::operator&lt;&lt;" ref="ad7f0e1ac0c774fca24372d1181e5748f" args="(std::ostream &amp;o, const LineSegment &amp;l)" -->
std::ostream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>operator&lt;&lt;</b> (std::ostream &amp;o, const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;l)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Represents a line segment defined by two <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a>. Provides methods to compute various geometric properties and relationships of line segments.</p>
<p>This class is designed to be easily mutable (to the extent of having its contained points public). This supports a common pattern of reusing a single <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> object as a way of computing segment properties on the segments defined by arrays or lists of <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a>s.</p>
<p>TODO: have this class keep pointers rather then real Coordinates ? </p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a55f97e764496162bdcb2c15e9042c3b0"></a><!-- doxytag: member="geos::geom::LineSegment::angle" ref="a55f97e764496162bdcb2c15e9042c3b0" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double geos::geom::LineSegment::angle </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>the angle this segment makes with the x-axis (in radians) </dd></dl>

</div>
</div>
<a class="anchor" id="a32476249bd06932a852b00e335757a5d"></a><!-- doxytag: member="geos::geom::LineSegment::closestPoint" ref="a32476249bd06932a852b00e335757a5d" args="(const Coordinate &amp;p, Coordinate &amp;ret) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void geos::geom::LineSegment::closestPoint </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ret</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 closest point on this line segment to another 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>p</em>&nbsp;</td><td>the point to find the closest point to </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ret</em>&nbsp;</td><td>the <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> to which the closest point on the line segment to the point p will be written </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6d4aad85abd1878636304ee12631e26f"></a><!-- doxytag: member="geos::geom::LineSegment::closestPoints" ref="a6d4aad85abd1878636304ee12631e26f" args="(const LineSegment &amp;line)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">CoordinateSequence</a>* geos::geom::LineSegment::closestPoints </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>line</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Computes the closest points on two line segments. </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 find the closest point to </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a pair of Coordinates which are the closest points on the line segments. The returned <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html" title="The internal representation of a list of coordinates inside a Geometry.">CoordinateSequence</a> must be deleted by caller </dd></dl>

</div>
</div>
<a class="anchor" id="a5b96fff51bec598be67c1a0add93263e"></a><!-- doxytag: member="geos::geom::LineSegment::compareTo" ref="a5b96fff51bec598be67c1a0add93263e" args="(const LineSegment &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int geos::geom::LineSegment::compareTo </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compares this object with the specified object for order. </p>
<p>Uses the standard lexicographic ordering for the points in the <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>o</em>&nbsp;</td><td>the <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> with which this <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> is being compared </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a negative integer, zero, or a positive integer as this <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> is less than, equal to, or greater than the specified <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a4f8d76d0fafccf247b69953aab3896a0"></a><!-- doxytag: member="geos::geom::LineSegment::equalsTopo" ref="a4f8d76d0fafccf247b69953aab3896a0" args="(const LineSegment &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::geom::LineSegment::equalsTopo </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns <code>true</code> if <code>other</code> is topologically equal to this <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> (e.g. irrespective of orientation). </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>a <code><a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a></code> with which to do the comparison. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if other is a <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> with the same values for the x and y ordinates. </dd></dl>

</div>
</div>
<a class="anchor" id="a583161deb5df2e8ce1b834b16f12db70"></a><!-- doxytag: member="geos::geom::LineSegment::intersection" ref="a583161deb5df2e8ce1b834b16f12db70" args="(const LineSegment &amp;line, Coordinate &amp;coord) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::geom::LineSegment::intersection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>line</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>coord</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 an intersection point between two segments, if there is one. There may be 0, 1 or many intersection points between two segments. If there are 0, null is returned. If there is 1 or more, a single one is returned (chosen at the discretion of the algorithm). If more information is required about the details of the intersection, the LineIntersector class should be used.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>line</em>&nbsp;</td><td></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>coord</em>&nbsp;</td><td>the <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> to write the result into </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if an intersection was found, false otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="a8391aa2103c0116e38e9dc7b1e28f36e"></a><!-- doxytag: member="geos::geom::LineSegment::isHorizontal" ref="a8391aa2103c0116e38e9dc7b1e28f36e" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::geom::LineSegment::isHorizontal </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tests whether the segment is horizontal. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the segment is horizontal </dd></dl>

</div>
</div>
<a class="anchor" id="a3a0e0267d47cfa11c26ea338febe3b4c"></a><!-- doxytag: member="geos::geom::LineSegment::isVertical" ref="a3a0e0267d47cfa11c26ea338febe3b4c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::geom::LineSegment::isVertical </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tests whether the segment is vertical. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the segment is vertical </dd></dl>

</div>
</div>
<a class="anchor" id="a8b0caff76881fa12bf090fa5395b1ef3"></a><!-- doxytag: member="geos::geom::LineSegment::lineIntersection" ref="a8b0caff76881fa12bf090fa5395b1ef3" args="(const LineSegment &amp;line, Coordinate &amp;coord) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::geom::LineSegment::lineIntersection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>line</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>coord</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 intersection point of the lines defined by two segments, if there is one. </p>
<p>There may be 0, 1 or an infinite number of intersection points between two lines. If there is a unique intersection point, it is returned. Otherwise, <code>null</code> is returned. If more information is required about the details of the intersection, the algorithms::LineIntersector class should be used.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>line</em>&nbsp;</td><td>a line segment defining a straight line </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ret</em>&nbsp;</td><td>will be set to the intersection point (if any) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if an intersection was found, false otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="a90f621b439f8c48c424568477e53d9ad"></a><!-- doxytag: member="geos::geom::LineSegment::midPoint" ref="a90f621b439f8c48c424568477e53d9ad" args="(Coordinate &amp;ret) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void geos::geom::LineSegment::midPoint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ret</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes the midpoint of the 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>ret</em>&nbsp;</td><td>will be set to the midpoint of the segment </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a80f3d6aab7d8a3e527833731194f7b72"></a><!-- doxytag: member="geos::geom::LineSegment::normalize" ref="a80f3d6aab7d8a3e527833731194f7b72" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void geos::geom::LineSegment::normalize </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Puts the line segment into a normalized form. </p>
<p>This is useful for using line segments in maps and indexes when topological equality rather than exact equality is desired. </p>

</div>
</div>
<a class="anchor" id="a716d81e2e4b4cc445f4972e1515ced3a"></a><!-- doxytag: member="geos::geom::LineSegment::orientationIndex" ref="a716d81e2e4b4cc445f4972e1515ced3a" args="(const LineSegment &amp;seg) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int geos::geom::LineSegment::orientationIndex </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>seg</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Determines the orientation of a <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> relative to this segment. The concept of orientation is specified as follows: Given two line segments A and L, &lt;ul A is to the left of a segment L if A lies wholly in the closed half-plane lying to the left of L A is to the right of a segment L if A lies wholly in the closed half-plane lying to the right of L otherwise, A has indeterminate orientation relative to L. This happens if A is collinear with L or if A crosses the line determined by L. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>seg</em>&nbsp;</td><td>the <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> to compare</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 if seg is to the left of this segment </dd>
<dd>
-1 if seg is to the right of this segment </dd>
<dd>
0 if seg has indeterminate orientation relative to this segment </dd></dl>

</div>
</div>
<a class="anchor" id="a7eb5055c4a37d5a9f4a2a86f1af18363"></a><!-- doxytag: member="geos::geom::LineSegment::orientationIndex" ref="a7eb5055c4a37d5a9f4a2a86f1af18363" args="(const Coordinate &amp;p) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int geos::geom::LineSegment::orientationIndex </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Determines the orientation index of a <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> relative to this segment. </p>
<p>The orientation index is as defined in CGAlgorithms::computeOrientation.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>seg</em>&nbsp;</td><td>the <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> to compare</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 if <code>p</code> is to the left of this segment </dd>
<dd>
-1 if <code>p</code> is to the right of this segment </dd>
<dd>
0 if <code>p</code> is collinear with this segment</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>CGAlgorithms::computeOrientation(<a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a>, <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a>, <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a>) </dd></dl>

</div>
</div>
<a class="anchor" id="a8756a769e85cf820f66044987f504848"></a><!-- doxytag: member="geos::geom::LineSegment::pointAlong" ref="a8756a769e85cf820f66044987f504848" args="(double segmentLengthFraction, Coordinate &amp;ret) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void geos::geom::LineSegment::pointAlong </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>segmentLengthFraction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ret</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 <a class="el" href="classgeos_1_1geom_1_1Coordinate.html" title="Coordinate is the lightweight class used to store coordinates.">Coordinate</a> that lies a given fraction along the line defined by this segment. </p>
<p>A fraction of <code>0.0</code> returns the start point of the segment; a fraction of <code>1.0</code> returns the end point of the segment. If the fraction is &lt; 0.0 or &gt; 1.0 the point returned will lie before the start or beyond the end of the 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>segmentLengthFraction</em>&nbsp;</td><td>the fraction of the segment length along the line </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ret</em>&nbsp;</td><td>will be set to the point at that distance </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab3444614a2f2e056aec36d360dec264b"></a><!-- doxytag: member="geos::geom::LineSegment::pointAlongOffset" ref="ab3444614a2f2e056aec36d360dec264b" args="(double segmentLengthFraction, double offsetDistance, Coordinate &amp;ret) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void geos::geom::LineSegment::pointAlongOffset </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>segmentLengthFraction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>offsetDistance</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ret</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 <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> that lies a given fraction along the line defined by this segment and offset from the segment by a given distance. </p>
<p>A fraction of <code>0.0</code> offsets from the start point of the segment; a fraction of <code>1.0</code> offsets from the end point of the segment.</p>
<p>The computed point is offset to the left of the line if the offset distance is positive, to the right if negative.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>segmentLengthFraction</em>&nbsp;</td><td>the fraction of the segment length along the line</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offsetDistance</em>&nbsp;</td><td>the distance the point is offset from the segment (positive is to the left, negative is to the right)</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ret</em>&nbsp;</td><td>will be set to the point at that distance and offset </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad4468ac21831e174364a8b9b022b4057"></a><!-- doxytag: member="geos::geom::LineSegment::project" ref="ad4468ac21831e174364a8b9b022b4057" args="(const Coordinate &amp;p, Coordinate &amp;ret) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void geos::geom::LineSegment::project </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ret</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>Compute the projection of a point onto the line determined by this line segment. </p>
<p>Note that the projected point may lie outside the line segment. If this is the case, the projection factor will lie outside the range [0.0, 1.0]. </p>

</div>
</div>
<a class="anchor" id="a33bb21b64638ca65f54cb2f7ddf8deec"></a><!-- doxytag: member="geos::geom::LineSegment::project" ref="a33bb21b64638ca65f54cb2f7ddf8deec" args="(const LineSegment &amp;seg, LineSegment &amp;ret) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool geos::geom::LineSegment::project </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>seg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ret</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>Project a line segment onto this line segment and return the resulting line segment. </p>
<p>The returned line segment will be a subset of the target line line segment. This subset may be null, if the segments are oriented in such a way that there is no projection.</p>
<p>Note that the returned line may have zero length (i.e. the same endpoints). This can happen for instance if the lines are perpendicular to one another.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>seg</em>&nbsp;</td><td>the line segment to project </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ret</em>&nbsp;</td><td>the projected line segment </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if there is an overlap, false otherwise </dd></dl>

</div>
</div>
<a class="anchor" id="a40296de9666ba70e56873a3bc19293da"></a><!-- doxytag: member="geos::geom::LineSegment::projectionFactor" ref="a40296de9666ba70e56873a3bc19293da" args="(const Coordinate &amp;p) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double geos::geom::LineSegment::projectionFactor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>p</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compute the projection factor for the projection of the point p onto this <a class="el" href="classgeos_1_1geom_1_1LineSegment.html">LineSegment</a>. </p>
<p>The projection factor is the constant r by which the vector for this segment must be multiplied to equal the vector for the projection of p on the line defined by this segment.</p>
<p>The projection factor returned will be in the range (-inf, +inf)</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 factor for</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the projection factor for the point </dd></dl>

</div>
</div>
<a class="anchor" id="ada37d3025cb4a1ccd40405f8c14fc0bb"></a><!-- doxytag: member="geos::geom::LineSegment::segmentFraction" ref="ada37d3025cb4a1ccd40405f8c14fc0bb" args="(const Coordinate &amp;inputPt) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double geos::geom::LineSegment::segmentFraction </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">Coordinate</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>inputPt</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Computes the fraction of distance (in <code>[0.0, 1.0]</code>) that the projection of a point occurs along this line segment. </p>
<p>If the point is beyond either ends of the line segment, the closest fractional value (<code>0.0</code> or <code>1.0</code>) is returned.</p>
<p>Essentially, this is the <a class="el" href="classgeos_1_1geom_1_1LineSegment.html#a40296de9666ba70e56873a3bc19293da">projectionFactor</a> clamped to the range <code>[0.0, 1.0]</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>inputPt</em>&nbsp;</td><td>the point </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the fraction along the line segment the projection of the point occurs </dd></dl>

</div>
</div>
<a class="anchor" id="af604255267dca77a0de917f84b1f8c34"></a><!-- doxytag: member="geos::geom::LineSegment::toGeometry" ref="af604255267dca77a0de917f84b1f8c34" args="(const GeometryFactory &amp;gf) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::auto_ptr&lt;<a class="el" href="classgeos_1_1geom_1_1LineString.html">LineString</a>&gt; geos::geom::LineSegment::toGeometry </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1GeometryFactory.html">GeometryFactory</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>gf</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a <a class="el" href="classgeos_1_1geom_1_1LineString.html" title="Basic implementation of LineString.">LineString</a> with the same coordinates as this 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>gf</em>&nbsp;</td><td>the geometery factory to use </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a <a class="el" href="classgeos_1_1geom_1_1LineString.html" title="Basic implementation of LineString.">LineString</a> with the same geometry as this segment </dd></dl>

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