MIE::FORMAT_GDAL Class Reference

Base import / export class for GDAL-supported formats. More...

#include <mie/fmtgdal.h>

Inheritance diagram for MIE::FORMAT_GDAL:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~FORMAT_GDAL ()

Protected Member Functions

 FORMAT_GDAL (FORMATTYPE FormatType, MODE Modes, const char *FormatName)
RVC::IMAGE::CELLTYPE GetCellType (GDALDataType datatype) const
RVC::IMAGE::CELLTYPE GetColorCompCellType (GDALDATASET &dataset) const
GDALDataType GetDataType (RVC::IMAGE::CELLTYPE celltype) const

Private Member Functions

virtual JOB_EXPORTv_AllocJobExport (const SETTINGS &settings) const
virtual JOB_IMPORTv_AllocJobImport (OBJTYPEFLAG ObjectType, const SETTINGS &settings) const
virtual SETTINGSv_AllocSettings (MODE mode, OBJTYPEFLAG ObjType=OBJTYPEFLAG_ALL) const
virtual ERRVALUE v_AnalyzeFile (const FILEPATH &source, SETTINGS *settings) const
virtual bool v_CanExport (RVC::OBJTYPE objtype) const
bool v_CanExportToSingleFile (const RVC::OBJITEMLIST &objitems) const
virtual bool v_CanImport (RVC::OBJTYPE objtype) const
ERRVALUE v_Export (const MISTRING &dest, const SETTINGS &settings, const SIMPLE_ARRAY< JOB_EXPORT * > &jobs) const
virtual const char * v_GetDriverName () const =0
virtual int v_GetObjItemList (const MISTRING &source, RVC::OBJITEMLIST &items, const SETTINGS &settings) const
virtual ERRVALUE v_Import (const MISTRING &source, const SETTINGS &settings, const SIMPLE_ARRAY< JOB_IMPORT * > &jobs) const
virtual TESTRESULT v_TestFile (const FILEPATH &filepath) const

Detailed Description

Base import / export class for GDAL-supported formats.

Derived classes must implement v_GetDriverName, v_GetDefaultFileExtn, and v_GetFormatDesc.

Also see convenience class MIE::GDALDATASET if you want to access or modify the original GDAL dataset in your import.


Constructor & Destructor Documentation

virtual MIE::FORMAT_GDAL::~FORMAT_GDAL (  )  [inline, virtual]
MIE::FORMAT_GDAL::FORMAT_GDAL ( FORMATTYPE  FormatType,
MODE  Modes,
const char *  FormatName 
) [protected]

Member Function Documentation

RVC::IMAGE::CELLTYPE MIE::FORMAT_GDAL::GetCellType ( GDALDataType  datatype  )  const [protected]

Get the celltype of a single GDAL raster band's datatype.

RVC::IMAGE::CELLTYPE MIE::FORMAT_GDAL::GetColorCompCellType ( GDALDATASET dataset  )  const [protected]

Get the celltype of a dataset if contains 24-bit RGB or BGR, or 32-bit RGBA, ARGB, CMYB, or BCMY.

GDALDataType MIE::FORMAT_GDAL::GetDataType ( RVC::IMAGE::CELLTYPE  celltype  )  const [protected]

Get the GDAL data type corresponding to an RVC::IMAGE::CELLTYPE.

virtual JOB_EXPORT* MIE::FORMAT_GDAL::v_AllocJobExport ( const SETTINGS settings  )  const [private, virtual]

Allocate a JOB_EXPORT for this format.

Will be temporary during the actual export. Default implementation uses format's m_ObjType to determine which JOB_EXPORT class to allocate. This may not be appropriate for geometric formats.

Reimplemented from MIE::FORMAT.

virtual JOB_IMPORT* MIE::FORMAT_GDAL::v_AllocJobImport ( OBJTYPEFLAG  ObjectType,
const SETTINGS settings 
) const [private, virtual]

Allocate a JOB_EXPORT for this format.

Will be temporary during the actual import Note, the ObjectType parameter is not redundant. In the case of importing a CAD format and then converting to vector, ObjectType will be CAD and settings.ObjTypeSelected will be Vector

Reimplemented from MIE::FORMAT.

virtual SETTINGS* MIE::FORMAT_GDAL::v_AllocSettings ( MODE  mode,
OBJTYPEFLAG  ObjType = OBJTYPEFLAG_ALL 
) const [private, virtual]

Allocate a JOB_IMPORT for this format Default implementation just allocates an MIE::SETTINGS, The optional ObjType parameter allows you to limit the settings to a particular object type.

This is required to keep the SML implementation compatible with previous code.

Reimplemented from MIE::FORMAT.

virtual ERRVALUE MIE::FORMAT_GDAL::v_AnalyzeFile ( const FILEPATH source,
SETTINGS settings 
) const [private, virtual]

Analyze a file and determine "default" import settings.

Deprecated - use v_AnalyzeSource instead of this.

Reimplemented from MIE::FORMAT.

virtual bool MIE::FORMAT_GDAL::v_CanExport ( RVC::OBJTYPE  objtype  )  const [private, virtual]

Default implementation returns true if objtype is a raster and GDAL supports writing to the format.

Reimplemented from MIE::FORMAT.

bool MIE::FORMAT_GDAL::v_CanExportToSingleFile ( const RVC::OBJITEMLIST objects  )  const [private, virtual]

Test multiple objects to see if they can be exported as a unit to a single file.

This is used to determine if the "Export to single file" toggle is enabled. Override this if a format supports multiple objects but has restrictions such as maximum # of objects, must be same size, etc. The default implementation returns true if the format has the FEATURE_NeedMultiSingle feature set.

Reimplemented from MIE::FORMAT.

virtual bool MIE::FORMAT_GDAL::v_CanImport ( RVC::OBJTYPE  objtype  )  const [private, virtual]

Default implementation returns true if objtype is a raster. Should work for all GDAL-supported formats.

Reimplemented from MIE::FORMAT.

ERRVALUE MIE::FORMAT_GDAL::v_Export ( const MISTRING dest,
const SETTINGS settings,
const SIMPLE_ARRAY< JOB_EXPORT * > &  jobs 
) const [private, virtual]

Does the export. Creates external file using driver specified.

Parameters:
jobs each JOB contains a source OBJITEM to be exported

Reimplemented from MIE::FORMAT.

virtual const char* MIE::FORMAT_GDAL::v_GetDriverName (  )  const [private, pure virtual]

Gets the name of the GDAL driver that supports your format.

virtual int MIE::FORMAT_GDAL::v_GetObjItemList ( const MISTRING source,
RVC::OBJITEMLIST items,
const SETTINGS settings 
) const [private, virtual]

Gets the number of bands in the input raster.

Reimplemented from MIE::FORMAT.

virtual ERRVALUE MIE::FORMAT_GDAL::v_Import ( const MISTRING source,
const SETTINGS settings,
const SIMPLE_ARRAY< JOB_IMPORT * > &  jobs 
) const [private, virtual]

Does the import. Default implementation should (!) work for all formats with GDAL drivers.

Reimplemented from MIE::FORMAT.

virtual TESTRESULT MIE::FORMAT_GDAL::v_TestFile ( const FILEPATH filepath  )  const [private, virtual]

Test the file to see if GDAL will read it. Calls v_GetDriverName.

Reimplemented from MIE::FORMAT.


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

Generated on Sun Oct 7 21:36:25 2012 for TNTsdk 2012 by  doxygen 1.6.1