![]() |
OTB
9.1.1
Orfeo Toolbox
|
#include <otbMetadataSupplierInterface.h>
Inheritance diagram for otb::MetadataSupplierInterface:
Collaboration diagram for otb::MetadataSupplierInterface:Public Member Functions | |
| template<> | |
| bool | GetAs (bool const &defaultValue, std::string const &path, int band) const |
| template<typename T > | |
| T | GetAs (std::string const &path, int band=-1) const |
| template<typename T > | |
| T | GetAs (T const &defaultValue, std::string const &path, int band=-1) const |
| template<typename T > | |
| std::vector< T > | GetAsVector (std::string const &path, char sep=' ', int size=-1, int band=-1) const |
| virtual unsigned int | GetAttributeId (std::string const &path, std::string const &value) const =0 |
| virtual std::string | GetMetadataValue (std::string const &path, bool &hasValue, int band=-1) const =0 |
| virtual int | GetNbBands () const =0 |
| virtual unsigned int | GetNumberOf (std::string const &path) const =0 |
| virtual std::string | GetResourceFile (std::string const &="") const =0 |
| virtual std::vector< std::string > | GetResourceFiles () const |
| bool | HasValue (std::string const &path, int band=-1) const |
| virtual | ~MetadataSupplierInterface ()=default |
Public Attributes | |
| const std::array< std::string, 3 > | FALSES = {"0", "false", "False"} |
| const std::array< std::string, 3 > | TRUES = {"1", "true", "True"} |
Base class to access metadata information in files/images.
Definition at line 40 of file otbMetadataSupplierInterface.h.
|
virtualdefault |
| bool otb::MetadataSupplierInterface::GetAs | ( | bool const & | defaultValue, |
| std::string const & | path, | ||
| int | band | ||
| ) | const |
| T otb::MetadataSupplierInterface::GetAs | ( | std::string const & | path, |
| int | band = -1 |
||
| ) | const |
Definition at line 50 of file otbMetadataSupplierInterface.hxx.
References GetMetadataValue(), and otbGenericExceptionMacro.
| T otb::MetadataSupplierInterface::GetAs | ( | T const & | defaultValue, |
| std::string const & | path, | ||
| int | band = -1 |
||
| ) | const |
Definition at line 31 of file otbMetadataSupplierInterface.hxx.
References GetMetadataValue().
| std::vector< T > otb::MetadataSupplierInterface::GetAsVector | ( | std::string const & | path, |
| char | sep = ' ', |
||
| int | size = -1, |
||
| int | band = -1 |
||
| ) | const |
Parse a metadata value to a std::vector, If size>=0, then the final std::vector size is checked and an exception is raised if it doesn't match the given size.
Definition at line 69 of file otbMetadataSupplierInterface.hxx.
References GetMetadataValue(), otb::lstrip(), otbGenericExceptionMacro, otb::rstrip(), and otb::split_on().
|
pure virtual |
If multiple keys have the same path, gives the position of the one with value value
Implemented in otb::XMLMetadataSupplier, otb::GDALImageIO, and otb::GeomMetadataSupplier.
|
pure virtual |
Get the metadata value corresponding to a given path (meaning of this path depends on the specific implementation. Returns empty string when path is not found, and hasValue is set to False. If band >= 0, the metadata value is looked in the specified band
Implemented in otb::GeomMetadataSupplier, otb::XMLMetadataSupplier, and otb::GDALImageIO.
Referenced by GetAs(), GetAsVector(), and otb::DimapMetadataHelper::ParseVector().
|
pure virtual |
Implemented in otb::GDALImageIO, otb::XMLMetadataSupplier, and otb::GeomMetadataSupplier.
|
pure virtual |
Get the number of keys starting with path
Implemented in otb::XMLMetadataSupplier, otb::GDALImageIO, and otb::GeomMetadataSupplier.
|
pure virtual |
Implemented in otb::GDALImageIO, otb::XMLMetadataSupplier, and otb::GeomMetadataSupplier.
|
inlinevirtual |
Reimplemented in otb::GDALImageIO, and otb::GeomMetadataSupplier.
Definition at line 46 of file otbMetadataSupplierInterface.h.
| bool otb::MetadataSupplierInterface::HasValue | ( | std::string const & | path, |
| int | band = -1 |
||
| ) | const |
| const std::array<std::string, 3> otb::MetadataSupplierInterface::FALSES = {"0", "false", "False"} |
Definition at line 44 of file otbMetadataSupplierInterface.h.
| const std::array<std::string, 3> otb::MetadataSupplierInterface::TRUES = {"1", "true", "True"} |
Definition at line 43 of file otbMetadataSupplierInterface.h.
1.8.17