<!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::MinimumDiameter 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 Page</span></a></li> <li><a href="pages.html"><span>Related 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 List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class 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_1MinimumDiameter.html">geos::algorithm::MinimumDiameter</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <h1>geos::algorithm::MinimumDiameter Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="geos::algorithm::MinimumDiameter" --> <p>Computes the minimum diameter of a <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">geom::Geometry</a>. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="MinimumDiameter_8h_source.html">MinimumDiameter.h</a>></code></p> <p><a href="classgeos_1_1algorithm_1_1MinimumDiameter-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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1MinimumDiameter.html#ab3986f0716ce07de04dbd988c16db4b3">MinimumDiameter</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> *newInputGeom)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute a minimum diameter for a giver <a class="el" href="">Geometry</a>. <a href="#ab3986f0716ce07de04dbd988c16db4b3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1MinimumDiameter.html#add67a087e3ee67750f08b26eef52bd6e">MinimumDiameter</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> *newInputGeom, const bool newIsConvex)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute a minimum diameter for a given Geometry, with a hint if the Geometry is convex (e.g. a convex Polygon or LinearRing, or a two-point LineString, or a Point). <a href="#add67a087e3ee67750f08b26eef52bd6e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1MinimumDiameter.html#a8761c629d0aee8f0c45f587ca0898ea3">getLength</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the length of the minimum diameter of the input Geometry. <a href="#a8761c629d0aee8f0c45f587ca0898ea3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1MinimumDiameter.html#a4af8483e68f05d8c3f71372d05c06455">getWidthCoordinate</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> forming one end of the minimum diameter. <a href="#a4af8483e68f05d8c3f71372d05c06455"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1LineString.html">geom::LineString</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1MinimumDiameter.html#aeb618dd4824fff4847e784ba5d67f385">getSupportingSegment</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the segment forming the base of the minimum diameter. <a href="#aeb618dd4824fff4847e784ba5d67f385"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1LineString.html">geom::LineString</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1algorithm_1_1MinimumDiameter.html#affaadbe859f7b2a04eb5ec6c53cf6df9">getDiameter</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets a LineString which is a minimum diameter. <a href="#affaadbe859f7b2a04eb5ec6c53cf6df9"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Computes the minimum diameter of a <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">geom::Geometry</a>. </p> <p>The minimum diameter is defined to be the width of the smallest band that contains the geometry, where a band is a strip of the plane defined by two parallel lines. This can be thought of as the smallest hole that the geometry can be moved through, with a single rotation. </p> <p>The first step in the algorithm is computing the convex hull of the Geometry. If the input Geometry is known to be convex, a hint can be supplied to avoid this computation.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classgeos_1_1algorithm_1_1ConvexHull.html">ConvexHull</a> </dd></dl> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="ab3986f0716ce07de04dbd988c16db4b3"></a><!-- doxytag: member="geos::algorithm::MinimumDiameter::MinimumDiameter" ref="ab3986f0716ce07de04dbd988c16db4b3" args="(const geom::Geometry *newInputGeom)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">geos::algorithm::MinimumDiameter::MinimumDiameter </td> <td>(</td> <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> * </td> <td class="paramname"> <em>newInputGeom</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Compute a minimum diameter for a giver <a class="el" href="">Geometry</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>geom</em> </td><td>a Geometry </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="add67a087e3ee67750f08b26eef52bd6e"></a><!-- doxytag: member="geos::algorithm::MinimumDiameter::MinimumDiameter" ref="add67a087e3ee67750f08b26eef52bd6e" args="(const geom::Geometry *newInputGeom, const bool newIsConvex)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">geos::algorithm::MinimumDiameter::MinimumDiameter </td> <td>(</td> <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> * </td> <td class="paramname"> <em>newInputGeom</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const bool </td> <td class="paramname"> <em>newIsConvex</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Compute a minimum diameter for a given Geometry, with a hint if the Geometry is convex (e.g. a convex Polygon or LinearRing, or a two-point LineString, or a 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>geom</em> </td><td>a Geometry which is convex </td></tr> <tr><td valign="top"></td><td valign="top"><em>isConvex</em> </td><td><code>true</code> if the input geometry is convex </td></tr> </table> </dd> </dl> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="affaadbe859f7b2a04eb5ec6c53cf6df9"></a><!-- doxytag: member="geos::algorithm::MinimumDiameter::getDiameter" ref="affaadbe859f7b2a04eb5ec6c53cf6df9" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classgeos_1_1geom_1_1LineString.html">geom::LineString</a>* geos::algorithm::MinimumDiameter::getDiameter </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Gets a LineString which is a minimum diameter. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>a LineString which is a minimum diameter </dd></dl> </div> </div> <a class="anchor" id="a8761c629d0aee8f0c45f587ca0898ea3"></a><!-- doxytag: member="geos::algorithm::MinimumDiameter::getLength" ref="a8761c629d0aee8f0c45f587ca0898ea3" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">double geos::algorithm::MinimumDiameter::getLength </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the length of the minimum diameter of the input Geometry. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>the length of the minimum diameter </dd></dl> </div> </div> <a class="anchor" id="aeb618dd4824fff4847e784ba5d67f385"></a><!-- doxytag: member="geos::algorithm::MinimumDiameter::getSupportingSegment" ref="aeb618dd4824fff4847e784ba5d67f385" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classgeos_1_1geom_1_1LineString.html">geom::LineString</a>* geos::algorithm::MinimumDiameter::getSupportingSegment </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the segment forming the base of the minimum diameter. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>the segment forming the base of the minimum diameter </dd></dl> </div> </div> <a class="anchor" id="a4af8483e68f05d8c3f71372d05c06455"></a><!-- doxytag: member="geos::algorithm::MinimumDiameter::getWidthCoordinate" ref="a4af8483e68f05d8c3f71372d05c06455" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>* geos::algorithm::MinimumDiameter::getWidthCoordinate </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> forming one end of the minimum diameter. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>a coordinate forming one end of the minimum diameter </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="MinimumDiameter_8h_source.html">MinimumDiameter.h</a></li> </ul> </div> <hr class="footer"/><address class="footer"><small>Generated on Thu Jul 22 2010 for GEOS by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address> </body> </html>