SDTSTransfer Class Reference

#include <sdts_al.h>

List of all members.

Public Member Functions

int Open (const char *)
int FindLayer (const char *)
SDTSLayerType GetLayerType (int)
int GetLayerCATDEntry (int)
SDTSRasterReaderGetLayerRasterReader (int)
SDTSIndexedReaderGetLayerIndexedReader (int)
SDTS_CATDGetCATD ()
SDTS_XREFGetXREF ()
DDFFieldGetAttr (SDTSModId *)
int GetBounds (double *pdfMinX, double *pdfMinY, double *pdfMaxX, double *pdfMaxY)

Detailed Description

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.


Member Function Documentation

int SDTSTransfer::FindLayer ( const char *  pszModule  ) 

Fetch the SDTSTransfer layer number corresponding to a module name.

Parameters:
pszModule the name of the module to search for, such as "PC01".
Returns:
the layer number (between 0 and GetLayerCount()-1 corresponding to the module, or -1 if it doesn't correspond to a layer.
DDFField * SDTSTransfer::GetAttr ( SDTSModId poModId  ) 

Fetch the attribute fields given a particular module/record id.

Parameters:
poModId an attribute record identifer, normally taken from the aoATID[] array of an SDTSIndexedFeature.
Returns:
a pointer to the DDFField containing the user attribute values as subfields.
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.

Parameters:
pdfMinX western edge of dataset
pdfMinY southern edge of dataset
pdfMaxX eastern edge of dataset
pdfMaxY northern edge of dataset
Returns:
TRUE if success, or FALSE on a failure.
SDTS_CATD* SDTSTransfer::GetCATD (  )  [inline]

Fetch the catalog object for this transfer.

Returns:
pointer to the internally managed SDTS_CATD for the 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 it's filename, and description.

Parameters:
iEntry the layer index from 0 to GetLayerCount()-1.
Returns:
the module index suitable for use with the various SDTS_CATD methods.
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. Amoung other things this means that the returned reader may not be positioned to read from the beginning of the module, and may already have it's index filled.

  • The returned reader will be of a type appropriate to the layer. See SDTSTransfer::GetLayerType() to see what reader classes correspond to what layer types, so it can be cast accordingly (if necessary).

Parameters:
iEntry the index of the layer to instantiate a reader for. A value between 0 and GetLayerCount()-1.
Returns:
a pointer to an appropriate reader or NULL if the method fails.
SDTSRasterReader * SDTSTransfer::GetLayerRasterReader ( int  iEntry  ) 

Instantiate an SDTSRasterReader for the indicated layer.

Parameters:
iEntry the index of the layer to instantiate a reader for. A value between 0 and GetLayerCount()-1.
Returns:
a pointer to a new SDTSRasterReader object, or NULL if the method fails.

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.

Parameters:
iEntry the index of the layer to fetch information on. A value from zero to GetLayerCount()-1.
Returns:
the layer type.
SDTS_XREF* SDTSTransfer::GetXREF (  )  [inline]

Fetch the external reference object for this transfer.

Returns:
pointer to the internally managed SDTS_XREF for the transfer.
int SDTSTransfer::Open ( const char *  pszFilename  ) 

Open an SDTS transfer, and establish a list of data layers in the transfer.

Parameters:
pszFilename The name of the CATD file within the transfer.
Returns:
TRUE if the open success, or FALSE if it fails.

The documentation for this class was generated from the following files:

Generated on 2 Aug 2014 for SDTS_AL by  doxygen 1.6.1