📄 classogrgeometrycollection.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>OGR: OGRGeometryCollection Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.1 --><div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li id="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul></div><div class="tabs"> <ul> <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><h1>OGRGeometryCollection Class Reference</h1><!-- doxytag: class="OGRGeometryCollection" --><!-- doxytag: inherits="OGRGeometry" --><code>#include <<a class="el" href="ogr__geometry_8h-source.html">ogr_geometry.h</a>></code><p><p>Inheritance diagram for OGRGeometryCollection:<p><center><img src="classOGRGeometryCollection.png" usemap="#OGRGeometryCollection_map" border="0" alt=""></center><map name="OGRGeometryCollection_map"><area href="classOGRGeometry.html" alt="OGRGeometry" shape="rect" coords="159,0,308,24"><area href="classOGRMultiLineString.html" alt="OGRMultiLineString" shape="rect" coords="0,112,149,136"><area href="classOGRMultiPoint.html" alt="OGRMultiPoint" shape="rect" coords="159,112,308,136"><area href="classOGRMultiPolygon.html" alt="OGRMultiPolygon" shape="rect" coords="318,112,467,136"></map><a href="classOGRGeometryCollection-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#eccf1afd663ddde2e170e5da96af9774">OGRGeometryCollection</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#f40a832716c7c6eac30bfc59b419b112">getGeometryName</a> () const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRwkbGeometryType </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#15b662cc9386bb8554fa74d4428d7e9f">getGeometryType</a> () const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classOGRGeometry.html">OGRGeometry</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#cdb672a3c99f6f4136f28b4f53dd1855">clone</a> () const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#9aead953ce5cc3076d9d4e4a85c6f68d">empty</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#39e5d3d2fbfbfccd7cdf5275f0373816">transform</a> (<a class="el" href="classOGRCoordinateTransformation.html">OGRCoordinateTransformation</a> *poCT)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#954d008774d80ad0637bc25088746eea">flattenTo2D</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#5455f464acd7daa54aa592fb493017a6">WkbSize</a> () const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#1f06b21c6ec0a0500eb7e3a815283ccf">importFromWkb</a> (unsigned char *, int=-1)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#d3f3dfae1da46c4b0bbdb63abb0c8f5f">exportToWkb</a> (OGRwkbByteOrder, unsigned char *) const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#72381b58185cf0851db54067e3f3f2df">importFromWkt</a> (char **)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#038ea304e58110b7e61ea72166774558">exportToWkt</a> (char **ppszDstText) const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#6f9c93d8ce4b2e933e001b02de00a62e">getDimension</a> () const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#bb1251acb05add0bad92b83d1d6906bb">getEnvelope</a> (<a class="el" href="classOGREnvelope.html">OGREnvelope</a> *psEnvelope) const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#b0f794e58d68877bf82d65c42444f744">getNumGeometries</a> () const</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#d609f2c7886918a766dd3d3a4fa52ec3">getGeometryRef</a> (int)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRBoolean </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#e25defac0e02404820e7a8b6dc712f44">Equals</a> (<a class="el" href="classOGRGeometry.html">OGRGeometry</a> *) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#815199fda3d141eb52e7237dafade6fe">setCoordinateDimension</a> (int nDimension)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#3da519655d14346e591d22a547562b0c">addGeometry</a> (const <a class="el" href="classOGRGeometry.html">OGRGeometry</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#8422907a01d088ec5ef916382bea8eb3">addGeometryDirectly</a> (<a class="el" href="classOGRGeometry.html">OGRGeometry</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#e37405203118eeb0430ef38668a385b7">removeGeometry</a> (int iIndex, int bDelete=TRUE)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRGeometryCollection.html#73648d3d592a8a804d160bf0c69648cc">closeRings</a> ()</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>A collection of 1 or more geometry objects.<p>All geometries must share a common spatial reference system, and Subclasses may impose additional restrictions on the contents. <p><hr><h2>Constructor & Destructor Documentation</h2><a class="anchor" name="eccf1afd663ddde2e170e5da96af9774"></a><!-- doxytag: member="OGRGeometryCollection::OGRGeometryCollection" ref="eccf1afd663ddde2e170e5da96af9774" args="()" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRGeometryCollection::OGRGeometryCollection </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Create an empty geometry collection. </div></div><p><hr><h2>Member Function Documentation</h2><a class="anchor" name="f40a832716c7c6eac30bfc59b419b112"></a><!-- doxytag: member="OGRGeometryCollection::getGeometryName" ref="f40a832716c7c6eac30bfc59b419b112" args="() const" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">const char * OGRGeometryCollection::getGeometryName </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Fetch WKT name for geometry type.<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#18121f835b2fb724a0c1a87beb1a437a">OGR_G_GetGeometryName()</a>.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>name used for this geometry type in well known text format. The returned pointer is to a static internal string and should not be modified or freed. </dd></dl><p>Implements <a class="el" href="classOGRGeometry.html#b9c97ddc4876f1aa563cc4c075bfb251">OGRGeometry</a>.<p>Reimplemented in <a class="el" href="classOGRMultiPolygon.html#7a444b319bd4ba785029161aa4c0aad7">OGRMultiPolygon</a>, <a class="el" href="classOGRMultiPoint.html#9caf341833a11ed7386c818dbb52a25e">OGRMultiPoint</a>, and <a class="el" href="classOGRMultiLineString.html#0a5a37617968af122e84f267ba9fc952">OGRMultiLineString</a>.</div></div><p><a class="anchor" name="15b662cc9386bb8554fa74d4428d7e9f"></a><!-- doxytag: member="OGRGeometryCollection::getGeometryType" ref="15b662cc9386bb8554fa74d4428d7e9f" args="() const" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRwkbGeometryType OGRGeometryCollection::getGeometryType </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Fetch geometry type.<p>Note that the geometry type may include the 2.5D flag. To get a 2D flattened version of the geometry type apply the wkbFlatten() macro to the return result.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#8fae58102f5c4a4cf2526e5ca8369a76">OGR_G_GetGeometryType()</a>.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>the geometry type code. </dd></dl><p>Implements <a class="el" href="classOGRGeometry.html#26fef0fc5e95c9e8e526922476c778bd">OGRGeometry</a>.<p>Reimplemented in <a class="el" href="classOGRMultiPolygon.html#9930f2ab34ed9a33cc5557b4ad390916">OGRMultiPolygon</a>, <a class="el" href="classOGRMultiPoint.html#2c20185f2e6c0c8ecf40e8692db315a7">OGRMultiPoint</a>, and <a class="el" href="classOGRMultiLineString.html#222bbc4cb2eddd7715ea4bea4031baf5">OGRMultiLineString</a>.</div></div><p><a class="anchor" name="cdb672a3c99f6f4136f28b4f53dd1855"></a><!-- doxytag: member="OGRGeometryCollection::clone" ref="cdb672a3c99f6f4136f28b4f53dd1855" args="() const" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * OGRGeometryCollection::clone </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Make a copy of this object.<p>This method relates to the SFCOM IGeometry::clone() method.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#1725918932da7d59f9ee72829ac171fa">OGR_G_Clone()</a>.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>a new object instance with the same geometry, and spatial reference system as the original. </dd></dl><p>Implements <a class="el" href="classOGRGeometry.html#f2fe60f2bde104cb3eef16475f3f3cd8">OGRGeometry</a>.<p>Reimplemented in <a class="el" href="classOGRMultiPolygon.html#cd2ac7a716062f16642ac6040afcc7e9">OGRMultiPolygon</a>, <a class="el" href="classOGRMultiPoint.html#6be07788501b520e48ebc89cccbbc3d0">OGRMultiPoint</a>, and <a class="el" href="classOGRMultiLineString.html#dff0509cc57d7de29eda76da3ba3c1dc">OGRMultiLineString</a>.</div></div><p><a class="anchor" name="9aead953ce5cc3076d9d4e4a85c6f68d"></a><!-- doxytag: member="OGRGeometryCollection::empty" ref="9aead953ce5cc3076d9d4e4a85c6f68d" args="()" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void OGRGeometryCollection::empty </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Clear geometry information. This restores the geometry to it's initial state after construction, and before assignment of actual geometry.<p>This method relates to the SFCOM IGeometry::Empty() method.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#90cc83b0a3052b8fbe2ed77a86323bf2">OGR_G_Empty()</a>. <p>Implements <a class="el" href="classOGRGeometry.html#1702b5b8142abe761061a6cd44e50b05">OGRGeometry</a>.</div></div><p><a class="anchor" name="39e5d3d2fbfbfccd7cdf5275f0373816"></a><!-- doxytag: member="OGRGeometryCollection::transform" ref="39e5d3d2fbfbfccd7cdf5275f0373816" args="(OGRCoordinateTransformation *poCT)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRErr OGRGeometryCollection::transform </td> <td>(</td> <td class="paramtype"><a class="el" href="classOGRCoordinateTransformation.html">OGRCoordinateTransformation</a> * </td> <td class="paramname"> <em>poCT</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Apply arbitrary coordinate transformation to geometry.<p>This method will transform the coordinates of a geometry from their current spatial reference system to a new target spatial reference system. Normally this means reprojecting the vectors, but it could include datum shifts, and changes of units.<p>Note that this method does not require that the geometry already have a spatial reference system. It will be assumed that they can be treated as having the source spatial reference system of the <a class="el" href="classOGRCoordinateTransformation.html">OGRCoordinateTransformation</a> object, and the actual SRS of the geometry will be ignored. On successful completion the output <a class="el" href="classOGRSpatialReference.html">OGRSpatialReference</a> of the <a class="el" href="classOGRCoordinateTransformation.html">OGRCoordinateTransformation</a> will be assigned to the geometry.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#59a5b3f954b11cfbf6e78807c28d6090">OGR_G_Transform()</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>poCT</em> </td><td>the transformation to apply.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE on success or an error code. </dd></dl><p>Implements <a class="el" href="classOGRGeometry.html#a9e8bfb3c2129f25cf622660f734e1ba">OGRGeometry</a>.</div></div><p><a class="anchor" name="954d008774d80ad0637bc25088746eea"></a><!-- doxytag: member="OGRGeometryCollection::flattenTo2D" ref="954d008774d80ad0637bc25088746eea" args="()" --><div class="memitem"><div class="memproto"> <table class="memname">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -