OTB
9.0.0
Orfeo Toolbox
|
#include <otbVectorDataKeywordlist.h>
Public Types | |
typedef std::vector< FieldType > | FieldListType |
typedef std::pair< OGRFieldDefn *, OGRField > | FieldType |
typedef VectorDataKeywordlist | Self |
Public Member Functions | |
void | AddField (const std::string &key, const std::string &value) |
void | AddField (OGRFieldDefn *fieldDefn, OGRField *field) |
void | CopyFieldList (const Self &kwl) |
double | GetFieldAsDouble (const std::string &key) const |
int | GetFieldAsInt (const std::string &key) const |
std::string | GetFieldAsString (const std::string &key) const |
std::vector< std::string > | GetFieldList () const |
virtual const char * | GetNameOfClass () const |
FieldType | GetNthField (unsigned int index) const |
unsigned int | GetNumberOfFields () const |
bool | HasField (const std::string &key) const |
void | operator= (const Self &) |
virtual void | Print (std::ostream &os, itk::Indent indent=0) const |
void | SetFieldAsDouble (const std::string &key, double value) |
void | SetFieldAsInt (const std::string &key, int value) |
void | SetFieldAsString (const std::string &key, const std::string &value) |
VectorDataKeywordlist () | |
VectorDataKeywordlist (const Self &other) | |
~VectorDataKeywordlist () | |
Protected Member Functions | |
virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const |
Private Member Functions | |
FieldType | CopyOgrField (FieldType field) |
std::string | PrintField (FieldType field) const |
Private Attributes | |
FieldListType | m_FieldList |
this class handle the metadata of vector data.
This class is used internally to handle the information associated with a vector object. This information is retrieved from the input file (a shapefile for example) and propagated along the pipeline with the object.
This is the equivalent of the otbImageKeywordlist class but for OGR information.
Definition at line 57 of file otbVectorDataKeywordlist.h.
typedef std::vector<FieldType> otb::VectorDataKeywordlist::FieldListType |
Definition at line 64 of file otbVectorDataKeywordlist.h.
typedef std::pair<OGRFieldDefn*, OGRField> otb::VectorDataKeywordlist::FieldType |
Definition at line 63 of file otbVectorDataKeywordlist.h.
Smart pointer typedef support.
Definition at line 61 of file otbVectorDataKeywordlist.h.
otb::VectorDataKeywordlist::VectorDataKeywordlist | ( | ) |
Constructor
otb::VectorDataKeywordlist::~VectorDataKeywordlist | ( | ) |
Destructor
otb::VectorDataKeywordlist::VectorDataKeywordlist | ( | const Self & | other | ) |
Constructor by copy (deep copy)
void otb::VectorDataKeywordlist::AddField | ( | const std::string & | key, |
const std::string & | value | ||
) |
key | The name of the field. |
value | The value of the field. |
void otb::VectorDataKeywordlist::AddField | ( | OGRFieldDefn * | fieldDefn, |
OGRField * | field | ||
) |
void otb::VectorDataKeywordlist::CopyFieldList | ( | const Self & | kwl | ) |
Copy all the fields from another kwl
Referenced by otb::DataNode< TPrecision, VDimension, TValuePrecision >::CopyFieldList().
double otb::VectorDataKeywordlist::GetFieldAsDouble | ( | const std::string & | key | ) | const |
Returns the value associated with a field name.
key | The name of the field. |
Referenced by otb::DataNode< TPrecision, VDimension, TValuePrecision >::GetFieldAsDouble().
int otb::VectorDataKeywordlist::GetFieldAsInt | ( | const std::string & | key | ) | const |
Returns the value associated with a field name.
key | The name of the field. |
Referenced by otb::DataNode< TPrecision, VDimension, TValuePrecision >::GetFieldAsInt().
std::string otb::VectorDataKeywordlist::GetFieldAsString | ( | const std::string & | key | ) | const |
Returns the value associated with a field name.
key | The name of the field. |
Referenced by otb::DataNode< TPrecision, VDimension, TValuePrecision >::GetFieldAsString().
std::vector<std::string> otb::VectorDataKeywordlist::GetFieldList | ( | ) | const |
Referenced by otb::DataNode< TPrecision, VDimension, TValuePrecision >::GetFieldList().
|
inlinevirtual |
Definition at line 66 of file otbVectorDataKeywordlist.h.
FieldType otb::VectorDataKeywordlist::GetNthField | ( | unsigned int | index | ) | const |
index | the index of the field to return. |
unsigned int otb::VectorDataKeywordlist::GetNumberOfFields | ( | ) | const |
bool otb::VectorDataKeywordlist::HasField | ( | const std::string & | key | ) | const |
key | The name of the field. |
Referenced by otb::DataNode< TPrecision, VDimension, TValuePrecision >::HasField().
void otb::VectorDataKeywordlist::operator= | ( | const Self & | ) |
Deep copy operator
|
virtual |
Print the keyword list
|
private |
|
protectedvirtual |
void otb::VectorDataKeywordlist::SetFieldAsDouble | ( | const std::string & | key, |
double | value | ||
) |
key | The name of the field. |
value | The value of the field. |
Referenced by otb::DataNode< TPrecision, VDimension, TValuePrecision >::SetFieldAsDouble().
void otb::VectorDataKeywordlist::SetFieldAsInt | ( | const std::string & | key, |
int | value | ||
) |
Set the field as an integer
key | The name of the field. |
value | The value of the field. |
Referenced by otb::DataNode< TPrecision, VDimension, TValuePrecision >::SetFieldAsInt().
void otb::VectorDataKeywordlist::SetFieldAsString | ( | const std::string & | key, |
const std::string & | value | ||
) |
key | The name of the field. |
value | The value of the field. |
Referenced by otb::DataNode< TPrecision, VDimension, TValuePrecision >::SetFieldAsString().
|
private |
Definition at line 169 of file otbVectorDataKeywordlist.h.