SPATMOD::IMAGE::TARGET_FILE Class Reference

Base for target file. More...

#include <spatmod/imagetargetfile.h>

Inheritance diagram for SPATMOD::IMAGE::TARGET_FILE:
Inheritance graph
[legend]

List of all members.

Classes

class  TILEPARMS
 Parameters for control of output to separate file for each tile. More...

Public Types

enum  GEOFORMATS {
  GEOFORMAT_None = 0x0000, GEOFORMAT_ArcWorld = 0x0001, GEOFORMAT_KML = 0x0002, GEOFORMAT_AUX = 0x0004,
  GEOFORMAT_ALL = 0x00FF, GEOFORMAT_ForceKML = 0x8000
}

Public Member Functions

 TARGET_FILE (STAGE *pInputStage, GEOFORMATS GeoFormats=GEOFORMAT_None)
 TARGET_FILE (STAGE *pInputStage, const FILEPATH &filepath, GEOFORMATS GeoFormats=GEOFORMAT_None)
virtual ~TARGET_FILE ()
void * DetachBuffer ()
const void * GetBuffer () const
INT64 GetBufferSize () const
const FILEPATHGetFilePath () const
GEOFORMATS GetGeoFormats () const
bool IsOneTilePerFile () const
bool QueryGeoFormat (GEOFORMATS GeoFormat, MISTRING &message) const
void SetTileParms (const TILEPARMS &TileParms)

Protected Member Functions

ERRVALUE WriteGeoFormats ()

Private Member Functions

virtual void * v_DetachBuffer ()
virtual ERRVALUE v_FillTileRows (INT32 NumColumns, INT32 NumRows)=0
virtual const void * v_GetBuffer () const
virtual INT64 v_GetBufferSize () const
ERRVALUE v_PushSubSection (const SECTION &SubSection, const BUFFER &buffer)
virtual ERRVALUE v_TileBegin (const FILEPATH &FilePath, const LRECT2D &Extents)=0
virtual ERRVALUE v_TileEnd ()=0
virtual ERRVALUE v_WriteSubSection (const SECTION &SubSection, const BUFFER &buffer)=0

Detailed Description

Base for target file.


Member Enumeration Documentation

Georeference format enumeration.

Enumerator:
GEOFORMAT_None 
GEOFORMAT_ArcWorld 
GEOFORMAT_KML 
GEOFORMAT_AUX 
GEOFORMAT_ALL 
GEOFORMAT_ForceKML 

Force to write KML even if not LatLon georeference.


Constructor & Destructor Documentation

SPATMOD::IMAGE::TARGET_FILE::TARGET_FILE ( STAGE pInputStage,
const FILEPATH filepath,
GEOFORMATS  GeoFormats = GEOFORMAT_None 
)

Construct with specified input stage and path to target file.

Target does not take ownership of input stage.

Parameters:
pInputStage Stage in pipeline to obtain image data from
filepath Path to target file
GeoFormats Georeference formats
SPATMOD::IMAGE::TARGET_FILE::TARGET_FILE ( STAGE pInputStage,
GEOFORMATS  GeoFormats = GEOFORMAT_None 
)

Construct with specified input stage.

Target does not take ownership of input stage.

Parameters:
pInputStage Stage in pipeline to obtain image data from
GeoFormats Georeference formats
virtual SPATMOD::IMAGE::TARGET_FILE::~TARGET_FILE (  )  [virtual]

Destructor.


Member Function Documentation

void* SPATMOD::IMAGE::TARGET_FILE::DetachBuffer (  )  [inline]

Detach memory buffer.

Caller is responsible for freeing buffer.

Returns:
Pointer to buffer or NULL if writing to file.
const void* SPATMOD::IMAGE::TARGET_FILE::GetBuffer (  )  const [inline]

Get pointer to memory buffer.

Returns:
Pointer to buffer or NULL if writing to file.
INT64 SPATMOD::IMAGE::TARGET_FILE::GetBufferSize (  )  const [inline]

Get memory buffer size.

Returns:
Number of bytes in buffer or 0 if no memory buffer used.
const FILEPATH& SPATMOD::IMAGE::TARGET_FILE::GetFilePath (  )  const [inline]

Get path to output file.

GEOFORMATS SPATMOD::IMAGE::TARGET_FILE::GetGeoFormats (  )  const [inline]

Get preferred georeference format.

bool SPATMOD::IMAGE::TARGET_FILE::IsOneTilePerFile (  )  const [inline]

Determine if is to output one tile per file.

bool SPATMOD::IMAGE::TARGET_FILE::QueryGeoFormat ( GEOFORMATS  GeoFormat,
MISTRING message 
) const

Determine if specified georeference format can be written.

Returns:
true if can be written, false if not. May return true for partial support in which case message will contain limitation. If not supported message will contain explanation.
Parameters:
GeoFormat Single GEOFORMAT value to check
message Message string returned containing limitation reason not supported
void SPATMOD::IMAGE::TARGET_FILE::SetTileParms ( const TILEPARMS TileParms  ) 

Set tiling parameters for output of one "file" per tile.

If used, must be called before Initialize().

virtual void* SPATMOD::IMAGE::TARGET_FILE::v_DetachBuffer (  )  [private, virtual]

Detach memory buffer.

Caller is responsible for freeing buffer.

virtual ERRVALUE SPATMOD::IMAGE::TARGET_FILE::v_FillTileRows ( INT32  NumColumns,
INT32  NumRows 
) [private, pure virtual]

Derived class should write null data to the output file for the number of rows specified.

Will only be called when writing one file per tile.

virtual const void* SPATMOD::IMAGE::TARGET_FILE::v_GetBuffer (  )  const [private, virtual]

Get pointer to memory buffer.

Returns:
Pointer to buffer or NULL if writing to file.
virtual INT64 SPATMOD::IMAGE::TARGET_FILE::v_GetBufferSize (  )  const [private, virtual]

Get memory buffer size.

ERRVALUE SPATMOD::IMAGE::TARGET_FILE::v_PushSubSection ( const SECTION SubSection,
const BUFFER buffer 
) [private, virtual]

Final - derived classes do not implement this.

Implements SPATMOD::IMAGE::TARGET.

virtual ERRVALUE SPATMOD::IMAGE::TARGET_FILE::v_TileBegin ( const FILEPATH FilePath,
const LRECT2D Extents 
) [private, pure virtual]

Called only when writing one file per tile.

Derived classes should open file here and do any required preprocessing.

virtual ERRVALUE SPATMOD::IMAGE::TARGET_FILE::v_TileEnd (  )  [private, pure virtual]

Called only when writing one file per tile.

Derived classes should close file here and do any required postprocessing.

virtual ERRVALUE SPATMOD::IMAGE::TARGET_FILE::v_WriteSubSection ( const SECTION SubSection,
const BUFFER buffer 
) [private, pure virtual]

Write a subsection to the output file. Called by v_PushSubSection.

ERRVALUE SPATMOD::IMAGE::TARGET_FILE::WriteGeoFormats (  )  [protected]

Write georeference formats (if available from source).

If no georeference is available from source, no error will be returned. Error will be returned if cannot convert source georeference to current GeoFormat.


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

Generated on Sun Oct 7 21:40:14 2012 for TNTsdk 2012 by  doxygen 1.6.1