GDAL
List of all members
OGRDataSource Class Reference

LEGACY class. More...

#include <ogrsf_frmts.h>

Inheritance diagram for OGRDataSource:
GDALDataset GDALMajorObject

Additional Inherited Members

- Public Member Functions inherited from GDALDataset
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...
 
GDALRasterBandGetRasterBand (int)
 Fetch a band object for a dataset. 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 *pszProjection)
 Set the projection reference string for this dataset. More...
 
virtual CPLErr GetGeoTransform (double *padfTransform)
 Fetch the affine transformation coefficients. More...
 
virtual CPLErr SetGeoTransform (double *padfTransform)
 Set the affine transformation coefficients. More...
 
virtual CPLErr AddBand (GDALDataType eType, char **papszOptions=NULL)
 Add a band to a dataset. More...
 
virtual void * GetInternalHandle (const char *pszHandleName)
 Fetch a format specific internally meaningful handle. More...
 
virtual GDALDriverGetDriver (void)
 Fetch the driver to which this dataset relates. More...
 
virtual char ** GetFileList (void)
 Fetch files forming dataset. More...
 
virtual const char * GetDriverName ()
 Return driver name. More...
 
virtual int GetGCPCount ()
 Get number of GCPs. More...
 
virtual const char * GetGCPProjection ()
 Get output projection for GCPs. More...
 
virtual const GDAL_GCPGetGCPs ()
 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 nFlagsIn)
 Adds a mask band to the dataset. More...
 
virtual GDALAsyncReaderBeginAsyncReader (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 *, GSpacing, GSpacing, GSpacing, GDALRasterIOExtraArg *psExtraArg) CPL_WARN_UNUSED_RESULT
 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 () const
 Return access mode. More...
 
int GetShared () const
 Returns shared flag. More...
 
void MarkAsShared ()
 Mark this dataset as available for sharing.
 
void MarkSuppressOnClose ()
 Set that the dataset must be deleted on close. More...
 
char ** GetOpenOptions ()
 Return open options. More...
 
CPLErr BuildOverviews (const char *, int, int *, int, int *, GDALProgressFunc, void *)
 Build raster overview(s) More...
 
void ReportError (CPLErr eErrClass, CPLErrorNum err_no, const char *fmt,...) CPL_PRINT_FUNC_FORMAT(4
 Emits an error related to a dataset. More...
 
void virtual char ** GetMetadata (const char *pszDomain="") CPL_OVERRIDE
 Fetch metadata. More...
 
virtual CPLErr SetMetadata (char **papszMetadata, const char *pszDomain) CPL_OVERRIDE
 Set metadata. More...
 
virtual const char * GetMetadataItem (const char *pszName, const char *pszDomain) CPL_OVERRIDE
 Fetch single metadata item. More...
 
virtual CPLErr SetMetadataItem (const char *pszName, const char *pszValue, const char *pszDomain) CPL_OVERRIDE
 Set single metadata item. More...
 
virtual char ** GetMetadataDomainList () CPL_OVERRIDE
 Fetch list of metadata domains. More...
 
virtual int GetLayerCount ()
 Get the number of layers in this dataset. More...
 
virtual OGRLayerGetLayer (int iLayer)
 Fetch a layer by index. More...
 
virtual OGRLayerGetLayerByName (const char *)
 Fetch a layer by name. More...
 
virtual OGRErr DeleteLayer (int iLayer)
 Delete the indicated layer from the datasource. More...
 
virtual void ResetReading ()
 Reset feature reading to start on the first feature. More...
 
virtual OGRFeatureGetNextFeature (OGRLayer **ppoBelongingLayer, double *pdfProgressPct, GDALProgressFunc pfnProgress, void *pProgressData)
 Fetch the next available feature from this dataset. More...
 
virtual int TestCapability (const char *)
 Test if capability is available. More...
 
virtual OGRLayerCreateLayer (const char *pszName, OGRSpatialReference *poSpatialRef=NULL, OGRwkbGeometryType eGType=wkbUnknown, char **papszOptions=NULL)
 This method attempts to create a new layer on the dataset with the indicated name, coordinate system, geometry type. More...
 
virtual OGRLayerCopyLayer (OGRLayer *poSrcLayer, const char *pszNewName, char **papszOptions=NULL)
 Duplicate an existing layer. More...
 
virtual OGRStyleTableGetStyleTable ()
 Returns dataset style table. More...
 
virtual void SetStyleTableDirectly (OGRStyleTable *poStyleTable)
 Set dataset style table. More...
 
virtual void SetStyleTable (OGRStyleTable *poStyleTable)
 Set dataset style table. More...
 
virtual OGRLayerExecuteSQL (const char *pszStatement, OGRGeometry *poSpatialFilter, const char *pszDialect)
 Execute an SQL statement against the data store. More...
 
virtual void ReleaseResultSet (OGRLayer *poResultsSet)
 Release results of ExecuteSQL(). More...
 
int GetRefCount () const
 Fetch reference count. More...
 
int GetSummaryRefCount () const
 Fetch reference count of datasource and all owned layers. More...
 
OGRErr Release ()
 Drop a reference to this dataset, and if the reference count drops to one close (destroy) the dataset. More...
 
virtual OGRErr StartTransaction (int bForce=FALSE)
 For datasources which support transactions, StartTransaction creates a `transaction. More...
 
virtual OGRErr CommitTransaction ()
 For datasources which support transactions, CommitTransaction commits a transaction. More...
 
virtual OGRErr RollbackTransaction ()
 For datasources which support transactions, RollbackTransaction will roll back a datasource to its state before the start of the current transaction. More...
 
- Public Member Functions inherited from GDALMajorObject
int GetMOFlags () const
 Returns the GMO_ flags. More...
 
void SetMOFlags (int nFlagsIn)
 Assign GMO_flags. More...
 
virtual const char * GetDescription () const
 Fetch object description. More...
 
virtual void SetDescription (const char *)
 Set object description. More...
 
- Static Public Member Functions inherited from GDALDataset
static GDALDataset ** GetOpenDatasets (int *pnDatasetCount)
 Fetch all open GDAL dataset handles. More...
 
- Protected Member Functions inherited from GDALDataset
virtual int CloseDependentDatasets ()
 Drop references to any other datasets referenced by this dataset. More...
 
virtual OGRLayerICreateLayer (const char *pszName, OGRSpatialReference *poSpatialRef=NULL, OGRwkbGeometryType eGType=wkbUnknown, char **papszOptions=NULL)
 This method attempts to create a new layer on the dataset with the indicated name, coordinate system, geometry type. More...
 
- Protected Member Functions inherited from GDALMajorObject
char ** BuildMetadataDomainList (char **papszList, int bCheckNonEmpty,...) CPL_NULL_TERMINATED
 Helper function for custom implementations of GetMetadataDomainList() More...
 

Detailed Description

LEGACY class.

Use GDALDataset in your new code ! This class may be removed in a later release.

This class represents a data source. A data source potentially consists of many layers (OGRLayer). A data source normally consists of one, or a related set of files, though the name doesn't have to be a real item in the file system.

When an OGRDataSource is destroyed, all it's associated OGRLayers objects are also destroyed.

NOTE: Starting with GDAL 2.0, it is NOT safe to cast the handle of a C function that returns a OGRDataSourceH to a OGRDataSource*. If a C++ object is needed, the handle should be cast to GDALDataset*.

Deprecated:

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

Generated for GDAL by doxygen 1.8.8.