GDAL
|
Public Member Functions | |
virtual char ** | GetMetadataDomainList () |
Fetch list of metadata domains. More... | |
virtual char ** | GetMetadata (const char *pszDomain) |
Fetch metadata. More... | |
virtual CPLErr | SetMetadata (char **papszMetadata, const char *pszDomain) |
Set metadata. More... | |
virtual const char * | GetMetadataItem (const char *pszName, const char *pszDomain) |
Fetch single metadata item. More... | |
virtual CPLErr | SetMetadataItem (const char *pszName, const char *pszValue, const char *pszDomain) |
Set single metadata item. More... | |
virtual void | FlushCache (void) |
Flush all write cached data to disk. More... | |
virtual const char * | GetProjectionRef (void) |
Fetch the projection definition string for this dataset. More... | |
virtual CPLErr | SetProjection (const char *) |
Set the projection reference string for this dataset. More... | |
virtual CPLErr | GetGeoTransform (double *) |
Fetch the affine transformation coefficients. More... | |
virtual CPLErr | SetGeoTransform (double *) |
Set the affine transformation coefficients. More... | |
virtual void * | GetInternalHandle (const char *) |
Fetch a format specific internally meaningful handle. More... | |
virtual GDALDriver * | GetDriver (void) |
Fetch the driver to which this dataset relates. More... | |
virtual char ** | GetFileList (void) |
Fetch files forming dataset. More... | |
virtual int | GetGCPCount () |
Get number of GCPs. More... | |
virtual const char * | GetGCPProjection () |
Get output projection for GCPs. More... | |
virtual const GDAL_GCP * | GetGCPs () |
Fetch GCPs. More... | |
virtual CPLErr | SetGCPs (int nGCPCount, const GDAL_GCP *pasGCPList, const char *pszGCPProjection) |
Assign GCPs. More... | |
virtual CPLErr | AdviseRead (int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eDT, int nBandCount, int *panBandList, char **papszOptions) |
Advise driver of upcoming read requests. More... | |
virtual CPLErr | CreateMaskBand (int nFlags) |
Adds a mask band to the dataset. More... | |
![]() | |
virtual | ~GDALDataset () |
Destroy an open GDALDataset. More... | |
int | GetRasterXSize (void) |
Fetch raster width in pixels. More... | |
int | GetRasterYSize (void) |
Fetch raster height in pixels. More... | |
int | GetRasterCount (void) |
Fetch the number of raster bands on this dataset. More... | |
GDALRasterBand * | GetRasterBand (int) |
Fetch a band object for a dataset. More... | |
virtual CPLErr | AddBand (GDALDataType eType, char **papszOptions=NULL) |
Add a band to a dataset. More... | |
virtual GDALAsyncReader * | BeginAsyncReader (int nXOff, int nYOff, int nXSize, int nYSize, void *pBuf, int nBufXSize, int nBufYSize, GDALDataType eBufType, int nBandCount, int *panBandMap, int nPixelSpace, int nLineSpace, int nBandSpace, char **papszOptions) |
Sets up an asynchronous data request. More... | |
virtual void | EndAsyncReader (GDALAsyncReader *) |
End asynchronous request. More... | |
CPLErr | RasterIO (GDALRWFlag, int, int, int, int, void *, int, int, GDALDataType, int, int *, int, int, int) |
Read/write a region of image data from multiple bands. More... | |
int | Reference () |
Add one to dataset reference count. More... | |
int | Dereference () |
Subtract one from dataset reference count. More... | |
GDALAccess | GetAccess () |
int | GetShared () |
Returns shared flag. More... | |
void | MarkAsShared () |
Mark this dataset as available for sharing. | |
CPLErr | BuildOverviews (const char *, int, int *, int, int *, GDALProgressFunc, void *) |
Build raster overview(s) More... | |
void | ReportError (CPLErr eErrClass, int err_no, const char *fmt,...) CPL_PRINT_FUNC_FORMAT(4 |
Emits an error related to a dataset. More... | |
![]() | |
int | GetMOFlags () |
void | SetMOFlags (int nFlags) |
virtual const char * | GetDescription () const |
Fetch object description. More... | |
virtual void | SetDescription (const char *) |
Set object description. More... | |
Protected Member Functions | |
virtual GDALDataset * | RefUnderlyingDataset ()=0 |
virtual void | UnrefUnderlyingDataset (GDALDataset *poUnderlyingDataset) |
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) |
![]() | |
void | RasterInitialize (int, int) |
void | SetBand (int, GDALRasterBand *) |
CPLErr | BlockBasedRasterIO (GDALRWFlag, int, int, int, int, void *, int, int, GDALDataType, int, int *, int, int, int) |
void | BlockBasedFlushCache () |
CPLErr | ValidateRasterIOOrAdviseReadParameters (const char *pszCallingFunc, int *pbStopProcessingOnCENone, int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, int nBandCount, int *panBandMap) |
virtual int | CloseDependentDatasets () |
Drop references to any other datasets referenced by this dataset. More... | |
![]() | |
char ** | BuildMetadataDomainList (char **papszList, int bCheckNonEmpty,...) CPL_NULL_TERMINATED |
Helper function for custom implementations of GetMetadataDomainList() More... | |
Additional Inherited Members | |
![]() | |
static GDALDataset ** | GetOpenDatasets (int *pnDatasetCount) |
Fetch all open GDAL dataset handles. More... | |
![]() | |
GDALDriver * | poDriver |
GDALAccess | eAccess |
int | nRasterXSize |
int | nRasterYSize |
int | nBands |
GDALRasterBand ** | papoBands |
int | bForceCachedIO |
int | nRefCount |
int | bShared |
GDALDefaultOverviews | oOvManager |
![]() | |
int | nFlags |
CPLString | sDescription |
GDALMultiDomainMetadata | oMDMD |
|
virtual |
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.
nXOff | The pixel offset to the top left corner of the region of the band to be accessed. This would be zero to start from the left side. |
nYOff | The line offset to the top left corner of the region of the band to be accessed. This would be zero to start from the top. |
nXSize | The width of the region of the band to be accessed in pixels. |
nYSize | The height of the region of the band to be accessed in lines. |
nBufXSize | the width of the buffer image into which the desired region is to be read, or from which it is to be written. |
nBufYSize | the height of the buffer image into which the desired region is to be read, or from which it is to be written. |
eBufType | the type of the pixel values in the pData data buffer. The pixel values will automatically be translated to/from the GDALRasterBand data type as needed. |
nBandCount | the number of bands being read or written. |
panBandMap | the list of nBandCount band numbers being read/written. Note band numbers are 1 based. This may be NULL to select the first nBandCount bands. |
papszOptions | a list of name=value strings with special control options. Normally this is NULL. |
Reimplemented from GDALDataset.
|
virtual |
Adds a mask band to the dataset.
The default implementation of the CreateMaskBand() method is implemented based on similar rules to the .ovr handling implemented using the GDALDefaultOverviews object. A TIFF file with the extension .msk will be created with the same basename as the original file, and it will have one band. The mask images will be deflate compressed tiled images with the same block size as the original image if possible.
Note that if you got a mask band with a previous call to GetMaskBand(), it might be invalidated by CreateMaskBand(). So you have to call GetMaskBand() again.
nFlags | ignored. GMF_PER_DATASET will be assumed. |
Reimplemented from GDALDataset.
|
virtual |
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.
Using this method does not prevent use from calling GDALClose() to properly close a dataset and ensure that important data not addressed by FlushCache() is written in the file.
This method is the same as the C function GDALFlushCache().
Reimplemented from GDALDataset.
|
virtual |
Fetch the driver to which this dataset relates.
This method is the same as the C GDALGetDatasetDriver() function.
Reimplemented from GDALDataset.
|
virtual |
Fetch files forming dataset.
Returns a list of files believed to be part of this dataset. If it returns an empty list of files it means there is believed to be no local file system files associated with the dataset (for instance a virtual dataset). The returned file list is owned by the caller and should be deallocated with CSLDestroy().
The returned filenames will normally be relative or absolute paths depending on the path used to originally open the dataset. The strings will be UTF-8 encoded.
This method is the same as the C GDALGetFileList() function.
Reimplemented from GDALDataset.
|
virtual |
Get number of GCPs.
This method is the same as the C function GDALGetGCPCount().
Reimplemented from GDALDataset.
|
virtual |
Get output projection for GCPs.
This method is the same as the C function GDALGetGCPProjection().
The projection string follows the normal rules from GetProjectionRef().
Reimplemented from GDALDataset.
Reimplemented in GDALProxyPoolDataset.
|
virtual |
Fetch GCPs.
This method is the same as the C function GDALGetGCPs().
Reimplemented from GDALDataset.
Reimplemented in GDALProxyPoolDataset.
|
virtual |
Fetch the affine transformation coefficients.
Fetches the coefficients for transforming between pixel/line (P,L) raster space, and projection coordinates (Xp,Yp) space.
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.
This method does the same thing as the C GDALGetGeoTransform() function.
padfTransform | an existing six double buffer into which the transformation will be placed. |
Reimplemented from GDALDataset.
Reimplemented in GDALProxyPoolDataset.
|
virtual |
Fetch a format specific internally meaningful handle.
This method is the same as the C GDALGetInternalHandle() method.
pszHandleName | the handle name desired. The meaningful names will be specific to the file format. |
Reimplemented from GDALDataset.
Reimplemented in GDALProxyPoolDataset.
|
virtual |
Fetch metadata.
The returned string list is owned by the object, and may change at any time. It is formated as a "Name=value" list with the last pointer value being NULL. Use the the CPL StringList functions such as CSLFetchNameValue() to manipulate it.
Note that relatively few formats return any metadata at this time.
This method does the same thing as the C function GDALGetMetadata().
pszDomain | the domain of interest. Use "" or NULL for the default domain. |
Reimplemented from GDALMajorObject.
Reimplemented in GDALProxyPoolDataset.
|
virtual |
Fetch list of metadata domains.
The returned string list is the list of (non-empty) metadata domains.
This method does the same thing as the C function GDALGetMetadataDomainList().
Reimplemented from GDALMajorObject.
|
virtual |
Fetch single metadata item.
The C function GDALGetMetadataItem() does the same thing as this method.
pszName | the key for the metadata item to fetch. |
pszDomain | the domain to fetch for, use NULL for the default domain. |
Reimplemented from GDALMajorObject.
Reimplemented in GDALProxyPoolDataset.
|
virtual |
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.
Reimplemented from GDALDataset.
Reimplemented in GDALProxyPoolDataset.
|
virtual |
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 responsible for deallocating these arguments if appropriate.
Most formats do not support setting of GCPs, even formats that can handle GCPs. These formats will return CE_Failure.
nGCPCount | number of GCPs being assigned. |
pasGCPList | array of GCP structures being assign (nGCPCount in array). |
pszGCPProjection | the new OGC WKT coordinate system to assign for the GCP output coordinates. This parameter should be "" if no output coordinate system is known. |
Reimplemented from GDALDataset.
|
virtual |
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.
padfTransform | a six double buffer containing the transformation coefficients to be written with the dataset. |
Reimplemented from GDALDataset.
Reimplemented in GDALProxyPoolDataset.
|
virtual |
Set metadata.
The C function GDALSetMetadata() does the same thing as this method.
papszMetadataIn | the metadata in name=value string list format to apply. |
pszDomain | the domain of interest. Use "" or NULL for the default domain. |
Reimplemented from GDALMajorObject.
|
virtual |
Set single metadata item.
The C function GDALSetMetadataItem() does the same thing as this method.
pszName | the key for the metadata item to fetch. |
pszValue | the value to assign to the key. |
pszDomain | the domain to set within, use NULL for the default domain. |
Reimplemented from GDALMajorObject.
|
virtual |
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.
pszProjection | projection reference string. |
Reimplemented from GDALDataset.
Reimplemented in GDALProxyPoolDataset.