⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classogrfeature.html

📁 gdal库的学习文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!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: OGRFeature 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&nbsp;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&nbsp;Pages</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>  </ul></div><h1>OGRFeature Class Reference</h1><!-- doxytag: class="OGRFeature" --><code>#include &lt;<a class="el" href="ogr__feature_8h-source.html">ogr_feature.h</a>&gt;</code><p><a href="classOGRFeature-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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#e6559a9f3c26274d1253e5d043b2e852">OGRFeature</a> (<a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#01ef8d59265a7ab7a575387a8269bf92">GetDefnRef</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#40a4ddb33f09a5f340b9139be72e277d">SetGeometryDirectly</a> (<a class="el" href="classOGRGeometry.html">OGRGeometry</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#f1181ade837a52129ea25b46dd50cf30">SetGeometry</a> (<a class="el" href="classOGRGeometry.html">OGRGeometry</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#cc966ce8c10ae3ddf9f14c2736fdce9a">GetGeometryRef</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#2f078d96bfb310664f1a95183798c0dc">StealGeometry</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classOGRFeature.html">OGRFeature</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#580a742ae4952c3a4a0dd25ae2afb7e5">Clone</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRBoolean&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#738dfd54ecb6fb86e294929e91f90479">Equal</a> (<a class="el" href="classOGRFeature.html">OGRFeature</a> *poFeature)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#b7f4eb0c098a9456d4005828127cdde0">GetFieldCount</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classOGRFieldDefn.html">OGRFieldDefn</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#35aba5a674e9901eccf1e7d90d97d773">GetFieldDefnRef</a> (int iField)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#b49421f777e56b7cb41169f1301a7b21">GetFieldIndex</a> (const char *pszName)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#937b21e0137e40bc1473f354879975da">UnsetField</a> (int iField)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="unionOGRField.html">OGRField</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#e7f676d5a8e1f62d80b438c13b159ee0">GetRawFieldRef</a> (int i)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#dd319b68ea27a4ee0602d3aa460ca3b5">GetFieldAsInteger</a> (int i)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#b8a57c94e8bb8ffac5e7048d896254b4">GetFieldAsDouble</a> (int i)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#c7a0224e13dce1f9479a6bf2111ea766">GetFieldAsString</a> (int i)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const int *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#3f153cf4e2e6513b7df60f46ae8440bd">GetFieldAsIntegerList</a> (int i, int *pnCount)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const double *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#8f799b9e9e44af526659b646bbfda870">GetFieldAsDoubleList</a> (int i, int *pnCount)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">char **&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#84af9ea0a9af247581901ec95a890571">GetFieldAsStringList</a> (int i) const </td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">GByte *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#0262d9d3f0f9e18a1e2101e1972aebae">GetFieldAsBinary</a> (int i, int *pnCount)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#6c5d2444407b07e07b79863c42ee7a49">GetFieldAsDateTime</a> (int i, int *pnYear, int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, int *pnSecond, int *pnTZFlag)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#4abbe118cc2f3e48bbac7f710b71b531">SetField</a> (int i, int nValue)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#28a29785b812cbf8df68a1069cab2892">SetField</a> (int i, double dfValue)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#2d96b53563cf0c1ad7ada15170d9d75e">SetField</a> (int i, const char *pszValue)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#9c4d7b02debcff54be9da2373ae621c9">SetField</a> (int i, int nCount, int *panValues)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#3ce2f723223a23a36d209eaa5ea8d358">SetField</a> (int i, int nCount, double *padfValues)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#6e78066ea58ca9b3d3d802baa94807ae">SetField</a> (int i, char **papszValues)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#19c699e90eba68df4f336cde33ca51a9">SetField</a> (int i, <a class="el" href="unionOGRField.html">OGRField</a> *puValue)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#affef1273673a04dad428e803e6d88a6">SetField</a> (int i, int nCount, GByte *pabyBinary)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#80ca40aeda639243275e2d076301b6da">SetField</a> (int i, int nYear, int nMonth, int nDay, int nHour=0, int nMinute=0, int nSecond=0, int nTZFlag=0)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#23506b436ea8e88e65aaa6b57bbaa326">GetFID</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#9abfc256b2d1758761fa54ca3395029b">SetFID</a> (long nFID)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#4966b71e0d67f1bfcddac4240b18a506">DumpReadable</a> (FILE *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#8ebc0999c4bce0b5073add16598dfc77">SetFrom</a> (<a class="el" href="classOGRFeature.html">OGRFeature</a> *, int=TRUE)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#54c179e53eb6eddb657dd392a87cccab">GetStyleString</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#5d2c15d00845820e6382d48227ed7ff7">SetStyleString</a> (const char *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#7282982663cee5dd2fc18a093c3e386a">SetStyleStringDirectly</a> (char *)</td></tr><tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classOGRFeature.html">OGRFeature</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#0ef4455f24cfbec6cf37110f9116cf15">CreateFeature</a> (<a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a> *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRFeature.html#5d2602d11f21567119da0ca6b6c5ad45">DestroyFeature</a> (<a class="el" href="classOGRFeature.html">OGRFeature</a> *)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>A simple feature, including geometry and attributes. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a class="anchor" name="e6559a9f3c26274d1253e5d043b2e852"></a><!-- doxytag: member="OGRFeature::OGRFeature" ref="e6559a9f3c26274d1253e5d043b2e852" args="(OGRFeatureDefn *)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OGRFeature::OGRFeature           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a> *&nbsp;</td>          <td class="paramname"> <em>poDefnIn</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Constructor<p>Note that the <a class="el" href="classOGRFeature.html">OGRFeature</a> will increment the reference count of it's defining <a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a>. Destruction of the <a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a> before destruction of all OGRFeatures that depend on it is likely to result in a crash.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#0d820fd7da6a079048c0d21e26fc9e47">OGR_F_Create()</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>poDefnIn</em>&nbsp;</td><td>feature class (layer) definition to which the feature will adhere. </td></tr>  </table></dl></div></div><p><hr><h2>Member Function Documentation</h2><a class="anchor" name="01ef8d59265a7ab7a575387a8269bf92"></a><!-- doxytag: member="OGRFeature::GetDefnRef" ref="01ef8d59265a7ab7a575387a8269bf92" args="()" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a> * OGRFeature::GetDefnRef           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [inline]</code></td>        </tr>      </table></div><div class="memdoc"><p>Fetch feature definition.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#123dfa431bf655aafd2dbd42247dd7be">OGR_F_GetDefnRef()</a>.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>a reference to the feature definition object. </dd></dl></div></div><p><a class="anchor" name="40a4ddb33f09a5f340b9139be72e277d"></a><!-- doxytag: member="OGRFeature::SetGeometryDirectly" ref="40a4ddb33f09a5f340b9139be72e277d" args="(OGRGeometry *)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OGRErr OGRFeature::SetGeometryDirectly           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td>          <td class="paramname"> <em>poGeomIn</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Set feature geometry.<p>This method updates the features geometry, and operate exactly as <a class="el" href="classOGRFeature.html#f1181ade837a52129ea25b46dd50cf30">SetGeometry()</a>, except that this method assumes ownership of the passed geometry.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#d391d3197728bb6d12a6b0c2e2661aa4">OGR_F_SetGeometryDirectly()</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>poGeomIn</em>&nbsp;</td><td>new geometry to apply to feature. Passing NULL value here is correct and it will result in deallocation of currently assigned geometry without assigning new one.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the geometry type is illegal for the <a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a> (checking not yet implemented). </dd></dl></div></div><p><a class="anchor" name="f1181ade837a52129ea25b46dd50cf30"></a><!-- doxytag: member="OGRFeature::SetGeometry" ref="f1181ade837a52129ea25b46dd50cf30" args="(OGRGeometry *)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OGRErr OGRFeature::SetGeometry           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td>          <td class="paramname"> <em>poGeomIn</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Set feature geometry.<p>This method updates the features geometry, and operate exactly as <a class="el" href="classOGRFeature.html#40a4ddb33f09a5f340b9139be72e277d">SetGeometryDirectly()</a>, except that this method does not assume ownership of the passed geometry, but instead makes a copy of it.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#7b9c524f5c01a6a4b4e50e351d03299f">OGR_F_SetGeometry()</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>poGeomIn</em>&nbsp;</td><td>new geometry to apply to feature. Passing NULL value here is correct and it will result in deallocation of currently assigned geometry without assigning new one.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the geometry type is illegal for the <a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a> (checking not yet implemented). </dd></dl></div></div><p><a class="anchor" name="cc966ce8c10ae3ddf9f14c2736fdce9a"></a><!-- doxytag: member="OGRFeature::GetGeometryRef" ref="cc966ce8c10ae3ddf9f14c2736fdce9a" args="()" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * OGRFeature::GetGeometryRef           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [inline]</code></td>        </tr>      </table></div><div class="memdoc"><p>Fetch pointer to feature geometry.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#1bf9596756aeacec4da502383c378f5c">OGR_F_GetGeometryRef()</a>.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>pointer to internal feature geometry. This object should not be modified. </dd></dl></div></div><p><a class="anchor" name="2f078d96bfb310664f1a95183798c0dc"></a><!-- doxytag: member="OGRFeature::StealGeometry" ref="2f078d96bfb310664f1a95183798c0dc" args="()" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * OGRFeature::StealGeometry           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -