Python Multi-dimensional array API

class osgeo.gdal.Group(*args, **kwargs)

Proxy of C++ GDALGroupHS class.

CreateAttribute(Group self, char const * name, int nDimensions, ExtendedDataType data_type, char ** options=None) Attribute
CreateDimension(Group self, char const * name, char const * type, char const * direction, unsigned long long size, char ** options=None) Dimension
CreateGroup(Group self, char const * name, char ** options=None) Group
CreateMDArray(Group self, char const * name, int nDimensions, ExtendedDataType data_type, char ** options=None) MDArray
GetAttribute(Group self, char const * name) Attribute
GetAttributes(Group self, char ** options=None)
GetDimensions(Group self, char ** options=None)
GetFullName(Group self) char const *
GetGroupNames(Group self, char ** options=None) char **
GetMDArrayNames(Group self, char ** options=None) char **
GetName(Group self) char const *
GetStructuralInfo(Group self) char **
GetVectorLayerNames(Group self, char ** options=None) char **
OpenGroup(Group self, char const * name, char ** options=None) Group
OpenGroupFromFullname(Group self, char const * name, char ** options=None) Group
OpenMDArray(Group self, char const * name, char ** options=None) MDArray
OpenMDArrayFromFullname(Group self, char const * name, char ** options=None) MDArray
OpenVectorLayer(Group self, char const * name, char ** options=None) Layer
ResolveMDArray(Group self, char const * name, char const * starting_point, char ** options=None) MDArray
class osgeo.gdal.Dimension(*args, **kwargs)

Proxy of C++ GDALDimensionHS class.

GetDirection(Dimension self) char const *
GetFullName(Dimension self) char const *
GetIndexingVariable(Dimension self) MDArray
GetName(Dimension self) char const *
GetSize(Dimension self) unsigned long long
GetType(Dimension self) char const *
SetIndexingVariable(Dimension self, MDArray array) bool
class osgeo.gdal.MDArray(*args, **kwargs)

Proxy of C++ GDALMDArrayHS class.

AdviseRead(array_start_idx=None, count=None, options=[])
AsClassicDataset(MDArray self, size_t iXDim, size_t iYDim) Dataset
Cache(MDArray self, char ** options=None) bool
ComputeStatistics(MDArray self, bool approx_ok=FALSE, GDALProgressFunc callback=0, void * callback_data=None) Statistics
CreateAttribute(MDArray self, char const * name, int nDimensions, ExtendedDataType data_type, char ** options=None) Attribute
DeleteNoDataValue(MDArray self) CPLErr
GetAttribute(MDArray self, char const * name) Attribute
GetAttributes(MDArray self, char ** options=None)
GetBlockSize(MDArray self)
GetCoordinateVariables(MDArray self)
GetDataType(MDArray self) ExtendedDataType
GetDimensionCount(MDArray self) size_t
GetDimensions(MDArray self)
GetFullName(MDArray self) char const *
GetMask(MDArray self, char ** options=None) MDArray
GetName(MDArray self) char const *
GetNoDataValueAsDouble(MDArray self)
GetNoDataValueAsRaw(MDArray self) CPLErr
GetNoDataValueAsString(MDArray self) retStringAndCPLFree *
GetOffset(MDArray self)
GetOffsetStorageType(MDArray self) GDALDataType
GetProcessingChunkSize(MDArray self, size_t nMaxChunkMemory)
GetResampled(MDArray self, int nDimensions, GDALRIOResampleAlg resample_alg, OSRSpatialReferenceShadow ** srs, char ** options=None) MDArray
GetScale(MDArray self)
GetScaleStorageType(MDArray self) GDALDataType
GetShape()

Return the shape of the array

GetSpatialRef(MDArray self) SpatialReference
GetStatistics(MDArray self, bool approx_ok=FALSE, bool force=TRUE, GDALProgressFunc callback=0, void * callback_data=None) Statistics
GetStructuralInfo(MDArray self) char **
GetTotalElementsCount(MDArray self) unsigned long long
GetUnit(MDArray self) char const *
GetUnscaled(MDArray self) MDArray
GetView(MDArray self, char const * viewExpr) MDArray
Read(array_start_idx=None, count=None, array_step=None, buffer_stride=None, buffer_datatype=None)
ReadAsArray(array_start_idx=None, count=None, array_step=None, buffer_datatype=None, buf_obj=None)
ReadAsMaskedArray(array_start_idx=None, count=None, array_step=None)

Return a numpy masked array of ReadAsArray() with GetMask()

SetNoDataValueDouble(MDArray self, double d) CPLErr
SetNoDataValueRaw(MDArray self, GIntBig nLen) CPLErr
SetNoDataValueString(MDArray self, char const * nodata) CPLErr
SetOffset(MDArray self, double val, GDALDataType storageType=GDT_Unknown) CPLErr
SetScale(MDArray self, double val, GDALDataType storageType=GDT_Unknown) CPLErr
SetSpatialRef(MDArray self, SpatialReference srs) OGRErr
SetUnit(MDArray self, char const * unit) CPLErr
Transpose(MDArray self, int nList) MDArray
Write(buffer, array_start_idx=None, count=None, array_step=None, buffer_stride=None, buffer_datatype=None)
WriteArray(array, array_start_idx=None, array_step=None)
WriteStringArray(MDArray self, int nDims1, int nDims2, int nDims3, ExtendedDataType buffer_datatype, char ** options) CPLErr
property shape

Returns the shape of the array.

class osgeo.gdal.Attribute(*args, **kwargs)

Proxy of C++ GDALAttributeHS class.

GetDataType(Attribute self) ExtendedDataType
GetDimensionCount(Attribute self) size_t
GetDimensionsSize(Attribute self)
GetFullName(Attribute self) char const *
GetName(Attribute self) char const *
GetTotalElementsCount(Attribute self) unsigned long long
Read()

Read an attribute and return it with the most appropriate type

ReadAsDouble(Attribute self) double
ReadAsDoubleArray(Attribute self)
ReadAsInt(Attribute self) int
ReadAsIntArray(Attribute self)
ReadAsRaw(Attribute self) CPLErr
ReadAsString(Attribute self) char const *
ReadAsStringArray(Attribute self) char **
Write(val)
WriteDouble(Attribute self, double val) CPLErr
WriteDoubleArray(Attribute self, int nList) CPLErr
WriteInt(Attribute self, int val) CPLErr
WriteRaw(Attribute self, GIntBig nLen) CPLErr
WriteString(Attribute self, char const * val) CPLErr
WriteStringArray(Attribute self, char ** vals) CPLErr
class osgeo.gdal.ExtendedDataType(*args, **kwargs)

Proxy of C++ GDALExtendedDataTypeHS class.

CanConvertTo(ExtendedDataType self, ExtendedDataType other) bool
static Create(GDALDataType dt) ExtendedDataType
static CreateCompound(char const * name, size_t nTotalSize, int nComps) ExtendedDataType
static CreateString(size_t nMaxStringLength=0, GDALExtendedDataTypeSubType eSubType=GEDTST_NONE) ExtendedDataType
Equals(ExtendedDataType self, ExtendedDataType other) bool
GetClass(ExtendedDataType self) GDALExtendedDataTypeClass
GetComponents(ExtendedDataType self)
GetMaxStringLength(ExtendedDataType self) size_t
GetName(ExtendedDataType self) char const *
GetNumericDataType(ExtendedDataType self) GDALDataType
GetSize(ExtendedDataType self) size_t
GetSubType(ExtendedDataType self) GDALExtendedDataTypeSubType