<!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::util::GeometryEditor 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_1geom.html">geom</a> </li> <li><a class="el" href="namespacegeos_1_1geom_1_1util.html">util</a> </li> <li><a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html">geos::geom::util::GeometryEditor</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::geom::util::GeometryEditor Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="geos::geom::util::GeometryEditor" --> <p><code>#include <<a class="el" href="GeometryEditor_8h_source.html">GeometryEditor.h</a>></code></p> <p><a href="classgeos_1_1geom_1_1util_1_1GeometryEditor-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_1geom_1_1util_1_1GeometryEditor.html#a0f3e12e25518b77b92cc0bb6603a7c94">GeometryEditor</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html#a88e258f757d537104942ac3d5a7a8f15">GeometryEditor</a> (const <a class="el" href="classgeos_1_1geom_1_1GeometryFactory.html">GeometryFactory</a> *newFactory)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html#a6ac0f576f73b48b3ac880c008037188c">edit</a> (const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *geometry, <a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditorOperation.html">GeometryEditorOperation</a> *operation)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Supports creating a new <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> which is a modification of an existing one. <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> objects are intended to be treated as immutable. This class allows you to "modify" a <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> by traversing it and creating a new <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> with the same overall structure but possibly modified components.</p> <p>The following kinds of modifications can be made:</p> <ul> <li>the values of the coordinates may be changed. Changing coordinate values may make the result <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> invalid; this is not checked by the <a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html">GeometryEditor</a></li> <li>the coordinate lists may be changed (e.g. by adding or deleting coordinates). The modifed coordinate lists must be consistent with their original parent component (e.g. a <a class="el" href="classgeos_1_1geom_1_1LinearRing.html" title="Models an OGC SFS LinearRing.">LinearRing</a> must always have at least 4 coordinates, and the first and last coordinate must be equal)</li> <li>components of the original geometry may be deleted (e.g. holes may be removed from a <a class="el" href="classgeos_1_1geom_1_1Polygon.html" title="Represents a linear polygon, which may include holes.">Polygon</a>, or LineStrings removed from a <a class="el" href="classgeos_1_1geom_1_1MultiLineString.html" title="Basic implementation of MultiLineString objects.">MultiLineString</a>). Deletions will be propagated up the component tree appropriately.</li> </ul> <p>Note that all changes must be consistent with the original Geometry's structure (e.g. a <a class="el" href="classgeos_1_1geom_1_1Polygon.html" title="Represents a linear polygon, which may include holes.">Polygon</a> cannot be collapsed into a <a class="el" href="classgeos_1_1geom_1_1LineString.html" title="Basic implementation of LineString.">LineString</a>).</p> <p>The resulting <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> is not checked for validity. If validity needs to be enforced, the new Geometry's isValid should be checked.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classgeos_1_1geom_1_1Geometry.html#a1f408a97170af8f26c5e6121e720fc8a" title="Tests the validity of this Geometry.">Geometry::isValid</a> </dd></dl> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a0f3e12e25518b77b92cc0bb6603a7c94"></a><!-- doxytag: member="geos::geom::util::GeometryEditor::GeometryEditor" ref="a0f3e12e25518b77b92cc0bb6603a7c94" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">geos::geom::util::GeometryEditor::GeometryEditor </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new <a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html">GeometryEditor</a> object which will create an edited <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> with the same <a class="el" href="classgeos_1_1geom_1_1GeometryFactory.html" title="Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...">GeometryFactory</a> as the input <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a>. </p> </div> </div> <a class="anchor" id="a88e258f757d537104942ac3d5a7a8f15"></a><!-- doxytag: member="geos::geom::util::GeometryEditor::GeometryEditor" ref="a88e258f757d537104942ac3d5a7a8f15" args="(const GeometryFactory *newFactory)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">geos::geom::util::GeometryEditor::GeometryEditor </td> <td>(</td> <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1GeometryFactory.html">GeometryFactory</a> * </td> <td class="paramname"> <em>newFactory</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new <a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html">GeometryEditor</a> object which will create the edited <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> with the given <a class="el" href="classgeos_1_1geom_1_1GeometryFactory.html" title="Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...">GeometryFactory</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>newFactory</em> </td><td>the <a class="el" href="classgeos_1_1geom_1_1GeometryFactory.html" title="Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...">GeometryFactory</a> to create the edited <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> with </td></tr> </table> </dd> </dl> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a6ac0f576f73b48b3ac880c008037188c"></a><!-- doxytag: member="geos::geom::util::GeometryEditor::edit" ref="a6ac0f576f73b48b3ac880c008037188c" args="(const Geometry *geometry, GeometryEditorOperation *operation)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a>* geos::geom::util::GeometryEditor::edit </td> <td>(</td> <td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> * </td> <td class="paramname"> <em>geometry</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditorOperation.html">GeometryEditorOperation</a> * </td> <td class="paramname"> <em>operation</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Edit the input <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> with the given edit operation. Clients will create subclasses of <a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditorOperation.html">GeometryEditorOperation</a> or <a class="el" href="classgeos_1_1geom_1_1util_1_1CoordinateOperation.html">CoordinateOperation</a> to perform required modifications.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>geometry</em> </td><td>the <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> to edit </td></tr> <tr><td valign="top"></td><td valign="top"><em>operation</em> </td><td>the edit operation to carry out </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>a new <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory.">Geometry</a> which is the result of the editing </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="GeometryEditor_8h_source.html">GeometryEditor.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>