#include <gdal_priv.h>
Public Member Functions | |
virtual | ~GDALDataset () |
int | GetRasterXSize (void) |
int | GetRasterYSize (void) |
int | GetRasterCount (void) |
GDALRasterBand * | GetRasterBand (int) |
virtual void | FlushCache (void) |
virtual const char * | GetProjectionRef (void) |
virtual CPLErr | SetProjection (const char *) |
virtual CPLErr | GetGeoTransform (double *) |
virtual CPLErr | SetGeoTransform (double *) |
virtual CPLErr | AddBand (GDALDataType eType, char **papszOptions=NULL) |
virtual void * | GetInternalHandle (const char *) |
virtual GDALDriver * | GetDriver (void) |
virtual int | GetGCPCount () |
virtual const char * | GetGCPProjection () |
virtual const GDAL_GCP * | GetGCPs () |
virtual CPLErr | SetGCPs (int nGCPCount, const GDAL_GCP *pasGCPList, const char *pszGCPProjection) |
virtual CPLErr | AdviseRead (int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eDT, int nBandCount, int *panBandList, char **papszOptions) |
CPLErr | RasterIO (GDALRWFlag, int, int, int, int, void *, int, int, GDALDataType, int, int *, int, int, int) |
int | Reference () |
int | Dereference () |
GDALAccess | GetAccess () |
int | GetShared () |
void | MarkAsShared () |
CPLErr | BuildOverviews (const char *, int, int *, int, int *, GDALProgressFunc, void *) |
Static Public Member Functions | |
static GDALDataset ** | GetOpenDatasets (int *pnDatasetCount) |
Protected Member Functions | |
void | RasterInitialize (int, int) |
void | SetBand (int, GDALRasterBand *) |
virtual CPLErr | IBuildOverviews (const char *, int, int *, int, int *, GDALProgressFunc, void *) |
virtual CPLErr | IRasterIO (GDALRWFlag, int, int, int, int, void *, int, int, GDALDataType, int, int *, int, int, int) |
CPLErr | BlockBasedRasterIO (GDALRWFlag, int, int, int, int, void *, int, int, GDALDataType, int, int *, int, int, int) |
void | BlockBasedFlushCache () |
Protected Attributes | |
GDALDriver * | poDriver |
GDALAccess | eAccess |
int | nRasterXSize |
int | nRasterYSize |
int | nBands |
GDALRasterBand ** | papoBands |
int | bForceCachedIO |
int | nRefCount |
int | bShared |
GDALDefaultOverviews | oOvManager |
Friends | |
class | GDALDriver |
class | GDALRasterBand |
GDALDatasetH | GDALOpen (const char *, GDALAccess) |
GDALDatasetH | GDALOpenShared (const char *, GDALAccess) |
Use GDALOpen() or GDALOpenShared() to create a GDALDataset for a named file, or GDALDriver::Create() or GDALDriver::CreateCopy() to create a new dataset.
|
Destroy an open GDALDataset. This is the accepted method of closing a GDAL dataset and deallocating all resources associated with it. Equivelent of the C callable GDALClose(). Except that GDALClose() first decrements the reference count, and then closes only if it has dropped to zero. |
|
Add a band to a dataset. This method will add a new band to the dataset if the underlying format supports this action. Most formats do not. Note that the new GDALRasterBand is not returned. It may be fetched after successful completion of the method by calling GDALDataset::GetRasterBand(GDALDataset::GetRasterCount()-1) as the newest band will always be the last band.
|
|
Advise driver of upcoming read requests. Some GDAL drivers operate more efficiently if they know in advance what set of upcoming read requests will be made. The AdviseRead() method allows an application to notify the driver of the region and bands of interest, and at what resolution the region will be read. Many drivers just ignore the AdviseRead() call, but it can dramatically accelerate access via some drivers.
|
|
Build raster overview(s) If the operation is unsupported for the indicated dataset, then CE_Failure is returned, and CPLGetLastError() will return CPLE_NonSupported. This method is the same as the C function GDALBuildOverviews().
int anOverviewList[3] = { 2, 4, 8 };
poDataset->BuildOverviews( "NEAREST", 3, anOverviewList, 0, NULL, GDALDummyProgress, NULL ); |
|
Subtract one from dataset reference count. The reference is one after instantiation. Generally when the reference count has dropped to zero the dataset may be safely deleted (closed). This method is the same as the C GDALDereferenceDataset() function.
|
|
Flush all write cached data to disk. Any raster (or other GDAL) data written via GDAL calls, but buffered internally will be written to disk. This method is the same as the C function GDALFlushCache(). |
|
Fetch the driver to which this dataset relates. This method is the same as the C GDALGetDatasetDriver() function.
|
|
Get number of GCPs. This method is the same as the C function GDALGetGCPCount().
|
|
Get output projection for GCPs. This method is the same as the C function GDALGetGCPProjection(). The projection string follows the normal rules from GetProjectionRef().
|
|
Fetch GCPs. This method is the same as the C function GDALGetGCPs().
|
|
Fetch the affine transformation coefficients. Fetches the coefficients for transforming between pixel/line (P,L) raster space, and projection coordinates (Xp,Yp) space.
Xp = padfTransform[0] + P*padfTransform[1] + L*padfTransform[2]; Yp = padfTransform[3] + P*padfTransform[4] + L*padfTransform[5]; In a north up image, padfTransform[1] is the pixel width, and padfTransform[5] is the pixel height. The upper left corner of the upper left pixel is at position (padfTransform[0],padfTransform[3]). The default transform is (0,1,0,0,0,1) and should be returned even when a CE_Failure error is returned, such as for formats that don't support transformation to projection coordinates. NOTE: GetGeoTransform() isn't expressive enough to handle the variety of OGC Grid Coverages pixel/line to projection transformation schemes. Eventually this method will be depreciated in favour of a more general scheme. This method does the same thing as the C GDALGetGeoTransform() function.
|
|
Fetch a format specific internally meaningful handle. This method is the same as the C GDALGetInternalHandle() method.
|
|
Fetch all open GDAL dataset handles. This method is the same as the C function GDALGetOpenDatasets().
|
|
Fetch the projection definition string for this dataset. Same as the C function GDALGetProjectionRef(). The returned string defines the projection coordinate system of the image in OpenGIS WKT format. It should be suitable for use with the OGRSpatialReference class. When a projection definition is not available an empty (but not NULL) string is returned.
|
|
Fetch a band object for a dataset. Equivelent of the C function GDALGetRasterBand().
|
|
Fetch the number of raster bands on this dataset. Same as the C function GDALGetRasterCount().
|
|
Fetch raster width in pixels. Equivelent of the C function GDALGetRasterXSize().
|
|
Fetch raster height in pixels. Equivelent of the C function GDALGetRasterYSize().
|
|
Returns shared flag.
|
|
Mark this dataset as available for sharing. |
|
Read/write a region of image data from multiple bands. This method allows reading a region of one or more GDALRasterBands from this dataset into a buffer, or writing data from a buffer into a region of the GDALRasterBands. It automatically takes care of data type translation if the data type (eBufType) of the buffer is different than that of the GDALRasterBand. The method also takes care of image decimation / replication if the buffer size (nBufXSize x nBufYSize) is different than the size of the region being accessed (nXSize x nYSize). The nPixelSpace, nLineSpace and nBandSpace parameters allow reading into or writing from various organization of buffers. For highest performance full resolution data access, read and write on "block boundaries" as returned by GetBlockSize(), or use the ReadBlock() and WriteBlock() methods. This method is the same as the C GDALDatasetRasterIO() function.
|
|
Add one to dataset reference count. The reference is one after instantiation. This method is the same as the C GDALReferenceDataset() function.
|
|
Assign GCPs. This method is the same as the C function GDALSetGCPs(). This method assigns the passed set of GCPs to this dataset, as well as setting their coordinate system. Internally copies are made of the coordinate system and list of points, so the caller remains resposible for deallocating these arguments if appropriate. Most formats do not support setting of GCPs, even foramts that can handle GCPs. These formats will return CE_Failure.
|
|
Set the affine transformation coefficients. See GetGeoTransform() for details on the meaning of the padfTransform coefficients. This method does the same thing as the C GDALSetGeoTransform() function.
|
|
Set the projection reference string for this dataset. The string should be in OGC WKT or PROJ.4 format. An error may occur because of incorrectly specified projection strings, because the dataset is not writable, or because the dataset does not support the indicated projection. Many formats do not support writing projections. This method is the same as the C GDALSetProjection() function.
|
|
Open a raster file as a GDALDataset. This function works the same as GDALOpen(), but allows the sharing of GDALDataset handles for a dataset with other callers to GDALOpenShared(). In particular, GDALOpenShared() will first consult it's list of currently open and shared GDALDataset's, and if the GetDescription() name for one exactly matches the pszFilename passed to GDALOpenShared() it
|