<!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::operation::polygonize::EdgeRing 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_1operation.html">operation</a> </li> <li><b>polygonize</b> </li> <li><a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html">geos::operation::polygonize::EdgeRing</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> </div> <div class="headertitle"> <h1>geos::operation::polygonize::EdgeRing Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="geos::operation::polygonize::EdgeRing" --> <p>Represents a ring of <a class="el" href="classgeos_1_1operation_1_1polygonize_1_1PolygonizeDirectedEdge.html" title="A DirectedEdge of a PolygonizeGraph, which represents an edge of a polygon formed by the graph...">PolygonizeDirectedEdge</a> which form a ring of a polygon. The ring may be either an outer shell or a hole. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="operation_2polygonize_2EdgeRing_8h_source.html">EdgeRing.h</a>></code></p> <p><a href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing-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="ae542085bd65697424f07ee63a60a114b"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::EdgeRing" ref="ae542085bd65697424f07ee63a60a114b" args="(const geom::GeometryFactory *newFactory)" --> </td><td class="memItemRight" valign="bottom"><b>EdgeRing</b> (const <a class="el" href="classgeos_1_1geom_1_1GeometryFactory.html">geom::GeometryFactory</a> *newFactory)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html#a5a87f4de859d33a601de1750e925896b">add</a> (const <a class="el" href="classgeos_1_1planargraph_1_1DirectedEdge.html">planargraph::DirectedEdge</a> *de)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a DirectedEdge which is known to form part of this ring. <a href="#a5a87f4de859d33a601de1750e925896b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html#a36b24396062f9dfac642fa2f5210a512">isHole</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Tests whether this ring is a hole. <a href="#a36b24396062f9dfac642fa2f5210a512"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html#a6a2afc204c89471a442704fa6cf1875a">addHole</a> (<a class="el" href="classgeos_1_1geom_1_1LinearRing.html">geom::LinearRing</a> *hole)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a hole to the polygon formed by this ring. <a href="#a6a2afc204c89471a442704fa6cf1875a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1Polygon.html">geom::Polygon</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html#a2825ed047fb0e213e7bf066b3dda6840">getPolygon</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the Polygon formed by this ring and any contained holes. <a href="#a2825ed047fb0e213e7bf066b3dda6840"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af9019f754953d4dac0450089764b0431"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::isValid" ref="af9019f754953d4dac0450089764b0431" args="()" --> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html#af9019f754953d4dac0450089764b0431">isValid</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Tests if the LinearRing ring formed by this edge ring is topologically valid. <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_1operation_1_1polygonize_1_1EdgeRing.html#ac09d7de9335d95511f0b3a315682ee31">getLineString</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the coordinates for this ring as a LineString. <a href="#ac09d7de9335d95511f0b3a315682ee31"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1LinearRing.html">geom::LinearRing</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html#af6d0cb97a491fffb2feaf1300224ac2d">getRingInternal</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns this ring as a LinearRing, or null if an Exception occurs while creating it (such as a topology problem). <a href="#af6d0cb97a491fffb2feaf1300224ac2d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1LinearRing.html">geom::LinearRing</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html#a5f59689ae46b9611ad8974753526f060">getRingOwnership</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns this ring as a LinearRing, or null if an Exception occurs while creating it (such as a topology problem). <a href="#a5f59689ae46b9611ad8974753526f060"></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">static <a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html">EdgeRing</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html#a724c498b8aa10f20ec257935dd3161f4">findEdgeRingContaining</a> (<a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html">EdgeRing</a> *testEr, std::vector< <a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html">EdgeRing</a> * > *shellList)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static const <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_1operation_1_1polygonize_1_1EdgeRing.html#ada4a5a5e39f10bf9f9d82bc6e9b974b1">ptNotInList</a> (const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *testPts, const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *pts)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Finds a point in a list of points which is not contained in another list of points. <a href="#ada4a5a5e39f10bf9f9d82bc6e9b974b1"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html#a0c106b5c46736e37dcf99ca3383456cf">isInList</a> (const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> &pt, const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> *pts)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Tests whether a given point is in an array of points. Uses a value-based test. <a href="#a0c106b5c46736e37dcf99ca3383456cf"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Represents a ring of <a class="el" href="classgeos_1_1operation_1_1polygonize_1_1PolygonizeDirectedEdge.html" title="A DirectedEdge of a PolygonizeGraph, which represents an edge of a polygon formed by the graph...">PolygonizeDirectedEdge</a> which form a ring of a polygon. The ring may be either an outer shell or a hole. </p> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a5a87f4de859d33a601de1750e925896b"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::add" ref="a5a87f4de859d33a601de1750e925896b" args="(const planargraph::DirectedEdge *de)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void geos::operation::polygonize::EdgeRing::add </td> <td>(</td> <td class="paramtype">const <a class="el" href="classgeos_1_1planargraph_1_1DirectedEdge.html">planargraph::DirectedEdge</a> * </td> <td class="paramname"> <em>de</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Adds a DirectedEdge which is known to form part of this ring. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>de</em> </td><td>the DirectedEdge to add. Ownership to the caller. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a6a2afc204c89471a442704fa6cf1875a"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::addHole" ref="a6a2afc204c89471a442704fa6cf1875a" args="(geom::LinearRing *hole)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void geos::operation::polygonize::EdgeRing::addHole </td> <td>(</td> <td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1LinearRing.html">geom::LinearRing</a> * </td> <td class="paramname"> <em>hole</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Adds a hole to the polygon formed by this ring. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>hole</em> </td><td>the LinearRing forming the hole. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a724c498b8aa10f20ec257935dd3161f4"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::findEdgeRingContaining" ref="a724c498b8aa10f20ec257935dd3161f4" args="(EdgeRing *testEr, std::vector< EdgeRing * > *shellList)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html">EdgeRing</a>* geos::operation::polygonize::EdgeRing::findEdgeRingContaining </td> <td>(</td> <td class="paramtype"><a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html">EdgeRing</a> * </td> <td class="paramname"> <em>testEr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">std::vector< <a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html">EdgeRing</a> * > * </td> <td class="paramname"> <em>shellList</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Find the innermost enclosing shell <a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html" title="Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...">EdgeRing</a> containing the argument <a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html" title="Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...">EdgeRing</a>, if any. The innermost enclosing ring is the <em>smallest</em> enclosing ring. The algorithm used depends on the fact that:</p> <p>ring A contains ring B iff envelope(ring A) contains envelope(ring B)</p> <p>This routine is only safe to use if the chosen point of the hole is known to be properly contained in a shell (which is guaranteed to be the case if the hole does not touch its shell)</p> <dl class="return"><dt><b>Returns:</b></dt><dd>containing <a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html" title="Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...">EdgeRing</a>, if there is one </dd> <dd> null if no containing <a class="el" href="classgeos_1_1operation_1_1polygonize_1_1EdgeRing.html" title="Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...">EdgeRing</a> is found </dd></dl> </div> </div> <a class="anchor" id="ac09d7de9335d95511f0b3a315682ee31"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::getLineString" ref="ac09d7de9335d95511f0b3a315682ee31" 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::operation::polygonize::EdgeRing::getLineString </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the coordinates for this ring as a LineString. </p> <p>Used to return the coordinates in this ring as a valid geometry, when it has been detected that the ring is topologically invalid. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>a LineString containing the coordinates in this ring </dd></dl> </div> </div> <a class="anchor" id="a2825ed047fb0e213e7bf066b3dda6840"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::getPolygon" ref="a2825ed047fb0e213e7bf066b3dda6840" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classgeos_1_1geom_1_1Polygon.html">geom::Polygon</a>* geos::operation::polygonize::EdgeRing::getPolygon </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Computes the Polygon formed by this ring and any contained holes. </p> <p>LinearRings ownership is transferred to returned polygon. Subsequent calls to the function will return NULL.</p> <dl class="return"><dt><b>Returns:</b></dt><dd>the Polygon formed by this ring and its holes. </dd></dl> </div> </div> <a class="anchor" id="af6d0cb97a491fffb2feaf1300224ac2d"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::getRingInternal" ref="af6d0cb97a491fffb2feaf1300224ac2d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classgeos_1_1geom_1_1LinearRing.html">geom::LinearRing</a>* geos::operation::polygonize::EdgeRing::getRingInternal </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Returns this ring as a LinearRing, or null if an Exception occurs while creating it (such as a topology problem). </p> <p>Ownership of ring is retained by the object. Details of problems are written to standard output. </p> </div> </div> <a class="anchor" id="a5f59689ae46b9611ad8974753526f060"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::getRingOwnership" ref="a5f59689ae46b9611ad8974753526f060" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classgeos_1_1geom_1_1LinearRing.html">geom::LinearRing</a>* geos::operation::polygonize::EdgeRing::getRingOwnership </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Returns this ring as a LinearRing, or null if an Exception occurs while creating it (such as a topology problem). </p> <p>Details of problems are written to standard output. Caller gets ownership of ring. </p> </div> </div> <a class="anchor" id="a36b24396062f9dfac642fa2f5210a512"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::isHole" ref="a36b24396062f9dfac642fa2f5210a512" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool geos::operation::polygonize::EdgeRing::isHole </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Tests whether this ring is a hole. </p> <p>Due to the way the edges in the polyongization graph are linked, a ring is a hole if it is oriented counter-clockwise. </p> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if this ring is a hole </dd></dl> </div> </div> <a class="anchor" id="a0c106b5c46736e37dcf99ca3383456cf"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::isInList" ref="a0c106b5c46736e37dcf99ca3383456cf" args="(const geom::Coordinate &pt, const geom::CoordinateSequence *pts)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static bool geos::operation::polygonize::EdgeRing::isInList </td> <td>(</td> <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a> & </td> <td class="paramname"> <em>pt</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> * </td> <td class="paramname"> <em>pts</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Tests whether a given point is in an array of points. Uses a value-based test. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pt</em> </td><td>a Coordinate for the test point </td></tr> <tr><td valign="top"></td><td valign="top"><em>pts</em> </td><td>an array of Coordinate to test </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the point is in the array </dd></dl> </div> </div> <a class="anchor" id="ada4a5a5e39f10bf9f9d82bc6e9b974b1"></a><!-- doxytag: member="geos::operation::polygonize::EdgeRing::ptNotInList" ref="ada4a5a5e39f10bf9f9d82bc6e9b974b1" args="(const geom::CoordinateSequence *testPts, const geom::CoordinateSequence *pts)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static const <a class="el" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>& geos::operation::polygonize::EdgeRing::ptNotInList </td> <td>(</td> <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1CoordinateSequence.html">geom::CoordinateSequence</a> * </td> <td class="paramname"> <em>testPts</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> * </td> <td class="paramname"> <em>pts</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Finds a point in a list of points which is not contained in another list of points. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>testPts</em> </td><td>the CoordinateSequence to test </td></tr> <tr><td valign="top"></td><td valign="top"><em>pts</em> </td><td>the CoordinateSequence to test the input points against </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>a Coordinate reference from <code>testPts</code> which is not in <code>pts</code>, or <code>Coordinate::nullCoord</code> </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="operation_2polygonize_2EdgeRing_8h_source.html">operation/polygonize/EdgeRing.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>