21 #ifndef otbVectorDataKeywordlist_h
22 #define otbVectorDataKeywordlist_h
28 #include "itkLightObject.h"
29 #include "itkObjectFactory.h"
30 #if defined(__GNUC__) || defined(__clang__)
31 #pragma GCC diagnostic push
32 #pragma GCC diagnostic ignored "-Wshadow"
33 #include "ogr_feature.h"
34 #pragma GCC diagnostic pop
36 #include "ogr_feature.h"
55 #include "OTBVectorDataBaseExport.h"
63 typedef std::pair<OGRFieldDefn*, OGRField>
FieldType;
68 return "VectorDataKeywordlist";
71 void AddField(OGRFieldDefn* fieldDefn, OGRField* field);
77 void AddField(
const std::string& key,
const std::string& value);
149 virtual void Print(std::ostream& os, itk::Indent indent = 0)
const;
165 unsigned int equalfields = 0;
168 for(
unsigned int i = 0; i < lhs.
m_FieldList.size(); ++i)
184 virtual void PrintSelf(std::ostream& os, itk::Indent indent)
const;
this class handle the metadata of vector data.
int GetFieldAsInt(const std::string &key) const
bool HasField(const std::string &key) const
friend bool operator==(const Self &lhs, const Self &rhs)
std::string GetFieldAsString(const std::string &key) const
void operator=(const Self &)
void SetFieldAsString(const std::string &key, const std::string &value)
void AddField(OGRFieldDefn *fieldDefn, OGRField *field)
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
std::string PrintField(FieldType field) const
void CopyFieldList(const Self &kwl)
virtual const char * GetNameOfClass() const
VectorDataKeywordlist Self
void AddField(const std::string &key, const std::string &value)
FieldType GetNthField(unsigned int index) const
std::pair< OGRFieldDefn *, OGRField > FieldType
double GetFieldAsDouble(const std::string &key) const
VectorDataKeywordlist(const Self &other)
virtual void Print(std::ostream &os, itk::Indent indent=0) const
FieldType CopyOgrField(FieldType field)
FieldListType m_FieldList
std::vector< std::string > GetFieldList() const
void SetFieldAsInt(const std::string &key, int value)
std::vector< FieldType > FieldListType
void SetFieldAsDouble(const std::string &key, double value)
unsigned int GetNumberOfFields() const
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
OTBCommon_EXPORT std::ostream & operator<<(std::ostream &os, const otb::StringToHTML &str)