📄 classogrfeature.html
字号:
<td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Set field.<p>The passed value <a class="el" href="unionOGRField.html">OGRField</a> must be of exactly the same type as the target field, or an application crash may occur. The passed value is copied, and will not be affected. It remains the responsibility of the caller.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#f3cfe4f766f5579f670bb651c53a99ca">OGR_F_SetFieldRaw()</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>iField</em> </td><td>the field to fetch, from 0 to <a class="el" href="classOGRFeature.html#b7f4eb0c098a9456d4005828127cdde0">GetFieldCount()</a>-1. </td></tr> <tr><td valign="top"></td><td valign="top"><em>puValue</em> </td><td>the value to assign. </td></tr> </table></dl></div></div><p><a class="anchor" name="affef1273673a04dad428e803e6d88a6"></a><!-- doxytag: member="OGRFeature::SetField" ref="affef1273673a04dad428e803e6d88a6" args="(int i, int nCount, GByte *pabyBinary)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void OGRFeature::SetField </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>iField</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>nBytes</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GByte * </td> <td class="paramname"> <em>pabyData</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Set field to binary data.<p>This method currently on has an effect of OFTBinary fields.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#5dcaa7d3e71f078ae714831f7c5cae1d">OGR_F_SetFieldBinary()</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>iField</em> </td><td>the field to set, from 0 to <a class="el" href="classOGRFeature.html#b7f4eb0c098a9456d4005828127cdde0">GetFieldCount()</a>-1. </td></tr> <tr><td valign="top"></td><td valign="top"><em>nBytes</em> </td><td>bytes of data being set. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pabyData</em> </td><td>the raw data being applied. </td></tr> </table></dl></div></div><p><a class="anchor" name="80ca40aeda639243275e2d076301b6da"></a><!-- doxytag: member="OGRFeature::SetField" ref="80ca40aeda639243275e2d076301b6da" args="(int i, int nYear, int nMonth, int nDay, int nHour=0, int nMinute=0, int nSecond=0, int nTZFlag=0)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void OGRFeature::SetField </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>iField</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>nYear</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>nMonth</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>nDay</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>nHour</em> = <code>0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>nMinute</em> = <code>0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>nSecond</em> = <code>0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>nTZFlag</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Set field to date.<p>This method currently only has an effect for OFTDate, OFTTime and OFTDateTime fields.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#627970180a20e2a4b1c7ae694923fd73">OGR_F_SetFieldDateTime()</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>iField</em> </td><td>the field to set, from 0 to <a class="el" href="classOGRFeature.html#b7f4eb0c098a9456d4005828127cdde0">GetFieldCount()</a>-1. </td></tr> <tr><td valign="top"></td><td valign="top"><em>nYear</em> </td><td>(including century) </td></tr> <tr><td valign="top"></td><td valign="top"><em>nMonth</em> </td><td>(1-12) </td></tr> <tr><td valign="top"></td><td valign="top"><em>nDay</em> </td><td>(1-31) </td></tr> <tr><td valign="top"></td><td valign="top"><em>nHour</em> </td><td>(0-23) </td></tr> <tr><td valign="top"></td><td valign="top"><em>nMinute</em> </td><td>(0-59) </td></tr> <tr><td valign="top"></td><td valign="top"><em>nSecond</em> </td><td>(0-59) </td></tr> <tr><td valign="top"></td><td valign="top"><em>nTZFlag</em> </td><td>(0=unknown, 1=localtime, 100=GMT, see data model for details) </td></tr> </table></dl></div></div><p><a class="anchor" name="23506b436ea8e88e65aaa6b57bbaa326"></a><!-- doxytag: member="OGRFeature::GetFID" ref="23506b436ea8e88e65aaa6b57bbaa326" args="()" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">long OGRFeature::GetFID </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table></div><div class="memdoc"><p>Get feature identifier.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#95bc391bf7883a8732a523d525c26a00">OGR_F_GetFID()</a>.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>feature id or OGRNullFID if none has been assigned. </dd></dl></div></div><p><a class="anchor" name="9abfc256b2d1758761fa54ca3395029b"></a><!-- doxytag: member="OGRFeature::SetFID" ref="9abfc256b2d1758761fa54ca3395029b" args="(long nFID)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRErr OGRFeature::SetFID </td> <td>(</td> <td class="paramtype">long </td> <td class="paramname"> <em>nFID</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Set the feature identifier.<p>For specific types of features this operation may fail on illegal features ids. Generally it always succeeds. Feature ids should be greater than or equal to zero, with the exception of OGRNullFID (-1) indicating that the feature id is unknown.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#09d01eea41746751db62da123887e787">OGR_F_SetFID()</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>nFID</em> </td><td>the new feature identifier value to assign.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>On success OGRERR_NONE, or on failure some other value. </dd></dl></div></div><p><a class="anchor" name="4966b71e0d67f1bfcddac4240b18a506"></a><!-- doxytag: member="OGRFeature::DumpReadable" ref="4966b71e0d67f1bfcddac4240b18a506" args="(FILE *)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void OGRFeature::DumpReadable </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"> <em>fpOut</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Dump this feature in a human readable form.<p>This dumps the attributes, and geometry; however, it doesn't definition information (other than field types and names), nor does it report the geometry spatial reference system.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#e38d330f942798fcbaaf27e5807fb567">OGR_F_DumpReadable()</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>fpOut</em> </td><td>the stream to write to, such as stdout. If NULL stdout will be used. </td></tr> </table></dl></div></div><p><a class="anchor" name="8ebc0999c4bce0b5073add16598dfc77"></a><!-- doxytag: member="OGRFeature::SetFrom" ref="8ebc0999c4bce0b5073add16598dfc77" args="(OGRFeature *, int=TRUE)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRErr OGRFeature::SetFrom </td> <td>(</td> <td class="paramtype"><a class="el" href="classOGRFeature.html">OGRFeature</a> * </td> <td class="paramname"> <em>poSrcFeature</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>bForgiving</em> = <code>TRUE</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Set one feature from another.<p>Overwrite the contents of this feature from the geometry and attributes of another. The poSrcFeature does not need to have the same <a class="el" href="
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -