SDTS_AL
|
#include <sdts_al.h>
Public Member Functions | |
int | Open (const char *) |
int | FindLayer (const char *) |
SDTSLayerType | GetLayerType (int) |
int | GetLayerCATDEntry (int) |
SDTSRasterReader * | GetLayerRasterReader (int) |
SDTSIndexedReader * | GetLayerIndexedReader (int) |
SDTS_CATD * | GetCATD () |
SDTS_XREF * | GetXREF () |
DDFField * | GetAttr (SDTSModId *) |
int | GetBounds (double *pdfMinX, double *pdfMinY, double *pdfMaxX, double *pdfMaxY) |
Master class representing an entire SDTS transfer.
This class is used to open the transfer, to get a list of available feature layers, and to instantiate readers for those layers.
int SDTSTransfer::FindLayer | ( | const char * | pszModule | ) |
Fetch the SDTSTransfer layer number corresponding to a module name.
pszModule | the name of the module to search for, such as "PC01". |
Fetch the attribute fields given a particular module/record id.
poModId | an attribute record identifier, normally taken from the aoATID[] array of an SDTSIndexedFeature. |
int SDTSTransfer::GetBounds | ( | double * | pdfMinX, |
double * | pdfMinY, | ||
double * | pdfMaxX, | ||
double * | pdfMaxY | ||
) |
Fetch approximate bounds for a transfer by scanning all point layers and raster layers.
For TVP datasets (where point layers are scanned) the results can, in theory miss some lines that go outside the bounds of the point layers. However, this isn't common since most TVP sets contain a bounding rectangle whose corners will define the most extreme extents.
pdfMinX | western edge of dataset |
pdfMinY | southern edge of dataset |
pdfMaxX | eastern edge of dataset |
pdfMaxY | northern edge of dataset |
|
inline |
Fetch the catalog object for this transfer.
int SDTSTransfer::GetLayerCATDEntry | ( | int | iEntry | ) |
Fetch the CATD module index for a layer. This can be used to fetch details about the layer/module from the SDTS_CATD object, such as its filename, and description.
iEntry | the layer index from 0 to GetLayerCount()-1. |
SDTSIndexedReader * SDTSTransfer::GetLayerIndexedReader | ( | int | iEntry | ) |
Returns a pointer to a reader of the appropriate type to the requested layer.
Notes:
The returned reader remains owned by the SDTSTransfer, and will be destroyed when the SDTSTransfer is destroyed. It should not be destroyed by the application.
If an indexed reader was already created for this layer using GetLayerIndexedReader(), it will be returned instead of creating a new reader. Among other things this means that the returned reader may not be positioned to read from the beginning of the module, and may already have its index filled.
iEntry | the index of the layer to instantiate a reader for. A value between 0 and GetLayerCount()-1. |
SDTSRasterReader * SDTSTransfer::GetLayerRasterReader | ( | int | iEntry | ) |
Instantiate an SDTSRasterReader for the indicated layer.
iEntry | the index of the layer to instantiate a reader for. A value between 0 and GetLayerCount()-1. |
NOTE: The reader returned from GetLayerRasterReader() becomes the responsibility of the caller to delete, and isn't automatically deleted when the SDTSTransfer is destroyed. This method is different from the GetLayerIndexedReader() method in this regard.
SDTSLayerType SDTSTransfer::GetLayerType | ( | int | iEntry | ) |
Fetch type of requested feature layer.
iEntry | the index of the layer to fetch information on. A value from zero to GetLayerCount()-1. |
SLTPoint: A point layer. An SDTSPointReader is returned by SDTSTransfer::GetLayerIndexedReader().
SLTLine: A line layer. An SDTSLineReader is returned by SDTSTransfer::GetLayerIndexedReader().
SLTAttr: An attribute primary or secondary layer. An SDTSAttrReader is returned by SDTSTransfer::GetLayerIndexedReader().
SLTPoly: A polygon layer. An SDTSPolygonReader is returned by SDTSTransfer::GetLayerIndexedReader().
|
inline |
Fetch the external reference object for this transfer.
int SDTSTransfer::Open | ( | const char * | pszFilename | ) |
Open an SDTS transfer, and establish a list of data layers in the transfer.
pszFilename | The name of the CATD file within the transfer. |