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

# Class Band

source code

Proxy of C++ GDALRasterBandShadow class

Instance Methods | [hide private]
__init__(self, *args, **kwargs) | source code
__repr__(self) | source code
Dataset |
GetDataset(self) | source code
int |
GetBand(self) | source code
GetBlockSize(self) | source code
GDALColorInterp |
GetColorInterpretation(self) | source code
GDALColorInterp |
GetRasterColorInterpretation(self) | source code
SetColorInterpretation(self, *args) SetColorInterpretation(self, GDALColorInterp val) -> CPLErr | source code
SetRasterColorInterpretation(self, *args) SetRasterColorInterpretation(self, GDALColorInterp val) -> CPLErr | source code
GetNoDataValue(self) | source code
SetNoDataValue(self, *args) SetNoDataValue(self, double d) -> CPLErr | source code
CPLErr |
DeleteNoDataValue(self) | source code
char |
GetUnitType(self) | source code
SetUnitType(self, *args) SetUnitType(self, char val) -> CPLErr | source code
char |
GetRasterCategoryNames(self) | source code
SetRasterCategoryNames(self, *args) SetRasterCategoryNames(self, char names) -> CPLErr | source code
GetMinimum(self) | source code
GetMaximum(self) | source code
GetOffset(self) | source code
GetScale(self) | source code
SetOffset(self, *args) SetOffset(self, double val) -> CPLErr | source code
SetScale(self, *args) SetScale(self, double val) -> CPLErr | source code
GetStatistics(self, *args) GetStatistics(self, int approx_ok, int force) -> CPLErr | source code
ComputeStatistics(self, *args) ComputeStatistics(self, bool approx_ok, GDALProgressFunc callback = None, void callback_data = None) -> CPLErr | source code
SetStatistics(self, *args) SetStatistics(self, double min, double max, double mean, double stddev) -> CPLErr | source code
int |
GetOverviewCount(self) | source code
GetOverview(self, *args) GetOverview(self, int i) -> Band | source code
Checksum(self, *args, **kwargs) Checksum(self, int xoff = 0, int yoff = 0, int xsize = None, int ysize = None) -> int | source code
ComputeRasterMinMax(self, *args) ComputeRasterMinMax(self, int approx_ok = 0) | source code
ComputeBandStats(self, *args) ComputeBandStats(self, int samplestep = 1) | source code
Fill(self, *args) Fill(self, double real_fill, double imag_fill = 0.0) -> CPLErr | source code
WriteRaster(self, *args, **kwargs) WriteRaster(self, int xoff, int yoff, int xsize, int ysize, GIntBig buf_len, ... | source code
FlushCache(self) | source code
ColorTable |
GetRasterColorTable(self) | source code
ColorTable |
GetColorTable(self) | source code
SetRasterColorTable(self, *args) SetRasterColorTable(self, ColorTable arg) -> int | source code
SetColorTable(self, *args) SetColorTable(self, ColorTable arg) -> int | source code
RasterAttributeTable |
GetDefaultRAT(self) | source code
SetDefaultRAT(self, *args) SetDefaultRAT(self, RasterAttributeTable table) -> int | source code
Band |
GetMaskBand(self) | source code
int |
GetMaskFlags(self) | source code
CreateMaskBand(self, *args) CreateMaskBand(self, int nFlags) -> CPLErr | source code
GetHistogram(self, *args, **kwargs) GetHistogram(self, double min = -0.5, double max = 255.5, int buckets = 256, ... | source code
GetDefaultHistogram(self, *args, **kwargs) GetDefaultHistogram(self, double min_ret = None, double max_ret = None, int buckets_ret = None, ... | source code
SetDefaultHistogram(self, *args) SetDefaultHistogram(self, double min, double max, int buckets_in) -> CPLErr | source code
bool |
HasArbitraryOverviews(self) | source code
char |
GetCategoryNames(self) | source code
SetCategoryNames(self, *args) SetCategoryNames(self, char papszCategoryNames) -> CPLErr | source code
GetVirtualMem(self, *args, **kwargs) GetVirtualMem(self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, ... | source code
GetVirtualMemAuto(self, *args, **kwargs) GetVirtualMemAuto(self, GDALRWFlag eRWFlag, char options = None) -> VirtualMem | source code
GetTiledVirtualMem(self, *args, **kwargs) GetTiledVirtualMem(self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, ... | source code
ReadRaster1(self, *args, **kwargs) ReadRaster1(self, double xoff, double yoff, double xsize, double ysize, ... | source code
ReadBlock(self, *args, **kwargs) ReadBlock(self, int xoff, int yoff) -> CPLErr | source code
ReadRaster(self, xoff=0, yoff=0, xsize=None, ysize=None, buf_xsize=None, buf_ysize=None, buf_type=None, buf_pixel_space=None, buf_line_space=None, resample_alg=GRIORA_NearestNeighbour, callback=None, callback_data=None) | source code
ReadAsArray(self, xoff=0, yoff=0, win_xsize=None, win_ysize=None, buf_xsize=None, buf_ysize=None, buf_type=None, buf_obj=None, resample_alg=GRIORA_NearestNeighbour, callback=None, callback_data=None) Reading a chunk of a GDAL band into a numpy array. | source code
WriteArray(self, array, xoff=0, yoff=0, 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, cache_size=10*1024*1024, page_size_hint=0, options=None) Return a NumPy array for the band, seen as a virtual memory mapping. | source code
GetVirtualMemAutoArray(self, eAccess=gdalconst.GF_Read, options=None) Return a NumPy array for the band, 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, cache_size=10*1024*1024, options=None) Return a NumPy array for the band, seen as a virtual memory mapping with a tile organization. | source code
__get_array_interface__(self) | 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:`

Method Details | [hide private]

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

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

### WriteRaster(self, *args, **kwargs) | source code
    WriteRaster(self, int xoff, int yoff, int xsize, int ysize, GIntBig buf_len,
        int buf_xsize = None, int buf_ysize = None,
        int buf_type = None, GIntBig buf_pixel_space = None,
        GIntBig buf_line_space = None) -> CPLErr

### GetHistogram(self, *args, **kwargs) | source code
    GetHistogram(self, double min = -0.5, double max = 255.5, int buckets = 256,
        int include_out_of_range = 0, int approx_ok = 1,
        GDALProgressFunc callback = None,
        void callback_data = None) -> CPLErr

### GetDefaultHistogram(self, *args, **kwargs) | source code
    GetDefaultHistogram(self, double min_ret = None, double max_ret = None, int buckets_ret = None,
        GUIntBig ppanHistogram = None,
        int force = 1, GDALProgressFunc callback = None,
        void callback_data = None) -> CPLErr

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

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

### ReadAsArray(self, xoff=0, yoff=0, win_xsize=None, win_ysize=None, buf_xsize=None, buf_ysize=None, buf_type=None, buf_obj=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, cache_size=10*1024*1024, page_size_hint=0, options=None) | source code
Return a NumPy array for the band, seen as a virtual memory mapping. 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.

### GetVirtualMemAutoArray(self, eAccess=gdalconst.GF_Read, options=None) | source code
Return a NumPy array for the band, seen as a virtual memory mapping. 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, cache_size=10*1024*1024, options=None) | source code
Return a NumPy array for the band, seen as a virtual memory mapping with a tile organization. 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.