#include <sfctable.h>
Public Member Functions | |
void | SetTableName (const char *) |
const char * | GetTableName () |
int | ReadSchemaInfo (CDataSource *, CSession *=NULL) |
void | ReleaseIUnknowns () |
int | GetSpatialRefID () |
int | HasGeometry () |
int | GetGeometryType () |
BYTE * | GetWKBGeometry (int *pnSize) |
OGRGeometry * | GetOGRGeometry () |
This class is intended to simplify access to spatial rowsets, and to centralize all the rules for selecting geometry columns, getting the spatial reference system of a rowset, and special feature access short cuts with selected providers. It is based on the ATL CTable class with a dynamic accessor.
|
Fetch the geometry type of this table. This method returns the well known binary type of the geometry in this table. This integer can be cast to the type OGRwkbGeometryType in order to use symbolic constants. The intent is that all objects in this table would be of the returned class, or a derived class. It will generally be zero (wkbUnknown) if nothing is known about the geometry types in the table. Zero (wkbUnknown) will be returned if there is no column info schema rowset (from which this value is normally extracted).
|
|
Fetch the OGRGeometry for this record. The reading of the BLOB column, and translation into an OGRGeometry subclass is handled automatically. The returned object becomes the responsibility of the caller and should be destroyed with delete.
|
|
Fetch the spatial reference system id of this table. This method returns the id of the spatial reference system for this table. All geometries in this table should have this spatial reference system. The SFCDataSource::GetWKTFromSRSId() method can be used to transform this id into a useful form.
|
|
Get the name of this rowsets table.
|
|
Fetch geometry binary column binary data. Note that the returned pointer is to an internal buffer, and will be invalidated by the next record read operation. The data should not be freed or modified.
|
|
Does this table have geometry?
|
|
Read required schema rowset information. This method is normally called by SFCDataSource::CreateSFCTable(), but if the SFCTable is created by another means, it is necessary so that the SFCTable can get information from the schema rowsets about the geometry column, SRS and so forth. If an SFCTable is instantiated wihtout this method ever being called a number of the OpenGIS related aspects of the table will not be operational.
|
|
Release any IUnknowns in current record. It is very important that this be called once, and only once for each record read on an SFCTable if there may be IUnknowns (generally ISequentialStreams for the geometry column). Unfortunately, the CRowset::ReleaseRows() doesn't take care of this itself. |
|
Set the table name. This is primarily needed if the SFCTable is created by means other than SFCDataSource::CreateSFCTable(). The table name is needed to collect information from the ogis columns schema rowset.
|