📄 classogrgeometrycollection.html
字号:
<p>Implements <a class="el" href="classOGRGeometry.html#a3d42b06ae6f7bbef6d1a2886da8d398">OGRGeometry</a>.</div></div><p><a class="anchor" name="b0f794e58d68877bf82d65c42444f744"></a><!-- doxytag: member="OGRGeometryCollection::getNumGeometries" ref="b0f794e58d68877bf82d65c42444f744" args="() const" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int OGRGeometryCollection::getNumGeometries </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table></div><div class="memdoc"><p>Fetch number of geometries in container.<p>This method relates to the SFCOM IGeometryCollect::get_NumGeometries() method.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>count of children geometries. May be zero. </dd></dl></div></div><p><a class="anchor" name="d609f2c7886918a766dd3d3a4fa52ec3"></a><!-- doxytag: member="OGRGeometryCollection::getGeometryRef" ref="d609f2c7886918a766dd3d3a4fa52ec3" args="(int)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * OGRGeometryCollection::getGeometryRef </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>i</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Fetch geometry from container.<p>This method returns a pointer to an geometry within the container. The returned geometry remains owned by the container, and should not be modified. The pointer is only valid untill the next change to the geometry container. Use IGeometry::clone() to make a copy.<p>This method relates to the SFCOM IGeometryCollection::get_Geometry() method.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>i</em> </td><td>the index of the geometry to fetch, between 0 and <a class="el" href="classOGRGeometryCollection.html#b0f794e58d68877bf82d65c42444f744">getNumGeometries()</a> - 1. </td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>pointer to requested geometry. </dd></dl></div></div><p><a class="anchor" name="e25defac0e02404820e7a8b6dc712f44"></a><!-- doxytag: member="OGRGeometryCollection::Equals" ref="e25defac0e02404820e7a8b6dc712f44" args="(OGRGeometry *) const " --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRBoolean OGRGeometryCollection::Equals </td> <td>(</td> <td class="paramtype"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * </td> <td class="paramname"> <em>poOther</em> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Returns two if two geometries are equivalent.<p>This method is the same as the C function OGR_G_Equal().<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if equivalent or FALSE otherwise. </dd></dl><p>Implements <a class="el" href="classOGRGeometry.html#e751513a46c7e7b154796bfe494faf16">OGRGeometry</a>.</div></div><p><a class="anchor" name="815199fda3d141eb52e7237dafade6fe"></a><!-- doxytag: member="OGRGeometryCollection::setCoordinateDimension" ref="815199fda3d141eb52e7237dafade6fe" args="(int nDimension)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void OGRGeometryCollection::setCoordinateDimension </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>nDimension</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Set the coordinate dimension.<p>This method sets the explicit coordinate dimension. Setting the coordinate dimension of a geometry to 2 should zero out any existing Z values. Setting the dimension of a geometry collection will not necessarily affect the children geometries.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>nNewDimension</em> </td><td>New coordinate dimension value, either 2 or 3. </td></tr> </table></dl><p>Reimplemented from <a class="el" href="classOGRGeometry.html#79f84a2b948d511f28c47c47577dea49">OGRGeometry</a>.</div></div><p><a class="anchor" name="3da519655d14346e591d22a547562b0c"></a><!-- doxytag: member="OGRGeometryCollection::addGeometry" ref="3da519655d14346e591d22a547562b0c" args="(const OGRGeometry *)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRErr OGRGeometryCollection::addGeometry </td> <td>(</td> <td class="paramtype">const <a class="el" href="classOGRGeometry.html">OGRGeometry</a> * </td> <td class="paramname"> <em>poNewGeom</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Add a geometry to the container.<p>Some subclasses of <a class="el" href="classOGRGeometryCollection.html">OGRGeometryCollection</a> restrict the types of geometry that can be added, and may return an error. The passed geometry is cloned to make an internal copy.<p>There is no SFCOM analog to this method.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#4a15e130614cb4c66fc99bb93dc6b3b5">OGR_G_AddGeometry()</a>.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>poNewGeom</em> </td><td>geometry to add to the container.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE if successful, or OGRERR_UNSUPPORTED_GEOMETRY_TYPE if the geometry type is illegal for the type of geometry container. </dd></dl></div></div><p><a class="anchor" name="8422907a01d088ec5ef916382bea8eb3"></a><!-- doxytag: member="OGRGeometryCollection::addGeometryDirectly" ref="8422907a01d088ec5ef916382bea8eb3" args="(OGRGeometry *)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRErr OGRGeometryCollection::addGeometryDirectly </td> <td>(</td> <td class="paramtype"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * </td> <td class="paramname"> <em>poNewGeom</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Add a geometry directly to the container.<p>Some subclasses of <a class="el" href="classOGRGeometryCollection.html">OGRGeometryCollection</a> restrict the types of geometry that can be added, and may return an error. Ownership of the passed geometry is taken by the container rather than cloning as <a class="el" href="classOGRGeometryCollection.html#3da519655d14346e591d22a547562b0c">addGeometry()</a> does.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#ff56cae8305396a9c5b690d8356e39c9">OGR_G_AddGeometryDirectly()</a>.<p>There is no SFCOM analog to this method.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>poNewGeom</em> </td><td>geometry to add to the container.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE if successful, or OGRERR_UNSUPPORTED_GEOMETRY_TYPE if the geometry type is illegal for the type of geometry container. </dd></dl><p>Reimplemented in <a class="el" href="classOGRMultiPolygon.html#246ff65cee942960a98f64539ebbf7ad">OGRMultiPolygon</a>, <a class="el" href="classOGRMultiPoint.html#976d4fb497d3b45bb210ab4bde7ecb67">OGRMultiPoint</a>, and <a class="el" href="classOGRMultiLineString.html#c030cf7183a73d625320b4ab6e7a7fb9">OGRMultiLineString</a>.</div></div><p><a class="anchor" name="e37405203118eeb0430ef38668a385b7"></a><!-- doxytag: member="OGRGeometryCollection::removeGeometry" ref="e37405203118eeb0430ef38668a385b7" args="(int iIndex, int bDelete=TRUE)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRErr OGRGeometryCollection::removeGeometry </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>iGeom</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>bDelete</em> = <code>TRUE</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Remove a geometry from the container.<p>Removing a geometry will cause the geometry count to drop by one, and all "higher" geometries will shuffle down one in index.<p>There is no SFCOM analog to this method.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#54ea024bb659e48d3297404e53800237">OGR_G_RemoveGeometry()</a>.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>iGeom</em> </td><td>the index of the geometry to delete. A value of -1 is a special flag meaning that all geometries should be removed.</td></tr> <tr><td valign="top"></td><td valign="top"><em>bDelete</em> </td><td>if TRUE the geometry will be deallocated, otherwise it will not. The default is TRUE as the container is considered to own the geometries in it.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE if successful, or OGRERR_FAILURE if the index is out of range. </dd></dl></div></div><p><a class="anchor" name="73648d3d592a8a804d160bf0c69648cc"></a><!-- doxytag: member="OGRGeometryCollection::closeRings" ref="73648d3d592a8a804d160bf0c69648cc" args="()" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void OGRGeometryCollection::closeRings </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Force rings to be closed.<p>If this geometry, or any contained geometries has polygon rings that are not closed, they will be closed by adding the starting point at the end. <p>Reimplemented from <a class="el" href="classOGRGeometry.html#eb6cf249316b3046e0d4f77ec400e844">OGRGeometry</a>.</div></div><p><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="ogr__geometry_8h-source.html">ogr_geometry.h</a><li>ogrgeometrycollection.cpp</ul><hr>Generated for GDAL by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1.</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -