Package osgeo :: Module gdal :: Class Dataset |
[hide private]
[frames] | no frames]

# Class Dataset

source code

Proxy of C++ GDALDatasetShadow class

Instance Methods | [hide private]
__init__(self, *args, **kwargs) | source code
__repr__(self) | source code
Driver |
GetDriver(self) | source code
GetRasterBand(self, *args) GetRasterBand(self, int nBand) -> Band | source code
char |
GetProjection(self) | source code
char |
GetProjectionRef(self) | source code
SetProjection(self, *args) SetProjection(self, char prj) -> CPLErr | source code
GetGeoTransform(self, *args, **kwargs) GetGeoTransform(self, int can_return_null = None) | source code
SetGeoTransform(self, *args) SetGeoTransform(self, double argin) -> CPLErr | source code
BuildOverviews(self, *args, **kwargs) BuildOverviews(self, char resampling = "NEAREST", int overviewlist = 0, ... | source code
int |
GetGCPCount(self) | source code
char |
GetGCPProjection(self) | source code
GetGCPs(self) | source code
SetGCPs(self, *args) SetGCPs(self, int nGCPs, char pszGCPProjection) -> CPLErr | source code
FlushCache(self) | source code
AddBand(self, *args, **kwargs) AddBand(self, GDALDataType datatype = GDT_Byte, char options = None) -> CPLErr | source code
CreateMaskBand(self, *args) CreateMaskBand(self, int nFlags) -> CPLErr | source code
char |
GetFileList(self) | source code
EndAsyncReader(self, *args) EndAsyncReader(self, AsyncReader ario) | source code
GetVirtualMem(self, *args, **kwargs) GetVirtualMem(self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, ... | source code
GetTiledVirtualMem(self, *args, **kwargs) GetTiledVirtualMem(self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, ... | source code
CreateLayer(self, *args, **kwargs) CreateLayer(self, char name, SpatialReference srs = None, OGRwkbGeometryType geom_type = wkbUnknown, ... | source code
CopyLayer(self, *args, **kwargs) CopyLayer(self, Layer src_layer, char new_name, char options = None) -> Layer | source code
int |
GetLayerCount(self) | source code
GetLayerByIndex(self, *args) GetLayerByIndex(self, int index = 0) -> Layer | source code
GetLayerByName(self, *args) GetLayerByName(self, char layer_name) -> Layer | source code
TestCapability(self, *args) TestCapability(self, char cap) -> bool | source code
ExecuteSQL(self, *args, **kwargs) ExecuteSQL(self, char statement, Geometry spatialFilter = None, char dialect = "") -> Layer | source code
ReleaseResultSet(self, *args) ReleaseResultSet(self, Layer layer) | source code
StyleTable |
GetStyleTable(self) | source code
SetStyleTable(self, *args) SetStyleTable(self, StyleTable table) | source code
StartTransaction(self, *args, **kwargs) StartTransaction(self, int force = True) -> OGRErr | source code
OGRErr |
CommitTransaction(self) | source code
OGRErr |
RollbackTransaction(self) | source code
ReadRaster1(self, *args, **kwargs) ReadRaster1(self, int xoff, int yoff, int xsize, int ysize, int buf_xsize = None, ... | source code
ReadAsArray(self, xoff=0, yoff=0, xsize=None, ysize=None, buf_obj=None, buf_xsize=None, buf_ysize=None, buf_type=None, resample_alg=GRIORA_NearestNeighbour, callback=None, callback_data=None) Reading a chunk of a GDAL band into a numpy array. | source code
WriteRaster(self, xoff, yoff, xsize, ysize, buf_string, buf_xsize=None, buf_ysize=None, buf_type=None, band_list=None, buf_pixel_space=None, buf_line_space=None, buf_band_space=None) | source code
ReadRaster(self, xoff=0, yoff=0, xsize=None, ysize=None, buf_xsize=None, buf_ysize=None, buf_type=None, band_list=None, buf_pixel_space=None, buf_line_space=None, buf_band_space=None, resample_alg=GRIORA_NearestNeighbour, callback=None, callback_data=None) | source code
GetVirtualMemArray(self, eAccess=gdalconst.GF_Read, xoff=0, yoff=0, xsize=None, ysize=None, bufxsize=None, bufysize=None, datatype=None, band_list=None, band_sequential=True, cache_size=10*1024*1024, page_size_hint=0, options=None) Return a NumPy array for the dataset, seen as a virtual memory mapping. | source code
GetTiledVirtualMemArray(self, eAccess=gdalconst.GF_Read, xoff=0, yoff=0, xsize=None, ysize=None, tilexsize=256, tileysize=256, datatype=None, band_list=None, tile_organization=gdalconst.GTO_BSQ, cache_size=10*1024*1024, options=None) Return a NumPy array for the dataset, seen as a virtual memory mapping with a tile organization. | source code
GetSubDatasets(self) | source code
BeginAsyncReader(self, xoff, yoff, xsize, ysize, buf_obj=None, buf_xsize=None, buf_ysize=None, buf_type=None, band_list=None, options=[]) | source code
GetLayer(self, iLayer=0) Return the layer given an index or a name | source code
DeleteLayer(self, value) Deletes the layer given an index or layer name | source code
Inherited from `MajorObject`: `GetDescription`, `GetMetadata`, `GetMetadataDomainList`, `GetMetadataItem`, `GetMetadata_Dict`, `GetMetadata_List`, `SetDescription`, `SetMetadata`, `SetMetadataItem`

Class Variables | [hide private]
| __swig_setmethods__ = `{}`
| __setattr__ = `lambda self, name, value:`
| __swig_getmethods__ = `{}`
| __getattr__ = `lambda self, name:`
| __swig_destroy__ = `_gdal.delete_Dataset`
| __del__ = `lambda self:`

Method Details | [hide private]

### __init__(self, *args, **kwargs) (Constructor) | source code
Overrides: MajorObject.__init__

### __repr__(self) (Representation operator) | source code
Overrides: _swig_repr

### BuildOverviews(self, *args, **kwargs) | source code
    BuildOverviews(self, char resampling = "NEAREST", int overviewlist = 0,
        GDALProgressFunc callback = None, void callback_data = None) -> int

### GetVirtualMem(self, *args, **kwargs) | source code
    GetVirtualMem(self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize,
        int nYSize, int nBufXSize, int nBufYSize,
        GDALDataType eBufType, int band_list, int bIsBandSequential,
        size_t nCacheSize, size_t nPageSizeHint,
        char options = None) -> VirtualMem

### GetTiledVirtualMem(self, *args, **kwargs) | source code
    GetTiledVirtualMem(self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize,
        int nYSize, int nTileXSize, int nTileYSize,
        GDALDataType eBufType, int band_list, GDALTileOrganization eTileOrganization,
        size_t nCacheSize,
        char options = None) -> VirtualMem

### CreateLayer(self, *args, **kwargs) | source code
    CreateLayer(self, char name, SpatialReference srs = None, OGRwkbGeometryType geom_type = wkbUnknown,
        char options = None) -> Layer

### ReadRaster1(self, *args, **kwargs) | source code
    ReadRaster1(self, int xoff, int yoff, int xsize, int ysize, int buf_xsize = None,
        int buf_ysize = None, GDALDataType buf_type = None,
        int band_list = 0, GIntBig buf_pixel_space = None,
        GIntBig buf_line_space = None,
        GIntBig buf_band_space = None, GDALRIOResampleAlg resample_alg = GRIORA_NearestNeighbour,
        GDALProgressFunc callback = None,
        void callback_data = None) -> CPLErr

### ReadAsArray(self, xoff=0, yoff=0, xsize=None, ysize=None, buf_obj=None, buf_xsize=None, buf_ysize=None, buf_type=None, resample_alg=GRIORA_NearestNeighbour, callback=None, callback_data=None) | source code
Reading a chunk of a GDAL band into a numpy array. The optional (buf_xsize,buf_ysize,buf_type) parameters should generally not be specified if buf_obj is specified. The array is returned

### GetVirtualMemArray(self, eAccess=gdalconst.GF_Read, xoff=0, yoff=0, xsize=None, ysize=None, bufxsize=None, bufysize=None, datatype=None, band_list=None, band_sequential=True, cache_size=10*1024*1024, page_size_hint=0, options=None) | source code
Return a NumPy array for the dataset, seen as a virtual memory mapping. If there are several bands and band_sequential = True, an element is accessed with array[band][y][x]. If there are several bands and band_sequential = False, an element is accessed with array[y][x][band]. If there is only one band, an element is accessed with array[y][x]. Any reference to the array must be dropped before the last reference to the related dataset is also dropped.

### GetTiledVirtualMemArray(self, eAccess=gdalconst.GF_Read, xoff=0, yoff=0, xsize=None, ysize=None, tilexsize=256, tileysize=256, datatype=None, band_list=None, tile_organization=gdalconst.GTO_BSQ, cache_size=10*1024*1024, options=None) | source code
Return a NumPy array for the dataset, seen as a virtual memory mapping with a tile organization. If there are several bands and tile_organization = gdal.GTO_TIP, an element is accessed with array[tiley][tilex][y][x][band]. If there are several bands and tile_organization = gdal.GTO_BIT, an element is accessed with array[tiley][tilex][band][y][x]. If there are several bands and tile_organization = gdal.GTO_BSQ, an element is accessed with array[band][tiley][tilex][y][x]. If there is only one band, an element is accessed with array[tiley][tilex][y][x]. Any reference to the array must be dropped before the last reference to the related dataset is also dropped.