GDALDriver Class Reference

#include <gdal_priv.h>

List of all members.

Public Member Functions

GDALDatasetCreate (const char *pszName, int nXSize, int nYSize, int nBands, GDALDataType eType, char **papszOptions)
CPLErr Delete (const char *pszName)
GDALDatasetCreateCopy (const char *, GDALDataset *, int, char **, GDALProgressFunc pfnProgress, void *pProgressData)

Public Attributes

GDALDataset *(* pfnOpen )(GDALOpenInfo *)
GDALDataset *(* pfnCreate )(const char *pszName, int nXSize, int nYSize, int nBands, GDALDataType eType, char **papszOptions)
CPLErr(* pfnDelete )(const char *pszName)
GDALDataset *(* pfnCreateCopy )(const char *, GDALDataset *, int, char **, GDALProgressFunc pfnProgress, void *pProgressData)
void * pDriverData
void(* pfnUnloadDriver )(GDALDriver *)


Detailed Description

An instance of this class is created for each supported format, and manages information about the format.

This roughly corresponds to a file format, though some drivers may be gateways to many formats through a secondary multi-library.


Member Function Documentation

GDALDataset * GDALDriver::Create const char *  pszFilename,
int  nXSize,
int  nYSize,
int  nBands,
GDALDataType  eType,
char **  papszParmList
 

Create a new dataset with this driver.

What argument values are legal for particular drivers is driver specific, and there is no way to query in advance to establish legal values.

Equivelent of the C function GDALCreate().

Parameters:
pszFilename the name of the dataset to create.
nXSize width of created raster in pixels.
nYSize height of created raster in pixels.
nBands number of bands.
eType type of raster.
papszParmList list of driver specific control parameters.
Returns:
NULL on failure, or a new GDALDataset.

GDALDataset * GDALDriver::CreateCopy const char *  pszFilename,
GDALDataset poSrcDS,
int  bStrict,
char **  papszOptions,
GDALProgressFunc  pfnProgress,
void *  pProgressData
 

Create a copy of a dataset.

This method will attempt to create a copy of a raster dataset with the indicated filename, and in this drivers format. Band number, size, type, projection, geotransform and so forth are all to be copied from the provided template dataset.

Note that many sequential write once formats (such as JPEG and PNG) don't implement the Create() method but do implement this CreateCopy() method. If the driver doesn't implement CreateCopy(), but does implement Create() then the default CreateCopy() mechanism built on calling Create() will be used.

It is intended that CreateCopy() would often be used with a source dataset which is a virtual dataset allowing configuration of band types, and other information without actually duplicating raster data. This virtual dataset format hasn't yet been implemented at the time of this documentation being written.

Parameters:
pszFilename the name for the new dataset.
poSrcDS the dataset being duplicated.
bStrict TRUE if the copy must be strictly equivelent, or more normally FALSE indicating that the copy may adapt as needed for the output format.
papszOptions additional format dependent options controlling creation of the output file.
pfnProgress a function to be used to report progress of the copy.
pProgressData application data passed into progress function.
Returns:
a pointer to the newly created dataset (may be read-only access).

CPLErr GDALDriver::Delete const char *  pszFilename  ) 
 

Delete named dataset.

The driver will attempt to delete the named dataset in a driver specific fashion. Full featured drivers will delete all associated files, database objects, or whatever is appropriate. The default behaviour when no driver specific behaviour is provided is to attempt to delete the passed name as a single file.

It is unwise to have open dataset handles on this dataset when it is deleted.

Equivelent of the C function GDALDeleteDataset().

Parameters:
pszFilename name of dataset to delete.
Returns:
CE_None on success, or CE_Failure if the operation fails.


The documentation for this class was generated from the following files:
Generated on Mon Jan 9 18:03:35 2006 for GDAL by  doxygen 1.4.6