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
 
GetDataset(self, *args)
GetDataset(Band self) -> Dataset
source code
 
GetBand(self, *args)
GetBand(Band self) -> int
source code
 
GetBlockSize(self, *args)
GetBlockSize(Band self)
source code
 
GetActualBlockSize(self, *args)
GetActualBlockSize(Band self, int nXBlockOff, int nYBlockOff)
source code
 
GetColorInterpretation(self, *args)
GetColorInterpretation(Band self) -> GDALColorInterp
source code
 
GetRasterColorInterpretation(self, *args)
GetRasterColorInterpretation(Band self) -> GDALColorInterp
source code
 
SetColorInterpretation(self, *args)
SetColorInterpretation(Band self, GDALColorInterp val) -> CPLErr
source code
 
SetRasterColorInterpretation(self, *args)
SetRasterColorInterpretation(Band self, GDALColorInterp val) -> CPLErr
source code
 
GetNoDataValue(self, *args)
GetNoDataValue(Band self)
source code
 
SetNoDataValue(self, *args)
SetNoDataValue(Band self, double d) -> CPLErr
source code
 
DeleteNoDataValue(self, *args)
DeleteNoDataValue(Band self) -> CPLErr
source code
 
GetUnitType(self, *args)
GetUnitType(Band self) -> char const *
source code
 
SetUnitType(self, *args)
SetUnitType(Band self, char const * val) -> CPLErr
source code
 
GetRasterCategoryNames(self, *args)
GetRasterCategoryNames(Band self) -> char **
source code
 
SetRasterCategoryNames(self, *args)
SetRasterCategoryNames(Band self, char ** names) -> CPLErr
source code
 
GetMinimum(self, *args)
GetMinimum(Band self)
source code
 
GetMaximum(self, *args)
GetMaximum(Band self)
source code
 
GetOffset(self, *args)
GetOffset(Band self)
source code
 
GetScale(self, *args)
GetScale(Band self)
source code
 
SetOffset(self, *args)
SetOffset(Band self, double val) -> CPLErr
source code
 
SetScale(self, *args)
SetScale(Band self, double val) -> CPLErr
source code
 
GetStatistics(self, *args)
GetStatistics(Band self, int approx_ok, int force) -> CPLErr
source code
 
SetStatistics(self, *args)
SetStatistics(Band self, double min, double max, double mean, double stddev) -> CPLErr
source code
 
GetOverviewCount(self, *args)
GetOverviewCount(Band self) -> int
source code
 
GetOverview(self, *args)
GetOverview(Band self, int i) -> Band
source code
 
Checksum(self, *args, **kwargs)
Checksum(Band self, int xoff=0, int yoff=0, int * xsize=None, int * ysize=None) -> int
source code
 
ComputeRasterMinMax(self, *args)
ComputeRasterMinMax(Band self, int approx_ok=0)
source code
 
ComputeBandStats(self, *args)
ComputeBandStats(Band self, int samplestep=1)
source code
 
Fill(self, *args)
Fill(Band self, double real_fill, double imag_fill=0.0) -> CPLErr
source code
 
WriteRaster(self, *args, **kwargs)
WriteRaster(Band 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
source code
 
FlushCache(self, *args)
FlushCache(Band self)
source code
 
GetRasterColorTable(self, *args)
GetRasterColorTable(Band self) -> ColorTable
source code
 
GetColorTable(self, *args)
GetColorTable(Band self) -> ColorTable
source code
 
SetRasterColorTable(self, *args)
SetRasterColorTable(Band self, ColorTable arg) -> int
source code
 
SetColorTable(self, *args)
SetColorTable(Band self, ColorTable arg) -> int
source code
 
GetDefaultRAT(self, *args)
GetDefaultRAT(Band self) -> RasterAttributeTable
source code
 
SetDefaultRAT(self, *args)
SetDefaultRAT(Band self, RasterAttributeTable table) -> int
source code
 
GetMaskBand(self, *args)
GetMaskBand(Band self) -> Band
source code
 
GetMaskFlags(self, *args)
GetMaskFlags(Band self) -> int
source code
 
CreateMaskBand(self, *args)
CreateMaskBand(Band self, int nFlags) -> CPLErr
source code
 
GetHistogram(self, *args, **kwargs)
GetHistogram(Band self, double min=-0.5, double max=255.5, int buckets=256, int include_out_of_range=0, int approx_ok=1, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr
source code
 
GetDefaultHistogram(self, *args, **kwargs)
GetDefaultHistogram(Band self, double * min_ret=None, double * max_ret=None, int * buckets_ret=None, GUIntBig ** ppanHistogram=None, int force=1, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr
source code
 
SetDefaultHistogram(self, *args)
SetDefaultHistogram(Band self, double min, double max, int buckets_in) -> CPLErr
source code
 
HasArbitraryOverviews(self, *args)
HasArbitraryOverviews(Band self) -> bool
source code
 
GetCategoryNames(self, *args)
GetCategoryNames(Band self) -> char **
source code
 
SetCategoryNames(self, *args)
SetCategoryNames(Band self, char ** papszCategoryNames) -> CPLErr
source code
 
GetVirtualMem(self, *args, **kwargs)
GetVirtualMem(Band 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
source code
 
GetVirtualMemAuto(self, *args, **kwargs)
GetVirtualMemAuto(Band self, GDALRWFlag eRWFlag, char ** options=None) -> VirtualMem
source code
 
GetTiledVirtualMem(self, *args, **kwargs)
GetTiledVirtualMem(Band self, GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, int nTileXSize, int nTileYSize, GDALDataType eBufType, size_t nCacheSize, char ** options=None) -> VirtualMem
source code
 
GetDataCoverageStatus(self, *args)
GetDataCoverageStatus(Band self, int nXOff, int nYOff, int nXSize, int nYSize, int nMaskFlagStop=0) -> int
source code
 
AdviseRead(self, *args)
AdviseRead(Band self, int xoff, int yoff, int xsize, int ysize, int * buf_xsize=None, int * buf_ysize=None, GDALDataType * buf_type=None, char ** options=None) -> CPLErr
source code
 
ReadRaster1(self, *args, **kwargs)
ReadRaster1(Band 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, GDALProgressFunc callback=0, void * callback_data=None) -> CPLErr
source code
 
ReadBlock(self, *args, **kwargs)
ReadBlock(Band self, int xoff, int yoff) -> CPLErr
source code
 
ComputeStatistics(self, *args)
ComputeStatistics(Band self, bool approx_ok, GDALProgressFunc callback=0, void * callback_data=None) -> 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:
  XSize = _swig_property(_gdal.Band_XSize_get)
  YSize = _swig_property(_gdal.Band_YSize_get)
  DataType = _swig_property(_gdal.Band_DataType_get)
Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 
Overrides: MajorObject.__init__

__repr__(self)
(Representation operator)

source code 
Overrides: _swig_repr

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.