OTB  6.7.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
otb::VectorDataIOBase Class Referenceabstract

#include <otbVectorDataIOBase.h>

+ Inheritance diagram for otb::VectorDataIOBase:
+ Collaboration diagram for otb::VectorDataIOBase:

Public Types

enum  ByteOrder {
  BigEndian,
  LittleEndian,
  OrderNotApplicable
}
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::Point< double,
VDimension
PointType
 
typedef VectorDataIOBase Self
 
typedef std::streamoff SizeType
 
typedef itk::Vector< double,
VDimension
SpacingType
 
typedef itk::LightProcessObject Superclass
 
- Public Types inherited from itk::LightProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightProcessObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual bool CanReadFile (const char *) const =0
 
virtual bool CanStreamRead () const
 
virtual bool CanStreamWrite () const
 
virtual bool CanWriteFile (const char *) const =0
 
std::string GetByteOrderAsString (ByteOrder) const
 
virtual const char * GetNameOfClass () const
 
virtual void Read (itk::DataObject *data)=0
 
virtual void Write (const itk::DataObject *data, char **papszOptions=nullptr)=0
 
virtual void SetFileName (const char *_arg)
 
virtual const char * GetFileName () const
 
virtual void SetByteOrder (const ByteOrder _arg)
 
virtual ByteOrder GetByteOrder () const
 
void SetByteOrderToBigEndian ()
 
void SetByteOrderToLittleEndian ()
 
- Public Member Functions inherited from itk::LightProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const bool & GetAbortGenerateData () const
 
virtual const float & GetProgress () const
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void SetProgress (float _arg)
 
virtual void UpdateOutputData ()
 
void UpdateProgress (float amount)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Attributes

static const unsigned int VDimension = 3
 

Protected Member Functions

void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
virtual void Reset (const bool freeDynamic=true)
 
 VectorDataIOBase ()
 
 ~VectorDataIOBase () override
 
- Protected Member Functions inherited from itk::LightProcessObject
virtual void GenerateData ()
 
 LightProcessObject ()
 
 ~LightProcessObject ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Protected Attributes

ByteOrder m_ByteOrder
 
std::string m_FileName
 
bool m_Initialized
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Private Member Functions

void operator= (const Self &)=delete
 
 VectorDataIOBase (const Self &)=delete
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::LightProcessObject
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Detailed Description

Abstract superclass defines VectorData IO interface.

VectorDataIOBase is a class that reads and/or writes VectorData data of a particular format (such as shapefile or kml). The VectorDataIOBase encapsulates both the reading and writing of data. The VectorDataIOBase is used by the VectorDataFileReader class (to read data) and the VectorDataFileWriter (to write data) into a single file. Normally the user does not directly manipulate this class other than to instantiate it, set the FileName, and assign it to a VectorDataFileReader/VectorDataFileWriter.

A Pluggable factory pattern is used this allows different kinds of readers to be registered (even at run time) without having to modify the code in this class.

See Also
VectorDataFileWriter
VectorDataFileReader

Definition at line 60 of file otbVectorDataIOBase.h.

Member Typedef Documentation

Definition at line 66 of file otbVectorDataIOBase.h.

Definition at line 73 of file otbVectorDataIOBase.h.

Standard class typedefs.

Definition at line 64 of file otbVectorDataIOBase.h.

typedef std::streamoff otb::VectorDataIOBase::SizeType

Type for representing size of bytes, and or positions along a file

Definition at line 112 of file otbVectorDataIOBase.h.

Definition at line 72 of file otbVectorDataIOBase.h.

Definition at line 65 of file otbVectorDataIOBase.h.

Member Enumeration Documentation

Enums used to specify byte order; whether Big Endian or Little Endian. Some subclasses use this, some ignore it.

Enumerator
BigEndian 
LittleEndian 
OrderNotApplicable 

Definition at line 82 of file otbVectorDataIOBase.h.

Constructor & Destructor Documentation

otb::VectorDataIOBase::VectorDataIOBase ( )
protected
otb::VectorDataIOBase::~VectorDataIOBase ( )
overrideprotected
otb::VectorDataIOBase::VectorDataIOBase ( const Self )
privatedelete

Member Function Documentation

virtual bool otb::VectorDataIOBase::CanReadFile ( const char *  ) const
pure virtual

Determine the file type. Returns true if this VectorDataIO can read the file specified.

Implemented in otb::OGRVectorDataIO, and otb::KMLVectorDataIO.

virtual bool otb::VectorDataIOBase::CanStreamRead ( ) const
inlinevirtual

Determine if the VectorDataIO can stream reading from this file. Default is false.

Definition at line 122 of file otbVectorDataIOBase.h.

virtual bool otb::VectorDataIOBase::CanStreamWrite ( void  ) const
inlinevirtual

Determine if the ImageIO can stream writing to this file. Default is false.

Definition at line 142 of file otbVectorDataIOBase.h.

virtual bool otb::VectorDataIOBase::CanWriteFile ( const char *  ) const
pure virtual

Determine the file type. Returns true if this VectorDataIO can read the file specified.

Implemented in otb::OGRVectorDataIO, and otb::KMLVectorDataIO.

virtual ByteOrder otb::VectorDataIOBase::GetByteOrder ( ) const
virtual

These methods indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. Note: most UNIX machines are BigEndian while PC's and VAX's are LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetByteOrderToLittleEndian() otherwise SetByteOrderToBigEndian(). Some ImageIOBase subclasses ignore these methods.

std::string otb::VectorDataIOBase::GetByteOrderAsString ( ByteOrder  ) const

Convenience method returns the ByteOrder as a string. This can be used for writing output files.

virtual const char* otb::VectorDataIOBase::GetFileName ( ) const
virtual

Set/Get the name of the file to be read.

virtual const char* otb::VectorDataIOBase::GetNameOfClass ( ) const
virtual
void otb::VectorDataIOBase::operator= ( const Self )
privatedelete
void otb::VectorDataIOBase::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotectedvirtual

Reimplemented from itk::LightProcessObject.

Reimplemented in otb::OGRVectorDataIO, and otb::KMLVectorDataIO.

virtual void otb::VectorDataIOBase::Read ( itk::DataObject data)
pure virtual

Reads the data from disk into the memory buffer provided.

Implemented in otb::OGRVectorDataIO, and otb::KMLVectorDataIO.

virtual void otb::VectorDataIOBase::Reset ( const bool  freeDynamic = true)
protectedvirtual

Return the object to an initialized state, ready to be used

virtual void otb::VectorDataIOBase::SetByteOrder ( const ByteOrder  _arg)
virtual

These methods indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. Note: most UNIX machines are BigEndian while PC's and VAX's are LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetByteOrderToLittleEndian() otherwise SetByteOrderToBigEndian(). Some ImageIOBase subclasses ignore these methods.

void otb::VectorDataIOBase::SetByteOrderToBigEndian ( )
inline

These methods indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. Note: most UNIX machines are BigEndian while PC's and VAX's are LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetByteOrderToLittleEndian() otherwise SetByteOrderToBigEndian(). Some ImageIOBase subclasses ignore these methods.

Definition at line 97 of file otbVectorDataIOBase.h.

void otb::VectorDataIOBase::SetByteOrderToLittleEndian ( )
inline

These methods indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. Note: most UNIX machines are BigEndian while PC's and VAX's are LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetByteOrderToLittleEndian() otherwise SetByteOrderToBigEndian(). Some ImageIOBase subclasses ignore these methods.

Definition at line 101 of file otbVectorDataIOBase.h.

virtual void otb::VectorDataIOBase::SetFileName ( const char *  _arg)
virtual

Set/Get the name of the file to be read.

virtual void otb::VectorDataIOBase::Write ( const itk::DataObject data,
char **  papszOptions = nullptr 
)
pure virtual

Writes the data to disk from the memory buffer provided. Make sure that the IORegions has been set properly. The buffer is cast to a pointer to the beginning of the image data.

Implemented in otb::OGRVectorDataIO, and otb::KMLVectorDataIO.

Member Data Documentation

ByteOrder otb::VectorDataIOBase::m_ByteOrder
protected

Big or Little Endian, and the type of the file. (May be ignored.)

Definition at line 163 of file otbVectorDataIOBase.h.

std::string otb::VectorDataIOBase::m_FileName
protected

Filename to read

Definition at line 169 of file otbVectorDataIOBase.h.

bool otb::VectorDataIOBase::m_Initialized
protected

Does the VectorDataIOBase object have enough info to be of use?

Definition at line 166 of file otbVectorDataIOBase.h.

const unsigned int otb::VectorDataIOBase::VDimension = 3
static

Definition at line 71 of file otbVectorDataIOBase.h.


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