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

📄 classogrlayer.html

📁 gdal库的学习文档
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE if successfully installed, or an error code if the query expression is in error, or some other failure occurs. </dd></dl></div></div><p><a class="anchor" name="ad0f2cd7f0587584b8f382c6a913583c"></a><!-- doxytag: member="OGRLayer::ResetReading" ref="ad0f2cd7f0587584b8f382c6a913583c" args="()=0" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void OGRLayer::ResetReading           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [pure virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>Reset feature reading to start on the first feature. This affects <a class="el" href="classOGRLayer.html#47d21ff33b32d14fa4e9885b9edecad6">GetNextFeature()</a>.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#b0383004bf637171648a9d03a80f15a4">OGR_L_ResetReading()</a>. </div></div><p><a class="anchor" name="47d21ff33b32d14fa4e9885b9edecad6"></a><!-- doxytag: member="OGRLayer::GetNextFeature" ref="47d21ff33b32d14fa4e9885b9edecad6" args="()=0" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="classOGRFeature.html">OGRFeature</a> * OGRLayer::GetNextFeature           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [pure virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>Fetch the next available feature from this layer. The returned feature becomes the responsiblity of the caller to delete.<p>Only features matching the current spatial filter (set with <a class="el" href="classOGRLayer.html#0b4ab45cf97cbc470f0d60474d3e4169">SetSpatialFilter()</a>) will be returned.<p>This method implements sequential access to the features of a layer. The <a class="el" href="classOGRLayer.html#ad0f2cd7f0587584b8f382c6a913583c">ResetReading()</a> method can be used to start at the beginning again.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#6708c067521ab7b7f9c4ec0ebe221b5b">OGR_L_GetNextFeature()</a>.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>a feature, or NULL if no more features are available. </dd></dl></div></div><p><a class="anchor" name="e3b6234d6077a18a19eddaf7e75ff5e1"></a><!-- doxytag: member="OGRLayer::SetNextByIndex" ref="e3b6234d6077a18a19eddaf7e75ff5e1" args="(long nIndex)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OGRErr OGRLayer::SetNextByIndex           </td>          <td>(</td>          <td class="paramtype">long&nbsp;</td>          <td class="paramname"> <em>nIndex</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>Move read cursor to the nIndex'th feature in the current resultset.<p>This method allows positioning of a layer such that the <a class="el" href="classOGRLayer.html#47d21ff33b32d14fa4e9885b9edecad6">GetNextFeature()</a> call will read the requested feature, where nIndex is an absolute index into the current result set. So, setting it to 3 would mean the next feature read with <a class="el" href="classOGRLayer.html#47d21ff33b32d14fa4e9885b9edecad6">GetNextFeature()</a> would have been the 4th feature to have been read if sequential reading took place from the beginning of the layer, including accounting for spatial and attribute filters.<p>Only in rare circumstances is <a class="el" href="classOGRLayer.html#e3b6234d6077a18a19eddaf7e75ff5e1">SetNextByIndex()</a> efficiently implemented. In all other cases the default implementation which calls <a class="el" href="classOGRLayer.html#ad0f2cd7f0587584b8f382c6a913583c">ResetReading()</a> and then calls <a class="el" href="classOGRLayer.html#47d21ff33b32d14fa4e9885b9edecad6">GetNextFeature()</a> nIndex times is used. To determine if fast seeking is available on the current layer use the <a class="el" href="classOGRLayer.html#eedbda1a62f9b89b8e5f24332cf22286">TestCapability()</a> method with a value of OLCFastSetNextByIndex.<p>This method is the same as the C function OGR_L_SetNextByIndex().<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>nIndex</em>&nbsp;</td><td>the index indicating how many steps into the result set to seek.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE on success or an error code. </dd></dl></div></div><p><a class="anchor" name="cb7625383f161e5a04aeea2173dce411"></a><!-- doxytag: member="OGRLayer::GetFeature" ref="cb7625383f161e5a04aeea2173dce411" args="(long nFID)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="classOGRFeature.html">OGRFeature</a> * OGRLayer::GetFeature           </td>          <td>(</td>          <td class="paramtype">long&nbsp;</td>          <td class="paramname"> <em>nFID</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>Fetch a feature by it's identifier.<p>This function will attempt to read the identified feature. The nFID value cannot be OGRNullFID. Success or failure of this operation is unaffected by the spatial or attribute filters.<p>If this method returns a non-NULL feature, it is guaranteed that it's feature id (<a class="el" href="classOGRFeature.html#23506b436ea8e88e65aaa6b57bbaa326">OGRFeature::GetFID()</a>) will be the same as nFID.<p>Use OGRLayer::TestCapability(OLCRandomRead) to establish if this layer supports efficient random access reading via <a class="el" href="classOGRLayer.html#cb7625383f161e5a04aeea2173dce411">GetFeature()</a>; however, the call should always work if the feature exists as a fallback implementation just scans all the features in the layer looking for the desired feature.<p>Sequential reads are generally considered interrupted by a <a class="el" href="classOGRLayer.html#cb7625383f161e5a04aeea2173dce411">GetFeature()</a> call.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#7c628dce8939904154b50365306b06f9">OGR_L_GetFeature()</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>&nbsp;</td><td>the feature id of the feature to read.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>a feature now owned by the caller, or NULL on failure. </dd></dl></div></div><p><a class="anchor" name="681139bfd585b74d7218e51a32144283"></a><!-- doxytag: member="OGRLayer::SetFeature" ref="681139bfd585b74d7218e51a32144283" args="(OGRFeature *poFeature)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OGRErr OGRLayer::SetFeature           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="classOGRFeature.html">OGRFeature</a> *&nbsp;</td>          <td class="paramname"> <em>poFeature</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>Rewrite an existing feature.<p>This method will write a feature to the layer, based on the feature id within the <a class="el" href="classOGRFeature.html">OGRFeature</a>.<p>Use OGRLayer::TestCapability(OLCRandomWrite) to establish if this layer supports random access writing via <a class="el" href="classOGRLayer.html#681139bfd585b74d7218e51a32144283">SetFeature()</a>.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#5b380520d0999422987f06b6e31b9b00">OGR_L_SetFeature()</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>poFeature</em>&nbsp;</td><td>the feature to write.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE if the operation works, otherwise an appropriate error code. </dd></dl></div></div><p><a class="anchor" name="aa1e32016f481596a55e1d988a15a067"></a><!-- doxytag: member="OGRLayer::CreateFeature" ref="aa1e32016f481596a55e1d988a15a067" args="(OGRFeature *poFeature)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OGRErr OGRLayer::CreateFeature           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="classOGRFeature.html">OGRFeature</a> *&nbsp;</td>          <td class="paramname"> <em>poFeature</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>Create and write a new feature within a layer.<p>The passed feature is written to the layer as a new feature, rather than overwriting an existing one. If the feature has a feature id other than OGRNullFID, then the native implementation may use that as the feature id of the new feature, but not necessarily. Upon successful return the passed feature will have been updated with the new feature id.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#301d319111285a47fe6cda6e079214f8">OGR_L_CreateFeature()</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>poFeature</em>&nbsp;</td><td>the feature to write to disk.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE on success. </dd></dl></div></div><p><a class="anchor" name="7e3d454d54a615a1b4359628bb6e7674"></a><!-- doxytag: member="OGRLayer::DeleteFeature" ref="7e3d454d54a615a1b4359628bb6e7674" args="(long nFID)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OGRErr OGRLayer::DeleteFeature           </td>          <td>(</td>          <td class="paramtype">long&nbsp;</td>          <td class="paramname"> <em>nFID</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>Delete feature from layer.<p>The feature with the indicated feature id is deleted from the layer if supported by the driver. Most drivers do not support feature deletion, and will return OGRERR_UNSUPPORTED_OPERATION. The <a class="el" href="classOGRLayer.html#eedbda1a62f9b89b8e5f24332cf22286">TestCapability()</a> layer method may be called with OLCDeleteFeature to check if the driver supports feature deletion.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#3525cc8e47db48f8968605d3f2d9a41a">OGR_L_DeleteFeature()</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>poFeature</em>&nbsp;</td><td>the feature to write to disk.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE on success. </dd></dl></div></div><p><a class="anchor" name="80473bcfd11341e70dd35bebe94026cf"></a><!-- doxytag: member="OGRLayer::GetLayerDefn" ref="80473bcfd11341e70dd35bebe94026cf" args="()=0" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a> * OGRLayer::GetLayerDefn           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [pure virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>Fetch the schema information for this layer.<p>The returned <a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a> is owned by the <a class="el" href="classOGRLayer.html">OGRLayer</a>, and should not be modified or freed by the application. It encapsulates the attribute schema of the features of the layer.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#7b67ea4ab5892c6720460dc7f66eca2d">OGR_L_GetLayerDefn()</a>.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>feature definition. </dd></dl></div></div><p>

⌨️ 快捷键说明

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