class GDALBand(GDALRasterBase):
Method | __init__ |
Undocumented |
Method | _flush |
Call the flush method on the Band's parent raster and force a refresh of the statistics attribute when requested the next time. |
Method | color_interp |
Return the GDAL color interpretation for this band. |
Method | data |
No summary |
Method | datatype |
Return the GDAL Pixel Datatype for this band. |
Method | nodata_value.setter |
Set the nodata value for this band. |
Method | statistics |
Compute statistics on the pixel values of this band. |
Instance Variable | _ptr |
Undocumented |
Instance Variable | _stats_refresh |
Undocumented |
Instance Variable | source |
Undocumented |
Property | description |
Return the description string of the band. |
Property | height |
Height (Y axis) in pixels of the band. |
Property | max |
Return the maximum pixel value for this band. |
Property | mean |
Return the mean of all pixel values of this band. |
Property | min |
Return the minimum pixel value for this band. |
Property | nodata_value |
Return the nodata value for this band, or None if it isn't set. |
Property | pixel_count |
Return the total number of pixels in this band. |
Property | std |
Return the standard deviation of all pixel values of this band. |
Property | width |
Width (X axis) in pixels of the band. |
Inherited from GDALRasterBase
:
Method | metadata.setter |
Set the metadata. Update only the domains that are contained in the value dictionary. |
Property | metadata |
Return the metadata for this raster or band. The return value is a nested dictionary, where the first-level key is the metadata domain and the second-level is the metadata item names and values for that domain. |
Inherited from CPointerBase
(via GDALRasterBase
, GDALBase
):
Method | __del__ |
Free the memory used by the C++ object. |
Method | ptr.setter |
Undocumented |
Class Variable | destructor |
Undocumented |
Property | ptr |
Undocumented |
Read or writes pixel values for this band. Blocks of data can be accessed by specifying the width, height and offset of the desired block. The same specification can be used to update parts of a raster by providing an array of values.
Allowed input data types are bytes, memoryview, list, tuple, and array.
Compute statistics on the pixel values of this band.
The return value is a tuple with the following structure: (minimum, maximum, mean, standard deviation).
If approximate=True, the statistics may be computed based on overviews or a subset of image tiles.
If refresh=True, the statistics will be computed from the data directly, and the cache will be updated where applicable.
For empty bands (where all pixel values are nodata), all statistics values are returned as None.
For raster formats using Persistent Auxiliary Metadata (PAM) services, the statistics might be cached in an auxiliary file.