geos_390_docs/classgeos_1_1geom_1_1util_1...

284 lines
19 KiB
HTML

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>GEOS: geos::geom::util::GeometryEditor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">GEOS
&#160;<span id="projectnumber">3.9.1dev</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;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 id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacegeos.html">geos</a></li><li class="navelem"><a class="el" href="namespacegeos_1_1geom.html">geom</a></li><li class="navelem"><a class="el" href="namespacegeos_1_1geom_1_1util.html">util</a></li><li class="navelem"><a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html">GeometryEditor</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classgeos_1_1geom_1_1util_1_1GeometryEditor-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">geos::geom::util::GeometryEditor Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="GeometryEditor_8h_source.html">GeometryEditor.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for geos::geom::util::GeometryEditor:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classgeos_1_1geom_1_1util_1_1GeometryEditor__coll__graph.svg" width="480" height="255"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0f3e12e25518b77b92cc0bb6603a7c94"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html#a0f3e12e25518b77b92cc0bb6603a7c94">GeometryEditor</a> ()</td></tr>
<tr class="separator:a0f3e12e25518b77b92cc0bb6603a7c94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88e258f757d537104942ac3d5a7a8f15"><td class="memItemLeft" align="right" valign="top">&#160;</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 class="separator:a88e258f757d537104942ac3d5a7a8f15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8c727d96428064b1c9b91870dcbc1d4"><td class="memItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html#af8c727d96428064b1c9b91870dcbc1d4">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>
<tr class="separator:af8c727d96428064b1c9b91870dcbc1d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a3cfe389e9f13fdadc45f46c130cc029d"><td class="memItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="classgeos_1_1geom_1_1Polygon.html">Polygon</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html#a3cfe389e9f13fdadc45f46c130cc029d">editPolygon</a> (const <a class="el" href="classgeos_1_1geom_1_1Polygon.html">Polygon</a> *polygon, <a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditorOperation.html">GeometryEditorOperation</a> *operation)</td></tr>
<tr class="separator:a3cfe389e9f13fdadc45f46c130cc029d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78b0a021d71d0f764abaf8cc1babbe6c"><td class="memItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="classgeos_1_1geom_1_1GeometryCollection.html">GeometryCollection</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html#a78b0a021d71d0f764abaf8cc1babbe6c">editGeometryCollection</a> (const <a class="el" href="classgeos_1_1geom_1_1GeometryCollection.html">GeometryCollection</a> *collection, <a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditorOperation.html">GeometryEditorOperation</a> *operation)</td></tr>
<tr class="separator:a78b0a021d71d0f764abaf8cc1babbe6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a31f609b17cbc8f98906e88200327bad3"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classgeos_1_1geom_1_1GeometryFactory.html">GeometryFactory</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgeos_1_1geom_1_1util_1_1GeometryEditor.html#a31f609b17cbc8f98906e88200327bad3">factory</a></td></tr>
<tr class="separator:a31f609b17cbc8f98906e88200327bad3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><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. A LinearRing is a LineString which is both closed and simple...">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="Models a collection of LineStrings. ">MultiLineString</a>). Deletions will be propagated up the component tree appropriately.</li>
</ul>
<p>Note that all changes must be consistent with the original <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory. ">Geometry</a>'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">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 <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory. ">Geometry</a>'s isValid should be checked.</p>
<dl class="section see"><dt>See also</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>
<p>Definition at line <a class="el" href="GeometryEditor_8h_source.html#l00079">79</a> of file <a class="el" href="GeometryEditor_8h_source.html">GeometryEditor.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a0f3e12e25518b77b92cc0bb6603a7c94"></a>
<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>
<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> *&#160;</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 class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">newFactory</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>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="af8c727d96428064b1c9b91870dcbc1d4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::unique_ptr&lt;<a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a>&gt; geos::geom::util::GeometryEditor::edit </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Geometry.html">Geometry</a> *&#160;</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> *&#160;</td>
<td class="paramname"><em>operation</em>&#160;</td>
</tr>
<tr>
<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 class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">geometry</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 class="paramname">operation</td><td>the edit operation to carry out </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</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>
<a class="anchor" id="a78b0a021d71d0f764abaf8cc1babbe6c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::unique_ptr&lt;<a class="el" href="classgeos_1_1geom_1_1GeometryCollection.html">GeometryCollection</a>&gt; geos::geom::util::GeometryEditor::editGeometryCollection </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1GeometryCollection.html">GeometryCollection</a> *&#160;</td>
<td class="paramname"><em>collection</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> *&#160;</td>
<td class="paramname"><em>operation</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a3cfe389e9f13fdadc45f46c130cc029d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::unique_ptr&lt;<a class="el" href="classgeos_1_1geom_1_1Polygon.html">Polygon</a>&gt; geos::geom::util::GeometryEditor::editPolygon </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgeos_1_1geom_1_1Polygon.html">Polygon</a> *&#160;</td>
<td class="paramname"><em>polygon</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> *&#160;</td>
<td class="paramname"><em>operation</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a31f609b17cbc8f98906e88200327bad3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classgeos_1_1geom_1_1GeometryFactory.html">GeometryFactory</a>* geos::geom::util::GeometryEditor::factory</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The factory used to create the modified <a class="el" href="classgeos_1_1geom_1_1Geometry.html" title="Basic implementation of Geometry, constructed and destructed by GeometryFactory. ">Geometry</a> </p>
<p>Definition at line <a class="el" href="GeometryEditor_8h_source.html#l00084">84</a> of file <a class="el" href="GeometryEditor_8h_source.html">GeometryEditor.h</a>.</p>
</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><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>