<!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::overlay::snap::GeometrySnapper 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><a class="el" href="namespacegeos_1_1operation_1_1overlay.html">overlay</a> </li> <li><b>snap</b> </li> <li><a class="el" href="classgeos_1_1operation_1_1overlay_1_1snap_1_1GeometrySnapper.html">geos::operation::overlay::snap::GeometrySnapper</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-types">Public Types</a> | <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::overlay::snap::GeometrySnapper Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="geos::operation::overlay::snap::GeometrySnapper" --> <p>Snaps the vertices and segments of a geometry to another's vertices. Should improve robustness for overlay operations. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="GeometrySnapper_8h_source.html">GeometrySnapper.h</a>></code></p> <p><a href="classgeos_1_1operation_1_1overlay_1_1snap_1_1GeometrySnapper-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-types"></a> Public Types</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3f903c7389458e51a59f82ebc1bfcdd4"></a><!-- doxytag: member="geos::operation::overlay::snap::GeometrySnapper::GeomPtr" ref="a3f903c7389458e51a59f82ebc1bfcdd4" args="" --> typedef std::auto_ptr<br class="typebreak"/> < <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> > </td><td class="memItemRight" valign="bottom"><b>GeomPtr</b></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af191ca85539cbe847e0dd0a0331ba574"></a><!-- doxytag: member="geos::operation::overlay::snap::GeometrySnapper::GeomPtrPair" ref="af191ca85539cbe847e0dd0a0331ba574" args="" --> typedef std::pair< GeomPtr, <br class="typebreak"/> GeomPtr > </td><td class="memItemRight" valign="bottom"><b>GeomPtrPair</b></td></tr> <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_1operation_1_1overlay_1_1snap_1_1GeometrySnapper.html#a5df260fee1d8af571aa0e01ff2b3397c">GeometrySnapper</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> &g)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::auto_ptr< <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlay_1_1snap_1_1GeometrySnapper.html#afd51fb00323a61cdc152b73cff518c56">snapTo</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> &g, double snapTolerance)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Snaps the vertices in the component <a class="el" href="">LineString</a>s of the source geometry to the vertices of the given snap geometry with a given snap tolerance. <a href="#afd51fb00323a61cdc152b73cff518c56"></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 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlay_1_1snap_1_1GeometrySnapper.html#a6156e0ff92aba635bcea82680a8f13eb">snap</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> &g0, const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> &g1, double snapTolerance, GeomPtrPair &ret)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static double </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlay_1_1snap_1_1GeometrySnapper.html#a365c500444f8a70c0c532d56ce3820ce">computeOverlaySnapTolerance</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> &g)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Estimates the snap tolerance for a Geometry, taking into account its precision model. <a href="#a365c500444f8a70c0c532d56ce3820ce"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a49e12e706f753453eda28dcce18ca880"></a><!-- doxytag: member="geos::operation::overlay::snap::GeometrySnapper::computeSizeBasedSnapTolerance" ref="a49e12e706f753453eda28dcce18ca880" args="(const geom::Geometry &g)" --> static double </td><td class="memItemRight" valign="bottom"><b>computeSizeBasedSnapTolerance</b> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> &g)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2a844f3b94d6ca1f698ada0dd1de517d"></a><!-- doxytag: member="geos::operation::overlay::snap::GeometrySnapper::computeOverlaySnapTolerance" ref="a2a844f3b94d6ca1f698ada0dd1de517d" args="(const geom::Geometry &g1, const geom::Geometry &g2)" --> static double </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1operation_1_1overlay_1_1snap_1_1GeometrySnapper.html#a2a844f3b94d6ca1f698ada0dd1de517d">computeOverlaySnapTolerance</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> &g1, const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a> &g2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the snap tolerance based on input geometries;. <br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Snaps the vertices and segments of a geometry to another's vertices. Should improve robustness for overlay operations. </p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a5df260fee1d8af571aa0e01ff2b3397c"></a><!-- doxytag: member="geos::operation::overlay::snap::GeometrySnapper::GeometrySnapper" ref="a5df260fee1d8af571aa0e01ff2b3397c" args="(const geom::Geometry &g)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">geos::operation::overlay::snap::GeometrySnapper::GeometrySnapper </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>g</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new snapper acting on the given geometry</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>g</em> </td><td>the geometry to snap </td></tr> </table> </dd> </dl> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a365c500444f8a70c0c532d56ce3820ce"></a><!-- doxytag: member="geos::operation::overlay::snap::GeometrySnapper::computeOverlaySnapTolerance" ref="a365c500444f8a70c0c532d56ce3820ce" args="(const geom::Geometry &g)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static double geos::operation::overlay::snap::GeometrySnapper::computeOverlaySnapTolerance </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>g</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Estimates the snap tolerance for a Geometry, taking into account its precision model. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>g</em> </td><td>a Geometry </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the estimated snap tolerance </dd></dl> </div> </div> <a class="anchor" id="a6156e0ff92aba635bcea82680a8f13eb"></a><!-- doxytag: member="geos::operation::overlay::snap::GeometrySnapper::snap" ref="a6156e0ff92aba635bcea82680a8f13eb" args="(const geom::Geometry &g0, const geom::Geometry &g1, double snapTolerance, GeomPtrPair &ret)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void geos::operation::overlay::snap::GeometrySnapper::snap </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>g0</em>, </td> </tr> <tr> <td class="paramkey"></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>g1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>snapTolerance</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GeomPtrPair & </td> <td class="paramname"> <em>ret</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>Snaps two geometries together with a given tolerance.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>g0</em> </td><td>a geometry to snap </td></tr> <tr><td valign="top"></td><td valign="top"><em>g1</em> </td><td>a geometry to snap </td></tr> <tr><td valign="top"></td><td valign="top"><em>snapTolerance</em> </td><td>the tolerance to use </td></tr> <tr><td valign="top"></td><td valign="top"><em>ret</em> </td><td>the snapped geometries as a pair of auto_ptrs (output parameter) </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="afd51fb00323a61cdc152b73cff518c56"></a><!-- doxytag: member="geos::operation::overlay::snap::GeometrySnapper::snapTo" ref="afd51fb00323a61cdc152b73cff518c56" args="(const geom::Geometry &g, double snapTolerance)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::auto_ptr<<a class="el" href="classgeos_1_1geom_1_1Geometry.html">geom::Geometry</a>> geos::operation::overlay::snap::GeometrySnapper::snapTo </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>g</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>snapTolerance</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Snaps the vertices in the component <a class="el" href="">LineString</a>s of the source geometry to the vertices of the given snap geometry with a given snap tolerance. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>g</em> </td><td>a geometry to snap the source to </td></tr> <tr><td valign="top"></td><td valign="top"><em>snapTolerance</em> </td><td></td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>a new snapped Geometry </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="GeometrySnapper_8h_source.html">GeometrySnapper.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>