OTB  8.1.0
Orfeo Toolbox
Public Types | Public Member Functions | Public Attributes | List of all members
otb::ImageMetadataBase Class Reference

#include <otbImageMetadata.h>

+ Inheritance diagram for otb::ImageMetadataBase:

Public Types

template<class TKey , class TVal >
using DictType = std::map< TKey, TVal >
 
using Keywordlist = std::unordered_map< std::string, std::string >
 

Public Member Functions

void Add (const MDGeom &key, const boost::any &value)
 
void Add (const MDNum &key, const double &value)
 
void Add (const MDStr &key, const std::string &value)
 
void Add (const MDL1D &key, const MetaData::LUT1D &value)
 
void Add (const MDL2D &key, const MetaData::LUT2D &value)
 
void Add (const MDTime &key, const MetaData::TimePoint &value)
 
void Add (const std::string &key, const std::string &value)
 
bool FromKeywordlist (const Keywordlist &)
 
void Fuse (const ImageMetadataBase &)
 
std::vector< unsigned int > GetDefaultDisplay () const
 
const Projection::GCPParamGetGCPParam () const
 
std::string GetKeyListL1D () const
 
std::string GetKeyListNum () const
 
std::string GetKeyListStr () const
 
std::string GetKeyListTime () const
 
std::string GetProjectedGeometry () const
 
std::string GetProjectionProj () const
 
std::string GetProjectionWKT () const
 
const Projection::RPCParamGetRPCParam () const
 
const SARParamGetSARParam () const
 
int GetSize () const
 
bool Has (const MDGeom &key) const
 
bool Has (const MDNum &key) const
 
bool Has (const MDStr &key) const
 
bool Has (const MDL1D &key) const
 
bool Has (const MDL2D &key) const
 
bool Has (const MDTime &key) const
 
bool Has (const std::string &key) const
 
bool HasProjectedGeometry () const
 
bool HasSensorGeometry () const
 
 ImageMetadataBase ()
 
 ImageMetadataBase (DictType< MDGeom, boost::any > geometryKeys, DictType< MDNum, double > numericKeys, DictType< MDStr, std::string > stringKeys, DictType< MDL1D, MetaData::LUT1D > lut1DKeys, DictType< MDL2D, MetaData::LUT2D > lut2DKeys, DictType< MDTime, MetaData::TimePoint > timeKeys, DictType< std::string, std::string > extraKeys)
 
const boost::any & operator[] (const MDGeom &key) const
 
const double & operator[] (const MDNum &key) const
 
const std::string & operator[] (const MDStr &key) const
 
const MetaData::LUT1Doperator[] (const MDL1D &key) const
 
const MetaData::LUT2Doperator[] (const MDL2D &key) const
 
const MetaData::TimePointoperator[] (const MDTime &key) const
 
const std::string & operator[] (const std::string &key) const
 
vcl_size_t Remove (const MDGeom &key)
 
vcl_size_t Remove (const MDNum &key)
 
vcl_size_t Remove (const MDStr &key)
 
vcl_size_t Remove (const MDL1D &key)
 
vcl_size_t Remove (const MDL2D &key)
 
vcl_size_t Remove (const MDTime &key)
 
vcl_size_t Remove (const std::string &key)
 
vcl_size_t RemoveProjectedGeometry ()
 
vcl_size_t RemoveSensorGeometry ()
 
std::string ToJSON (bool multiline=false) const
 
void ToKeywordlist (Keywordlist &) const
 

Public Attributes

DictType< std::string, std::string > ExtraKeys
 
DictType< MDGeom, boost::any > GeometryKeys
 
DictType< MDL1D, MetaData::LUT1DLUT1DKeys
 
DictType< MDL2D, MetaData::LUT2DLUT2DKeys
 
DictType< MDNum, double > NumericKeys
 
DictType< MDStr, std::string > StringKeys
 
DictType< MDTime, MetaData::TimePointTimeKeys
 

Detailed Description

Metadata hybrid dictionary.

Contains a dict of geometry parameters, several typed dictionaries for double, string, and other types. The different metadatas are retrieved with enum classes ( one for each type stored in the dictionary).

Definition at line 49 of file otbImageMetadata.h.

Member Typedef Documentation

◆ DictType

template<class TKey , class TVal >
using otb::ImageMetadataBase::DictType = std::map<TKey, TVal>

type of dictionary used internally

Definition at line 54 of file otbImageMetadata.h.

◆ Keywordlist

using otb::ImageMetadataBase::Keywordlist = std::unordered_map<std::string, std::string>

Definition at line 56 of file otbImageMetadata.h.

Constructor & Destructor Documentation

◆ ImageMetadataBase() [1/2]

otb::ImageMetadataBase::ImageMetadataBase ( )

◆ ImageMetadataBase() [2/2]

otb::ImageMetadataBase::ImageMetadataBase ( DictType< MDGeom, boost::any >  geometryKeys,
DictType< MDNum, double >  numericKeys,
DictType< MDStr, std::string >  stringKeys,
DictType< MDL1D, MetaData::LUT1D lut1DKeys,
DictType< MDL2D, MetaData::LUT2D lut2DKeys,
DictType< MDTime, MetaData::TimePoint timeKeys,
DictType< std::string, std::string >  extraKeys 
)

Member Function Documentation

◆ Add() [1/7]

void otb::ImageMetadataBase::Add ( const MDGeom key,
const boost::any &  value 
)

Setter for geometric keys

◆ Add() [2/7]

void otb::ImageMetadataBase::Add ( const MDNum key,
const double &  value 
)

Setter for numeric keys

◆ Add() [3/7]

void otb::ImageMetadataBase::Add ( const MDStr key,
const std::string &  value 
)

Setter for string keys

◆ Add() [4/7]

void otb::ImageMetadataBase::Add ( const MDL1D key,
const MetaData::LUT1D value 
)

Setter for 1D LUT keys

◆ Add() [5/7]

void otb::ImageMetadataBase::Add ( const MDL2D key,
const MetaData::LUT2D value 
)

Setter for 2D LUT keys

◆ Add() [6/7]

void otb::ImageMetadataBase::Add ( const MDTime key,
const MetaData::TimePoint value 
)

Setter for time keys

◆ Add() [7/7]

void otb::ImageMetadataBase::Add ( const std::string &  key,
const std::string &  value 
)

Setter for extra keys

◆ FromKeywordlist()

bool otb::ImageMetadataBase::FromKeywordlist ( const Keywordlist )

Import metadata from a string keywordlist. Will skip MDGeom::SensorGeometry, MDGeom::RPC and MDGeom::GCP. Returns True if all keywords were parsed correctly.

◆ Fuse()

void otb::ImageMetadataBase::Fuse ( const ImageMetadataBase )

Merge with another ImageMetadataBase If a key exists in both ImageMetadataBase, keeps the value of this ImageMetadataBase.

◆ GetDefaultDisplay()

std::vector<unsigned int> otb::ImageMetadataBase::GetDefaultDisplay ( ) const

Return the band that should be displayed by default, using the information contained in the input ImageMetadata (MDNum::RedDisplayChannel, GreenDisplayChannel and BlueDisplayChannel) the first channel being indexed as 0. If no information is available the default order (0,1,2) is returned instead

◆ GetGCPParam()

const Projection::GCPParam& otb::ImageMetadataBase::GetGCPParam ( ) const

◆ GetKeyListL1D()

std::string otb::ImageMetadataBase::GetKeyListL1D ( ) const

Return the list of valid keys

◆ GetKeyListNum()

std::string otb::ImageMetadataBase::GetKeyListNum ( ) const

Return the list of valid keys

◆ GetKeyListStr()

std::string otb::ImageMetadataBase::GetKeyListStr ( ) const

Return the list of valid keys

◆ GetKeyListTime()

std::string otb::ImageMetadataBase::GetKeyListTime ( ) const

Return the list of valid keys

◆ GetProjectedGeometry()

std::string otb::ImageMetadataBase::GetProjectedGeometry ( ) const

◆ GetProjectionProj()

std::string otb::ImageMetadataBase::GetProjectionProj ( ) const

◆ GetProjectionWKT()

std::string otb::ImageMetadataBase::GetProjectionWKT ( ) const

◆ GetRPCParam()

const Projection::RPCParam& otb::ImageMetadataBase::GetRPCParam ( ) const

◆ GetSARParam()

const SARParam& otb::ImageMetadataBase::GetSARParam ( ) const

◆ GetSize()

int otb::ImageMetadataBase::GetSize ( ) const

Return the number of elements in the ImageMetadataBase

◆ Has() [1/7]

bool otb::ImageMetadataBase::Has ( const MDGeom key) const

◆ Has() [2/7]

bool otb::ImageMetadataBase::Has ( const MDNum key) const

Test if a key is available

◆ Has() [3/7]

bool otb::ImageMetadataBase::Has ( const MDStr key) const

Test if a key is available

◆ Has() [4/7]

bool otb::ImageMetadataBase::Has ( const MDL1D key) const

Test if a key is available

◆ Has() [5/7]

bool otb::ImageMetadataBase::Has ( const MDL2D key) const

Test if a key is available

◆ Has() [6/7]

bool otb::ImageMetadataBase::Has ( const MDTime key) const

Test if a key is available

◆ Has() [7/7]

bool otb::ImageMetadataBase::Has ( const std::string &  key) const

Test if a key is available

◆ HasProjectedGeometry()

bool otb::ImageMetadataBase::HasProjectedGeometry ( ) const

◆ HasSensorGeometry()

bool otb::ImageMetadataBase::HasSensorGeometry ( ) const

◆ operator[]() [1/7]

const boost::any& otb::ImageMetadataBase::operator[] ( const MDGeom key) const

Read-only accessor to geometric keys

◆ operator[]() [2/7]

const double& otb::ImageMetadataBase::operator[] ( const MDNum key) const

Read-only accessor to numeric keys

◆ operator[]() [3/7]

const std::string& otb::ImageMetadataBase::operator[] ( const MDStr key) const

Read-only accessor to string keys

◆ operator[]() [4/7]

const MetaData::LUT1D& otb::ImageMetadataBase::operator[] ( const MDL1D key) const

Read-only accessor to 1D LUT keys

◆ operator[]() [5/7]

const MetaData::LUT2D& otb::ImageMetadataBase::operator[] ( const MDL2D key) const

Read-only accessor to 2D LUT keys

◆ operator[]() [6/7]

const MetaData::TimePoint& otb::ImageMetadataBase::operator[] ( const MDTime key) const

Return the list of valid keys Read-only accessor to time keys

◆ operator[]() [7/7]

const std::string& otb::ImageMetadataBase::operator[] ( const std::string &  key) const

Read-only accessor to extra keys

◆ Remove() [1/7]

vcl_size_t otb::ImageMetadataBase::Remove ( const MDGeom key)

Remove a key from the dictionary (even if the key is already missing)

◆ Remove() [2/7]

vcl_size_t otb::ImageMetadataBase::Remove ( const MDNum key)

Remove a key from the dictionary (even if the key is already missing)

◆ Remove() [3/7]

vcl_size_t otb::ImageMetadataBase::Remove ( const MDStr key)

Remove a key from the dictionary (even if the key is already missing)

◆ Remove() [4/7]

vcl_size_t otb::ImageMetadataBase::Remove ( const MDL1D key)

Remove a key from the dictionary (even if the key is already missing)

◆ Remove() [5/7]

vcl_size_t otb::ImageMetadataBase::Remove ( const MDL2D key)

Remove a key from the dictionary (even if the key is already missing)

◆ Remove() [6/7]

vcl_size_t otb::ImageMetadataBase::Remove ( const MDTime key)

Remove a key from the dictionary (even if the key is already missing)

◆ Remove() [7/7]

vcl_size_t otb::ImageMetadataBase::Remove ( const std::string &  key)

Remove a key from the dictionary (even if the key is already missing)

◆ RemoveProjectedGeometry()

vcl_size_t otb::ImageMetadataBase::RemoveProjectedGeometry ( )

◆ RemoveSensorGeometry()

vcl_size_t otb::ImageMetadataBase::RemoveSensorGeometry ( )

◆ ToJSON()

std::string otb::ImageMetadataBase::ToJSON ( bool  multiline = false) const

Format the metadata to JSON

◆ ToKeywordlist()

void otb::ImageMetadataBase::ToKeywordlist ( Keywordlist ) const

Fill a KeywordList with the metadata

Member Data Documentation

◆ ExtraKeys

DictType<std::string, std::string> otb::ImageMetadataBase::ExtraKeys

Definition at line 91 of file otbImageMetadata.h.

◆ GeometryKeys

DictType<MDGeom, boost::any> otb::ImageMetadataBase::GeometryKeys

Stack of geometry parameters, sorted by decreasing priority Cases with corresponding enum values:

Corner cases we may encounter:

  • sensor refinement: [RPC, GCP, adjustment]
  • piece-wise sensor model: [compound_RPC] ( handled as MDGeom::SensorGeometry)
  • raw georeferencing: [GCP]
  • Fine registration : [WKT, adjustment grid]

Definition at line 79 of file otbImageMetadata.h.

◆ LUT1DKeys

DictType<MDL1D, MetaData::LUT1D> otb::ImageMetadataBase::LUT1DKeys

Definition at line 85 of file otbImageMetadata.h.

◆ LUT2DKeys

DictType<MDL2D, MetaData::LUT2D> otb::ImageMetadataBase::LUT2DKeys

Definition at line 87 of file otbImageMetadata.h.

◆ NumericKeys

DictType<MDNum, double> otb::ImageMetadataBase::NumericKeys

Definition at line 81 of file otbImageMetadata.h.

◆ StringKeys

DictType<MDStr, std::string> otb::ImageMetadataBase::StringKeys

Definition at line 83 of file otbImageMetadata.h.

◆ TimeKeys

DictType<MDTime, MetaData::TimePoint> otb::ImageMetadataBase::TimeKeys

Definition at line 89 of file otbImageMetadata.h.


The documentation for this class was generated from the following file: