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

📄 classogrdatasource.html

📁 gdal库的学习文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [pure virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>Test if capability is available.<p>One of the following data source capability names can be passed into this method, and a TRUE or FALSE value will be returned indicating whether or not the capability is available for this object.<p><ul><li><b>ODsCreateLayer</b>: True if this datasource can create new layers.<p></li></ul><p>The define macro forms of the capability names should be used in preference to the strings themselves to avoid mispelling.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#d0fefab726442fa71ab5ef74fe8549a6">OGR_DS_TestCapability()</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>pszCapability</em>&nbsp;</td><td>the capability to test.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if capability available otherwise FALSE. </dd></dl></div></div><p><a class="anchor" name="39cfc6e0ee790506d7638b0dce03c7da"></a><!-- doxytag: member="OGRDataSource::CreateLayer" ref="39cfc6e0ee790506d7638b0dce03c7da" args="(const char *pszName, OGRSpatialReference *poSpatialRef=NULL, OGRwkbGeometryType eGType=wkbUnknown, char **papszOptions=NULL)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="classOGRLayer.html">OGRLayer</a> * OGRDataSource::CreateLayer           </td>          <td>(</td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszName</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="classOGRSpatialReference.html">OGRSpatialReference</a> *&nbsp;</td>          <td class="paramname"> <em>poSpatialRef</em> = <code>NULL</code>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">OGRwkbGeometryType&nbsp;</td>          <td class="paramname"> <em>eGType</em> = <code>wkbUnknown</code>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">char **&nbsp;</td>          <td class="paramname"> <em>papszOptions</em> = <code>NULL</code></td><td>&nbsp;</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>This method attempts to create a new layer on the data source with the indicated name, coordinate system, geometry type. The papszOptions argument can be used to control driver specific creation options. These options are normally documented in the format specific documentation.<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>pszName</em>&nbsp;</td><td>the name for the new layer. This should ideally not match any existing layer on the datasource. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>poSpatialRef</em>&nbsp;</td><td>the coordinate system to use for the new layer, or NULL if no coordinate system is available. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>eGType</em>&nbsp;</td><td>the geometry type for the layer. Use wkbUnknown if there are no constraints on the types geometry to be written. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>papszOptions</em>&nbsp;</td><td>a StringList of name=value options. Options are driver specific.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>NULL is returned on failure, or a new <a class="el" href="classOGRLayer.html">OGRLayer</a> handle on success.</dd></dl><b>Example:</b><p><div class="fragment"><pre class="fragment"><span class="preprocessor">#include "<a class="code" href="ogrsf__frmts_8h.html">ogrsf_frmts.h</a>"</span> <span class="preprocessor">#include "<a class="code" href="cpl__string_8h.html">cpl_string.h</a>"</span>...        <a class="code" href="classOGRLayer.html">OGRLayer</a> *poLayer;        <span class="keywordtype">char</span>     *papszOptions;        <span class="keywordflow">if</span>( !poDS-&gt;<a class="code" href="classOGRDataSource.html#3b7c054c376151e1a1f63861d7239c8b">TestCapability</a>( ODsCreateLayer ) )        {            ...        }        papszOptions = CSLSetNameValue( papszOptions, <span class="stringliteral">"DIM"</span>, <span class="stringliteral">"2"</span> );        poLayer = poDS-&gt;<a class="code" href="classOGRDataSource.html#39cfc6e0ee790506d7638b0dce03c7da">CreateLayer</a>( <span class="stringliteral">"NewLayer"</span>, NULL, wkbUnknown,                                     papszOptions );        CSLDestroy( papszOptions );        <span class="keywordflow">if</span>( poLayer == NULL )        {            ...        }        </pre></div> </div></div><p><a class="anchor" name="82b1e41c460dda4633e3c4dd8f24326e"></a><!-- doxytag: member="OGRDataSource::GetStyleTable" ref="82b1e41c460dda4633e3c4dd8f24326e" args="()" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void OGRDataSource::GetStyleTable           </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>Returns data source style table.<p>This method is the same as the C function OGR_DS_GetStyleTable().<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>pointer to a style table which should not be modified or freed by the caller. </dd></dl></div></div><p><a class="anchor" name="4946597d697db8dd802e20fc49c0c9ea"></a><!-- doxytag: member="OGRDataSource::SetStyleTableDirectly" ref="4946597d697db8dd802e20fc49c0c9ea" args="(OGRStyleTable *poStyleTable)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void OGRDataSource::SetStyleTableDirectly           </td>          <td>(</td>          <td class="paramtype">OGRStyleTable *&nbsp;</td>          <td class="paramname"> <em>poStyleTable</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [inline]</code></td>        </tr>      </table></div><div class="memdoc"><p>Set data source style table.<p>This method operate exactly as <a class="el" href="classOGRDataSource.html#36054cdc7e65827c05d3a27c7290f8d2">OGRDataSource::SetStyleTable()</a> except that it assumes ownership of the passed table.<p>This method is the same as the C function OGR_DS_SetStyleTableDirectly().<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>poStyleTable</em>&nbsp;</td><td>pointer to style table to set </td></tr>  </table></dl></div></div><p><a class="anchor" name="36054cdc7e65827c05d3a27c7290f8d2"></a><!-- doxytag: member="OGRDataSource::SetStyleTable" ref="36054cdc7e65827c05d3a27c7290f8d2" args="(OGRStyleTable *poStyleTable)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void OGRDataSource::SetStyleTable           </td>          <td>(</td>          <td class="paramtype">OGRStyleTable *&nbsp;</td>          <td class="paramname"> <em>poStyleTable</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [inline]</code></td>        </tr>      </table></div><div class="memdoc"><p>Set data source style table.<p>This method operate exactly as <a class="el" href="classOGRDataSource.html#4946597d697db8dd802e20fc49c0c9ea">OGRDataSource::SetStyleTableDirectly()</a> except that it does not assume ownership of the passed table.<p>This method is the same as the C function OGR_DS_SetStyleTable().<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>poStyleTable</em>&nbsp;</td><td>pointer to style table to set </td></tr>  </table></dl></div></div><p><a class="anchor" name="a6acc228db6513784a56ce12334a8c33"></a><!-- doxytag: member="OGRDataSource::ExecuteSQL" ref="a6acc228db6513784a56ce12334a8c33" args="(const char *pszStatement, OGRGeometry *poSpatialFilter, const char *pszDialect)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="classOGRLayer.html">OGRLayer</a> * OGRDataSource::ExecuteSQL           </td>          <td>(</td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszStatement</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td>          <td class="paramname"> <em>poSpatialFilter</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszDialect</em></td><td>&nbsp;</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>

⌨️ 快捷键说明

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