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

📄 classogrlayer.html

📁 gdal库的学习文档
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!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: OGRLayer 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>OGRLayer Class Reference</h1><!-- doxytag: class="OGRLayer" --><code>#include &lt;<a class="el" href="ogrsf__frmts_8h-source.html">ogrsf_frmts.h</a>&gt;</code><p><a href="classOGRLayer-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">virtual <a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#dc3735e444204d46f517eec251712f4d">GetSpatialFilter</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="classOGRLayer.html#0b4ab45cf97cbc470f0d60474d3e4169">SetSpatialFilter</a> (<a class="el" href="classOGRGeometry.html">OGRGeometry</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="classOGRLayer.html#cd16bcdb3e8f720003fb24cd68f25460">SetSpatialFilterRect</a> (double dfMinX, double dfMinY, double dfMaxX, double dfMaxY)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#cb2c6cc5fa3577df5be538284c1b0dde">SetAttributeFilter</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="classOGRLayer.html#ad0f2cd7f0587584b8f382c6a913583c">ResetReading</a> ()=0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classOGRFeature.html">OGRFeature</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#47d21ff33b32d14fa4e9885b9edecad6">GetNextFeature</a> ()=0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#e3b6234d6077a18a19eddaf7e75ff5e1">SetNextByIndex</a> (long nIndex)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classOGRFeature.html">OGRFeature</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#cb7625383f161e5a04aeea2173dce411">GetFeature</a> (long nFID)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#681139bfd585b74d7218e51a32144283">SetFeature</a> (<a class="el" href="classOGRFeature.html">OGRFeature</a> *poFeature)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#aa1e32016f481596a55e1d988a15a067">CreateFeature</a> (<a class="el" href="classOGRFeature.html">OGRFeature</a> *poFeature)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#7e3d454d54a615a1b4359628bb6e7674">DeleteFeature</a> (long nFID)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classOGRFeatureDefn.html">OGRFeatureDefn</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#80473bcfd11341e70dd35bebe94026cf">GetLayerDefn</a> ()=0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classOGRSpatialReference.html">OGRSpatialReference</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#75c06b4993f8eb76b569f37365cd19ab">GetSpatialRef</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#74c796d4ce712e9a78df6042eeb8a91a">GetFeatureCount</a> (int bForce=TRUE)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#3be658ddb5b33d1ed95c31286774bbd2">GetExtent</a> (<a class="el" href="classOGREnvelope.html">OGREnvelope</a> *psExtent, int bForce=TRUE)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#eedbda1a62f9b89b8e5f24332cf22286">TestCapability</a> (const char *)=0</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="classOGRLayer.html#143b0d2c48bc0adf3a19d1f51e76b8ba">GetInfo</a> (const char *)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#00b1376a1eabb1298ef278f92f6d84be">CreateField</a> (<a class="el" href="classOGRFieldDefn.html">OGRFieldDefn</a> *poField, int bApproxOK=TRUE)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#ebb07284c734e485d8611b7c8599254f">SyncToDisk</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">OGRStyleTable *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#265ddcd701c1d29cb959aae97dda1af4">GetStyleTable</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#2687d4312c044bb3a20bd13974ba8905">SetStyleTableDirectly</a> (OGRStyleTable *poStyleTable)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#33fa0802c0686fb0e6ca6337e11cd7d5">SetStyleTable</a> (OGRStyleTable *poStyleTable)</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="classOGRLayer.html#f0cb9a05310d7b17d9dfec9e83a18e61">GetFIDColumn</a> ()</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="classOGRLayer.html#f68036c23622c954ce3a91861f22b724">GetGeometryColumn</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#e783de2e9ee2629e6bf27fd3b8622fb5">Reference</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#2271d53f75d4f6ff2f4a8aeb71e825d6">Dereference</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRLayer.html#df3cea24856572302ae11ed97ca33375">GetRefCount</a> () const</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This class represents a layer of simple features, with access methods. <p><hr><h2>Member Function Documentation</h2><a class="anchor" name="dc3735e444204d46f517eec251712f4d"></a><!-- doxytag: member="OGRLayer::GetSpatialFilter" ref="dc3735e444204d46f517eec251712f4d" args="()" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * OGRLayer::GetSpatialFilter           </td>          <td>(</td>          <td class="paramname">          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>This method returns the current spatial filter for this layer.<p>The returned pointer is to an internally owned object, and should not be altered or deleted by the caller.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#36d61f311c9f8c172ad118659358c60a">OGR_L_GetSpatialFilter()</a>.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>spatial filter geometry. </dd></dl></div></div><p><a class="anchor" name="0b4ab45cf97cbc470f0d60474d3e4169"></a><!-- doxytag: member="OGRLayer::SetSpatialFilter" ref="0b4ab45cf97cbc470f0d60474d3e4169" args="(OGRGeometry *)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void OGRLayer::SetSpatialFilter           </td>          <td>(</td>          <td class="paramtype"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td>          <td class="paramname"> <em>poFilter</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>Set a new spatial filter.<p>This method set the geometry to be used as a spatial filter when fetching features via the <a class="el" href="classOGRLayer.html#47d21ff33b32d14fa4e9885b9edecad6">GetNextFeature()</a> method. Only features that geometrically intersect the filter geometry will be returned.<p>Currently this test is may be inaccurately implemented, but it is guaranteed that all features who's envelope (as returned by <a class="el" href="classOGRGeometry.html#a3d42b06ae6f7bbef6d1a2886da8d398">OGRGeometry::getEnvelope()</a>) overlaps the envelope of the spatial filter will be returned. This can result in more shapes being returned that should strictly be the case.<p>This method makes an internal copy of the passed geometry. The passed geometry remains the responsibility of the caller, and may be safely destroyed.<p>For the time being the passed filter geometry should be in the same SRS as the layer (as returned by <a class="el" href="classOGRLayer.html#75c06b4993f8eb76b569f37365cd19ab">OGRLayer::GetSpatialRef()</a>). In the future this may be generalized.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#678d1735bc82533614ac005691d1138c">OGR_L_SetSpatialFilter()</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>poFilter</em>&nbsp;</td><td>the geometry to use as a filtering region. NULL may be passed indicating that the current spatial filter should be cleared, but no new one instituted. </td></tr>  </table></dl></div></div><p><a class="anchor" name="cd16bcdb3e8f720003fb24cd68f25460"></a><!-- doxytag: member="OGRLayer::SetSpatialFilterRect" ref="cd16bcdb3e8f720003fb24cd68f25460" args="(double dfMinX, double dfMinY, double dfMaxX, double dfMaxY)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void OGRLayer::SetSpatialFilterRect           </td>          <td>(</td>          <td class="paramtype">double&nbsp;</td>          <td class="paramname"> <em>dfMinX</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">double&nbsp;</td>          <td class="paramname"> <em>dfMinY</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">double&nbsp;</td>          <td class="paramname"> <em>dfMaxX</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">double&nbsp;</td>          <td class="paramname"> <em>dfMaxY</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>Set a new rectangular spatial filter.<p>This method set rectangle to be used as a spatial filter when fetching features via the <a class="el" href="classOGRLayer.html#47d21ff33b32d14fa4e9885b9edecad6">GetNextFeature()</a> method. Only features that geometrically intersect the given rectangle will be returned.<p>The x/y values should be in the same coordinate system as the layer as a whole (as returned by <a class="el" href="classOGRLayer.html#75c06b4993f8eb76b569f37365cd19ab">OGRLayer::GetSpatialRef()</a>). Internally this method is normally implemented as creating a 5 vertex closed rectangular polygon and passing it to <a class="el" href="classOGRLayer.html#0b4ab45cf97cbc470f0d60474d3e4169">OGRLayer::SetSpatialFilter()</a>. It exists as a convenience.<p>The only way to clear a spatial filter set with this method is to call OGRLayer::SetSpatialFilter(NULL).<p>This method is the same as the C function OGR_L_SetSpatialFilterRect().<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>dfMinX</em>&nbsp;</td><td>the minimum X coordinate for the rectangular region. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>dfMinY</em>&nbsp;</td><td>the minimum Y coordinate for the rectangular region. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>dfMaxX</em>&nbsp;</td><td>the maximum X coordinate for the rectangular region. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>dfMaxY</em>&nbsp;</td><td>the maximum Y coordinate for the rectangular region. </td></tr>  </table></dl></div></div><p><a class="anchor" name="cb2c6cc5fa3577df5be538284c1b0dde"></a><!-- doxytag: member="OGRLayer::SetAttributeFilter" ref="cb2c6cc5fa3577df5be538284c1b0dde" args="(const char *)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">OGRErr OGRLayer::SetAttributeFilter           </td>          <td>(</td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszQuery</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"><code> [virtual]</code></td>        </tr>      </table></div><div class="memdoc"><p>Set a new attribute query.<p>This method sets the attribute query string to be used when fetching features via the <a class="el" href="classOGRLayer.html#47d21ff33b32d14fa4e9885b9edecad6">GetNextFeature()</a> method. Only features for which the query evaluates as true will be returned.<p>The query string should be in the format of an SQL WHERE clause. For instance "population &gt; 1000000 and population &lt; 5000000" where population is an attribute in the layer. The query format is a restricted form of SQL WHERE clause as defined "eq_format=restricted_where" about half way through this document:<p><a href="http://ogdi.sourceforge.net/prop/6.2.CapabilitiesMetadata.html">http://ogdi.sourceforge.net/prop/6.2.CapabilitiesMetadata.html</a><p>Note that installing a query string will generally result in resetting the current reading position (ala <a class="el" href="classOGRLayer.html#ad0f2cd7f0587584b8f382c6a913583c">ResetReading()</a>).<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#4000d426bf26ad7cc7d4012634c93f09">OGR_L_SetAttributeFilter()</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>pszQuery</em>&nbsp;</td><td>query in restricted SQL WHERE format, or NULL to clear the current query.</td></tr>  </table></dl>

⌨️ 快捷键说明

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