<!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::noding::snapround::SimpleSnapRounder 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_1noding.html">noding</a> </li> <li><a class="el" href="namespacegeos_1_1noding_1_1snapround.html">snapround</a> </li> <li><a class="el" href="classgeos_1_1noding_1_1snapround_1_1SimpleSnapRounder.html">geos::noding::snapround::SimpleSnapRounder</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::noding::snapround::SimpleSnapRounder Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="geos::noding::snapround::SimpleSnapRounder" --><!-- doxytag: inherits="geos::noding::Noder" --> <p>Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of <a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a>s. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="SimpleSnapRounder_8h_source.html">SimpleSnapRounder.h</a>></code></p> <div class="dynheader"> Inheritance diagram for geos::noding::snapround::SimpleSnapRounder:</div> <div class="dyncontent"> <div class="center"> <img src="classgeos_1_1noding_1_1snapround_1_1SimpleSnapRounder.png" usemap="#geos::noding::snapround::SimpleSnapRounder_map" alt=""/> <map id="geos::noding::snapround::SimpleSnapRounder_map" name="geos::noding::snapround::SimpleSnapRounder_map"> <area href="classgeos_1_1noding_1_1Noder.html" alt="geos::noding::Noder" shape="rect" coords="0,0,269,24"/> </map> </div> <p><a href="classgeos_1_1noding_1_1snapround_1_1SimpleSnapRounder-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="a5c02caa6428fc3364a63e1d63719c397"></a><!-- doxytag: member="geos::noding::snapround::SimpleSnapRounder::SimpleSnapRounder" ref="a5c02caa6428fc3364a63e1d63719c397" args="(const geom::PrecisionModel &newPm)" --> </td><td class="memItemRight" valign="bottom"><b>SimpleSnapRounder</b> (const <a class="el" href="classgeos_1_1geom_1_1PrecisionModel.html">geom::PrecisionModel</a> &newPm)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a> * > * </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1noding_1_1snapround_1_1SimpleSnapRounder.html#ac807e2ef1021a770df42f325a9ca30cb">getNodedSubstrings</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a <a class="el" href="">Collection</a> of fully noded <a class="el" href="">SegmentStrings</a>. The SegmentStrings have the same context as their parent. <a href="#ac807e2ef1021a770df42f325a9ca30cb"></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_1noding_1_1snapround_1_1SimpleSnapRounder.html#ad15603312a46172a3de09669c262cb49">computeNodes</a> (std::vector< <a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a> * > *inputSegmentStrings)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the noding for a collection of <a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a>s. <a href="#ad15603312a46172a3de09669c262cb49"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aad926874ec39e08edce2a1982f902860"></a><!-- doxytag: member="geos::noding::snapround::SimpleSnapRounder::add" ref="aad926874ec39e08edce2a1982f902860" args="(const SegmentString *segStr)" --> void </td><td class="memItemRight" valign="bottom"><b>add</b> (const <a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a> *segStr)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1noding_1_1snapround_1_1SimpleSnapRounder.html#ae5dab975fdbaac589e1b3565eeab1ce5">computeVertexSnaps</a> (const std::vector< <a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a> * > &edges)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of <a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a>s. </p> <p>Implements the Snap Rounding technique described in Hobby, Guibas & Marimont, and Goodrich et al. Snap Rounding assumes that all vertices lie on a uniform grid (hence the precision model of the input must be fixed precision, and all the input vertices must be rounded to that precision).</p> <p>This implementation uses simple iteration over the line segments.</p> <p>This implementation appears to be fully robust using an integer precision model. It will function with non-integer precision models, but the results are not 100% guaranteed to be correctly noded. </p> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="ad15603312a46172a3de09669c262cb49"></a><!-- doxytag: member="geos::noding::snapround::SimpleSnapRounder::computeNodes" ref="ad15603312a46172a3de09669c262cb49" args="(std::vector< SegmentString * > *inputSegmentStrings)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void geos::noding::snapround::SimpleSnapRounder::computeNodes </td> <td>(</td> <td class="paramtype">std::vector< <a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a> * > * </td> <td class="paramname"> <em>segStrings</em></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Computes the noding for a collection of <a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a>s. </p> <p>Some Noders may add all these nodes to the input SegmentStrings; others may only add some or none at all.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>segStrings</em> </td><td>a collection of <a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a>s to node </td></tr> </table> </dd> </dl> <p>Implements <a class="el" href="classgeos_1_1noding_1_1Noder.html#a42da20658cf8a969a1cbb15fd2de725d">geos::noding::Noder</a>.</p> </div> </div> <a class="anchor" id="ae5dab975fdbaac589e1b3565eeab1ce5"></a><!-- doxytag: member="geos::noding::snapround::SimpleSnapRounder::computeVertexSnaps" ref="ae5dab975fdbaac589e1b3565eeab1ce5" args="(const std::vector< SegmentString * > &edges)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void geos::noding::snapround::SimpleSnapRounder::computeVertexSnaps </td> <td>(</td> <td class="paramtype">const std::vector< <a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a> * > & </td> <td class="paramname"> <em>edges</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Computes nodes introduced as a result of snapping segments to vertices of other 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>segStrings</em> </td><td>the list of segment strings to snap together. Must be <a class="el" href="classgeos_1_1noding_1_1NodedSegmentString.html" title="Represents a list of contiguous line segments, and supports noding the segments.">NodedSegmentString</a> or an assertion will fail. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="ac807e2ef1021a770df42f325a9ca30cb"></a><!-- doxytag: member="geos::noding::snapround::SimpleSnapRounder::getNodedSubstrings" ref="ac807e2ef1021a770df42f325a9ca30cb" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::vector<<a class="el" href="classgeos_1_1noding_1_1SegmentString.html">SegmentString</a>*>* geos::noding::snapround::SimpleSnapRounder::getNodedSubstrings </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns a <a class="el" href="">Collection</a> of fully noded <a class="el" href="">SegmentStrings</a>. The SegmentStrings have the same context as their parent. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>a newly allocated std::vector of const SegmentStrings. Caller is responsible to delete it </dd></dl> <p>Implements <a class="el" href="classgeos_1_1noding_1_1Noder.html#a47dfe5a95741c2c9809d94f8ba39fa89">geos::noding::Noder</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="SimpleSnapRounder_8h_source.html">SimpleSnapRounder.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>