📄 classsfcdatasource.html
字号:
<!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: SFCDataSource 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 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 Pages</span></a></li> </ul></div><div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul></div><h1>SFCDataSource Class Reference</h1><!-- doxytag: class="SFCDataSource" --><code>#include <<a class="el" href="sfcdatasource_8h-source.html">sfcdatasource.h</a>></code><p><a href="classSFCDataSource-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">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classSFCDataSource.html#765d6f7f1daff72f37459f9708cb9916">Reinitialize</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classSFCDataSource.html#3fba04c3e81a920bb2258150b6e11726">GetSFTableCount</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSFCDataSource.html#90a6d8a7838130dc9f258eccfd657651">GetSFTableName</a> (int)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classSFCTable.html">SFCTable</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSFCDataSource.html#e34472e0240150aa59e86b975f128375">CreateSFCTable</a> (const char *pszTablename, <a class="el" href="classOGRGeometry.html">OGRGeometry</a> *poFilterGeometry=NULL, DBPROPOGISENUM eOperator=DBPROP_OGIS_ENVELOPE_INTERSECTS)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSFCDataSource.html#a248cee4e1ee06a9055b612f07ba7db4">GetWKTFromSRSId</a> (int nSRS_ID)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Simplified SFCOM DataSource interface.<p>This class is based on the ATL CDataSource, and adds a convenient way to instantiate an <a class="el" href="classSFCTable.html">SFCTable</a> for a particular table in the data source. This class is intended to include methods for getting a list of spatial tables for the data source, but this hasn't been implemented yet.<p>Questions:<p><ul><li>Do we want to use CPL error handling mechanisms? This would help capture meaningful text messages for errors within the client side API, and make access to IErrorInfo (is that the right name) information easier. Perhaps the client side code should throw exceptions instead?<p></li><li>Should our methods use BSTR or unicode strings instead of regular char?<p></li></ul><p><hr><h2>Member Function Documentation</h2><a class="anchor" name="765d6f7f1daff72f37459f9708cb9916"></a><!-- doxytag: member="SFCDataSource::Reinitialize" ref="765d6f7f1daff72f37459f9708cb9916" args="()" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">void SFCDataSource::Reinitialize </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Reinitialize SFTable list.<p>This method can be called to trigger rebuilding of the list of spatial tables returned by <a class="el" href="classSFCDataSource.html#90a6d8a7838130dc9f258eccfd657651">GetSFTableName()</a>. Otherwise it is built on the first request for SFTables, and cached - not reflecting additions or deletions.<p>The list of spatial tables is intended to be a list of all tables in this data source that have spatial information in them. That is those for which an <a class="el" href="classSFCTable.html">SFCTable</a> would be able to get geometry information from the table. Some data sources may not support any means of returning the list of tables in which case none will be identified. In this case the user would have to enter a table name directly to use with <a class="el" href="classSFCDataSource.html#e34472e0240150aa59e86b975f128375">CreateSFCTable()</a>.<p>This method will try to build the list of simple features tables by traversing the DBSCHEMA_OGIS_FEATURE_TABLES schema rowset. If that doesn't exist, it will traverse the DBSCHEMA_TABLES schema rowset, selecting only those tables with OGIS style geometry columns apparent present. </div></div><p><a class="anchor" name="3fba04c3e81a920bb2258150b6e11726"></a><!-- doxytag: member="SFCDataSource::GetSFTableCount" ref="3fba04c3e81a920bb2258150b6e11726" args="()" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int SFCDataSource::GetSFTableCount </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Get the number of spatial tables.<p>See <a class="el" href="classSFCDataSource.html#765d6f7f1daff72f37459f9708cb9916">Reinitialize()</a> method for details on the spatial table list.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>number of spatial tables. </dd></dl></div></div><p><a class="anchor" name="90a6d8a7838130dc9f258eccfd657651"></a><!-- doxytag: member="SFCDataSource::GetSFTableName" ref="90a6d8a7838130dc9f258eccfd657651" args="(int)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">const char * SFCDataSource::GetSFTableName </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>i</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Get the name of a spatial table.<p>Fetches the name of the requested spatial table. This name is suitable for use with <a class="el" href="classSFCDataSource.html#e34472e0240150aa59e86b975f128375">CreateSFCTable()</a>. See <a class="el" href="classSFCDataSource.html#765d6f7f1daff72f37459f9708cb9916">Reinitialize()</a> method for details on the list of spatial tables.<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>i</em> </td><td>value between 0 and <a class="el" href="classSFCDataSource.html#3fba04c3e81a920bb2258150b6e11726">GetSFTableCount()</a>-1.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>pointer to internal table name. Should not be modified, or freed by the application. </dd></dl></div></div><p><a class="anchor" name="e34472e0240150aa59e86b975f128375"></a><!-- doxytag: member="SFCDataSource::CreateSFCTable" ref="e34472e0240150aa59e86b975f128375" args="(const char *pszTablename, OGRGeometry *poFilterGeometry=NULL, DBPROPOGISENUM eOperator=DBPROP_OGIS_ENVELOPE_INTERSECTS)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classSFCTable.html">SFCTable</a> * SFCDataSource::CreateSFCTable </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszTableName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> * </td> <td class="paramname"> <em>poFilterGeometry</em> = <code>NULL</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">DBPROPOGISENUM </td> <td class="paramname"> <em>eOperator</em> = <code>DBPROP_OGIS_ENVELOPE_INTERSECTS</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>Open a spatial table.<p>This method creates an instance of an <a class="el" href="classSFCTable.html">SFCTable</a> to access a spatial table. On failure NULL is returned; however, there is currently no way to interogate the error that caused the failure.<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>pszTableName</em> </td><td>the name of the spatial table. Generally selected from the list of tables exposed by <a class="el" href="classSFCDataSource.html#90a6d8a7838130dc9f258eccfd657651">GetSFTableName()</a>.</td></tr> <tr><td valign="top"></td><td valign="top"><em>poFilterGeometry</em> </td><td>the geometry to use as a spatial filter, or more often NULL to get all features from the spatial table. (NOT IMPLEMENTED)</td></tr> <tr><td valign="top"></td><td valign="top"><em>eOperator</em> </td><td>One of the geometry operators (DBPROP_OGIS_*) from <a class="el" href="oledbgis_8h-source.html">oledbgis.h</a>. Defaults to DBPROP_ENVELOPE_INTERSECTS.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>a pointer to the new spatial table object, or NULL on failure. </dd></dl></div></div><p><a class="anchor" name="a248cee4e1ee06a9055b612f07ba7db4"></a><!-- doxytag: member="SFCDataSource::GetWKTFromSRSId" ref="a248cee4e1ee06a9055b612f07ba7db4" args="(int nSRS_ID)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">char * SFCDataSource::GetWKTFromSRSId </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>nSRS_ID</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table></div><div class="memdoc"><p>Get WKT format from spatial ref system id.<p>Read the spatial reference system system schema rowset to translate a data source specific SRS ID into it's well known text format equivelent. The returned string should be freed with CoTaskMemFree() when no longer needed.<p>A return value of "Unknown" will indicate that the SRS ID was not successfully translated.<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>nSRS_ID</em> </td><td>the id for the SRS to fetch, as returned from the <a class="el" href="classSFCTable.html#90f7bb0cd4a9bfeb0cbe4c18ac56aed1">SFCTable::GetSpatialRefID()</a> for instance.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>string representation of SRS. </dd></dl></div></div><p><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="sfcdatasource_8h-source.html">sfcdatasource.h</a><li>sfcdatasource.cpp</ul><hr>Generated for GDAL by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1.</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -