|
GDAL
|
Interface used to get a single GDALAttribute or a set of GDALAttribute. More...
#include <gdal_priv.h>
Public Member Functions | |
| virtual std::shared_ptr< GDALAttribute > | GetAttribute (const std::string &osName) const |
| Return an attribute by its name. More... | |
| virtual std::vector< std::shared_ptr< GDALAttribute > > | GetAttributes (CSLConstList papszOptions=nullptr) const |
| Return the list of attributes contained in a GDALMDArray or GDALGroup. More... | |
| virtual std::shared_ptr< GDALAttribute > | CreateAttribute (const std::string &osName, const std::vector< GUInt64 > &anDimensions, const GDALExtendedDataType &oDataType, CSLConstList papszOptions=nullptr) |
| Create an attribute within a GDALMDArray or GDALGroup. More... | |
| virtual bool | DeleteAttribute (const std::string &osName, CSLConstList papszOptions=nullptr) |
| Delete an attribute from a GDALMDArray or GDALGroup. More... | |
Protected Member Functions | |
| std::shared_ptr< GDALAttribute > | GetAttributeFromAttributes (const std::string &osName) const |
| Possible fallback implementation for GetAttribute() using GetAttributes(). | |
Interface used to get a single GDALAttribute or a set of GDALAttribute.
|
virtual |
Create an attribute within a GDALMDArray or GDALGroup.
The attribute might not be "physically" created until a value is written into it.
Optionally implemented.
Drivers known to implement it: MEM, netCDF
This is the same as the C function GDALGroupCreateAttribute() or GDALMDArrayCreateAttribute()
| osName | Attribute name. |
| anDimensions | List of dimension sizes, ordered from the slowest varying dimension first to the fastest varying dimension last. Empty for a scalar attribute (common case) |
| oDataType | Attribute data type. |
| papszOptions | Driver specific options determining how the attribute. should be created. |
|
virtual |
Delete an attribute from a GDALMDArray or GDALGroup.
Optionally implemented.
After this call, if a previously obtained instance of the deleted object is still alive, no method other than for freeing it should be invoked.
Drivers known to implement it: MEM, netCDF
This is the same as the C function GDALGroupDeleteAttribute() or GDALMDArrayDeleteAttribute()
| osName | Attribute name. |
| papszOptions | Driver specific options determining how the attribute. should be deleted. |
|
virtual |
Return an attribute by its name.
If the attribute does not exist, nullptr should be silently returned.
Drivers known to implement it for groups and arrays: MEM, netCDF.
This is the same as the C function GDALGroupGetAttribute() or GDALMDArrayGetAttribute().
| osName | Attribute name |
|
virtual |
Return the list of attributes contained in a GDALMDArray or GDALGroup.
If the attribute does not exist, nullptr should be silently returned.
Drivers known to implement it for groups and arrays: MEM, netCDF.
This is the same as the C function GDALGroupGetAttributes() or GDALMDArrayGetAttributes().
| papszOptions | Driver specific options determining how attributes should be retrieved. Pass nullptr for default behavior. |