#include <sfcdatasource.h>
Public Member Functions | |
void | Reinitialize () |
int | GetSFTableCount () |
const char * | GetSFTableName (int) |
SFCTable * | CreateSFCTable (const char *pszTablename, OGRGeometry *poFilterGeometry=NULL, DBPROPOGISENUM eOperator=DBPROP_OGIS_ENVELOPE_INTERSECTS) |
char * | GetWKTFromSRSId (int nSRS_ID) |
This class is based on the ATL CDataSource, and adds a convenient way to instantiate an SFCTable 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.
Questions:
|
Open a spatial table. This method creates an instance of an SFCTable to access a spatial table. On failure NULL is returned; however, there is currently no way to interogate the error that caused the failure.
|
|
Get the number of spatial tables. See Reinitialize() method for details on the spatial table list.
|
|
Get the name of a spatial table. Fetches the name of the requested spatial table. This name is suitable for use with CreateSFCTable(). See Reinitialize() method for details on the list of spatial tables.
|
|
Get WKT format from spatial ref system id. 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. A return value of "Unknown" will indicate that the SRS ID was not successfully translated.
|
|
Reinitialize SFTable list. This method can be called to trigger rebuilding of the list of spatial tables returned by GetSFTableName(). Otherwise it is built on the first request for SFTables, and cached - not reflecting additions or deletions. 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 SFCTable 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 CreateSFCTable(). 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. |