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

#include <otbVectorDataIOBase.h>

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

Public Types

typedef itk::SmartPointer< SelfPointer
 
typedef itk::Point< double, VDimensionPointType
 
typedef VectorDataIOBase Self
 
typedef itk::Vector< double, VDimensionSpacingType
 
typedef itk::LightProcessObject Superclass
 

Public Member Functions

virtual const char * GetNameOfClass () const
 

Static Public Attributes

static const unsigned int VDimension = 3
 
enum  ByteOrder {
  BigEndian,
  LittleEndian,
  OrderNotApplicable
}
 
typedef std::streamoff SizeType
 
ByteOrder m_ByteOrder
 
bool m_Initialized
 
std::string m_FileName
 
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 ()
 
std::string GetByteOrderAsString (ByteOrder) const
 
virtual bool CanReadFile (const char *) const =0
 
virtual bool CanStreamRead () const
 
virtual void Read (itk::DataObject *data)=0
 
virtual bool CanWriteFile (const char *) const =0
 
virtual bool CanStreamWrite () const
 
virtual void Write (const itk::DataObject *data, char **papszOptions=nullptr)=0
 
 VectorDataIOBase ()
 
 ~VectorDataIOBase () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
virtual void Reset (const bool freeDynamic=true)
 
 VectorDataIOBase (const Self &)=delete
 
void operator= (const Self &)=delete
 

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

◆ Pointer

typedef itk::SmartPointer<Self> otb::VectorDataIOBase::Pointer

Definition at line 66 of file otbVectorDataIOBase.h.

◆ PointType

typedef itk::Point<double, VDimension> otb::VectorDataIOBase::PointType

Definition at line 73 of file otbVectorDataIOBase.h.

◆ Self

Standard class typedefs.

Definition at line 64 of file otbVectorDataIOBase.h.

◆ SizeType

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.

◆ SpacingType

typedef itk::Vector<double, VDimension> otb::VectorDataIOBase::SpacingType

Definition at line 72 of file otbVectorDataIOBase.h.

◆ Superclass

typedef itk::LightProcessObject otb::VectorDataIOBase::Superclass

Definition at line 65 of file otbVectorDataIOBase.h.

Member Enumeration Documentation

◆ ByteOrder

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

◆ VectorDataIOBase() [1/2]

otb::VectorDataIOBase::VectorDataIOBase ( )
protected

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

◆ ~VectorDataIOBase()

otb::VectorDataIOBase::~VectorDataIOBase ( )
overrideprotected

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

◆ VectorDataIOBase() [2/2]

otb::VectorDataIOBase::VectorDataIOBase ( const Self )
privatedelete

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

Member Function Documentation

◆ CanReadFile()

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.

◆ CanStreamRead()

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.

◆ CanStreamWrite()

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

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

Definition at line 142 of file otbVectorDataIOBase.h.

◆ CanWriteFile()

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.

◆ GetByteOrder()

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

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

◆ GetByteOrderAsString()

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

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

◆ GetFileName()

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

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

◆ GetNameOfClass()

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

◆ operator=()

void otb::VectorDataIOBase::operator= ( const Self )
privatedelete

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

◆ PrintSelf()

void otb::VectorDataIOBase::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

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

◆ Read()

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

Reads the data from disk into the memory buffer provided.

Implemented in otb::OGRVectorDataIO.

◆ Reset()

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

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

◆ SetByteOrder()

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.

◆ SetByteOrderToBigEndian()

void otb::VectorDataIOBase::SetByteOrderToBigEndian ( )
inline

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

Definition at line 97 of file otbVectorDataIOBase.h.

◆ SetByteOrderToLittleEndian()

void otb::VectorDataIOBase::SetByteOrderToLittleEndian ( )
inline

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

Definition at line 101 of file otbVectorDataIOBase.h.

◆ SetFileName()

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

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

◆ Write()

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.

Member Data Documentation

◆ m_ByteOrder

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.

◆ m_FileName

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

Filename to read

Definition at line 169 of file otbVectorDataIOBase.h.

◆ m_Initialized

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.

◆ VDimension

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: