OTB  6.7.0
Orfeo Toolbox
Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::ogr::DataSource Class Reference

#include <otbOGRDataSourceWrapper.h>

+ Inheritance diagram for otb::ogr::DataSource:
+ Collaboration diagram for otb::ogr::DataSource:

Classes

struct  boolean
 
class  layer_iter
 
struct  Modes
 

Public Types

typedef
OGRExtendedFilenameToOptions 
FileNameHelperType
 
Standard ITK typedefs
typedef DataSource Self
 
typedef itk::DataObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
- Public Types inherited from itk::DataObject
typedef SmartPointer< const SelfConstPointer
 
typedef std::string DataObjectIdentifierType
 
typedef std::vector< Pointer >
::size_type 
DataObjectPointerArraySizeType
 
typedef SmartPointer< SelfPointer
 
typedef DataObject 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

void AddLayerCreationOptions (std::vector< std::string > options)
 
bool Clear ()
 
std::string GetGlobalExtent (double &ulx, double &uly, double &lrx, double &lry, bool force=false) const
 
const std::vector< std::string > & GetLayerCreationOptions () const
 
void Graft (const itk::DataObject *data) override
 
bool HasCapability (std::string const &capabilityName) const
 
GDALDataset & ogr ()
 
 operator int boolean::* () const
 
void Reset (GDALDataset *source)
 
void SetLayerCreationOptions (const std::vector< std::string > &options)
 
int Size (bool doForceComputation) const
 
void SyncToDisk ()
 
OGREnvelope GetGlobalExtent (bool force=false, std::string *outwkt=nullptr) const
 
Layers modification
Layer CreateLayer (std::string const &name, OGRSpatialReference *poSpatialRef=nullptr, OGRwkbGeometryType eGType=wkbUnknown, std::vector< std::string > const &papszOptions=std::vector< std::string >())
 
void DeleteLayer (vcl_size_t i)
 
Layer CopyLayer (Layer &srcLayer, std::string const &newName, std::vector< std::string > const &papszOptions=std::vector< std::string >())
 
Layers access
Note
As the following accessors are not inlined, they aren't optimized.
int GetLayersCount () const
 
Layer GetLayer (vcl_size_t i)
 
Layer const GetLayer (vcl_size_t i) const
 
Layer GetLayer (std::string const &name)
 
Layer const GetLayer (std::string const &name) const
 
Layer GetLayerChecked (vcl_size_t i)
 
Layer const GetLayerChecked (vcl_size_t i) const
 
Layer GetLayerChecked (std::string const &name)
 
Layer const GetLayerChecked (std::string const &name) const
 
Layer ExecuteSQL (std::string const &statement, OGRGeometry *poSpatialFilter, char const *pszDialect)
 
- Public Member Functions inherited from itk::DataObject
virtual void CopyInformation (const DataObject *)
 
virtual void DataHasBeenGenerated ()
 
void DisconnectPipeline ()
 
bool GetDataReleased () const
 
virtual const ModifiedTimeTypeGetPipelineMTime () const
 
virtual const RealTimeStampGetRealTimeStamp () const
 
virtual const bool & GetReleaseDataFlag () const
 
SmartPointerForwardReference
< ProcessObject
GetSource () const
 
DataObjectPointerArraySizeType GetSourceOutputIndex () const
 
const DataObjectIdentifierTypeGetSourceOutputName () const
 
virtual ModifiedTimeType GetUpdateMTime () const
 
virtual void Initialize ()
 
virtual void PrepareForNewData ()
 
virtual void PropagateRequestedRegion ()
 
void ReleaseData ()
 
virtual void ReleaseDataFlagOff ()
 
virtual void ReleaseDataFlagOn ()
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
 
virtual void ResetPipeline ()
 
void SetPipelineMTime (ModifiedTimeType time)
 
virtual void SetRealTimeStamp (RealTimeStamp _arg)
 
void SetReleaseDataFlag (bool flag)
 
virtual void SetRequestedRegion (const DataObject *)
 
virtual void SetRequestedRegionToLargestPossibleRegion ()
 
bool ShouldIReleaseData () const
 
virtual void Update ()
 
virtual void UpdateOutputData ()
 
virtual void UpdateOutputInformation ()
 
virtual bool VerifyRequestedRegion ()
 
- 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 Member Functions

Creation functions
static Pointer New (std::string const &datasourcename, Modes::type mode=Modes::Read)
 
static Pointer New (GDALDataset *sourcemode, Modes::type mode=Modes::Read, const std::vector< std::string > &layerOptions=std::vector< std::string >())
 
- Static Public Member Functions inherited from itk::DataObject
static bool GetGlobalReleaseDataFlag ()
 
static void GlobalReleaseDataFlagOff ()
 
static void GlobalReleaseDataFlagOn ()
 
static void SetGlobalReleaseDataFlag (bool val)
 
- 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 ()
 

Protected Member Functions

 DataSource ()
 
 DataSource (GDALDataset *source, Modes::type mode, const std::vector< std::string > &layerOption=std::vector< std::string >())
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 ~DataSource () override
 
- Protected Member Functions inherited from itk::DataObject
 DataObject ()
 
virtual void PropagateResetPipeline ()
 
 ~DataObject ()
 
- 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 ()
 

Static Protected Member Functions

static Pointer OpenDataSource (std::string const &datasourceName, Modes::type mode)
 

Private Member Functions

std::string GetDatasetDescription () const
 
vcl_size_t GetLayerID (std::string const &name) const
 
int GetLayerIDUnchecked (std::string const &name) const
 
OGRLayer * GetLayerUnchecked (vcl_size_t i)
 
OGRLayer * GetLayerUnchecked (vcl_size_t i) const
 
bool IsLayerModifiable (vcl_size_t i) const
 
bool IsLayerModifiable (std::string const &name) const
 

Private Attributes

GDALDataset * m_DataSource
 
int m_FirstModifiableLayerID
 
std::vector< std::string > m_LayerOptions
 
Modes::type m_OpenMode
 

Standard macros

static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 

Iteration

typedef layer_iter< Layeriterator
 
typedef layer_iter< Layer const > const_iterator
 
template<class >
class layer_iter
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
iterator begin ()
 
iterator end ()
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Detailed Description

Collection of geometric objects.

This class is meant to supersede otb::VectorData class. It provides an encapsulation of OGR classes. In that particular case, it's an encapsulation of GDALDataset.

Note
Not meant to be inherited.
This class has an entity semantics: non-copyable, nor assignable.
OGRRegisterAll() is implicitly called on construction.
The following functions haven't been encapsulated (yet?):
  • SetStyleTable() & GetStyleTable()
  • SetDriver() & GetDriver()
  • all functions related to the reference count.
Since
OTB v 3.14.0

Definition at line 80 of file otbOGRDataSourceWrapper.h.

Member Typedef Documentation

Definition at line 251 of file otbOGRDataSourceWrapper.h.

Definition at line 88 of file otbOGRDataSourceWrapper.h.

Definition at line 91 of file otbOGRDataSourceWrapper.h.

Definition at line 250 of file otbOGRDataSourceWrapper.h.

Definition at line 87 of file otbOGRDataSourceWrapper.h.

Definition at line 85 of file otbOGRDataSourceWrapper.h.

Definition at line 86 of file otbOGRDataSourceWrapper.h.

Constructor & Destructor Documentation

otb::ogr::DataSource::DataSource ( )
protected

Default constructor. The actual GDALDataset is using the in-memory OGRSFDriver: OGRMemDriver.

Exceptions
itk::ExceptionObjectif the inner GDALDataset cannot be opened.
Note
OGRRegisterAll() is implicitly called on construction
See Also
DataSource::New()
otb::ogr::DataSource::DataSource ( GDALDataset *  source,
Modes::type  mode,
const std::vector< std::string > &  layerOption = std::vector< std::string >() 
)
protected

Init constructor.

Postcondition
The newly constructed object owns the source parameter.
otb::ogr::DataSource::~DataSource ( )
overrideprotected

Destructor.

Postcondition
The GDALDataset owned is released (if not null).

Member Function Documentation

void otb::ogr::DataSource::AddLayerCreationOptions ( std::vector< std::string >  options)
const_iterator otb::ogr::DataSource::begin ( ) const
inline

Definition at line 253 of file otbOGRDataSourceWrapper.h.

iterator otb::ogr::DataSource::begin ( )
const_iterator otb::ogr::DataSource::cbegin ( ) const
const_iterator otb::ogr::DataSource::cend ( ) const
bool otb::ogr::DataSource::Clear ( )

Clears the data source.

Postcondition
The GDALDataset owned is destroyed with the dedicated function from OGR API.
m_DataSource = 0
Layer otb::ogr::DataSource::CopyLayer ( Layer srcLayer,
std::string const &  newName,
std::vector< std::string > const &  papszOptions = std::vector< std::string >() 
)

Copies a layer.

Parameters
[in]srcLayerSource layer to copy. It may come from another DataSource.
[in]newNameName of the new layer
[in]papszOptionsCreation options
Returns
a proxy on the OGRLayer created.
Exceptions
itk::ExceptionObjectin case the layer cannot be created on the data source.
Note
A proxy-class is returned instead of a plain OGRLayer in order to encapsulate all lifetime management of the OGRLayer obtained (i.e. never to be destroyed). If you want to delete a layer obtained with CreateLayer(), you must use DeleteLayer().
The papszOptions parameter may later become a std::vector<std::string>.
See Also
GDALDataset::CopyLayer()
virtual::itk::LightObject::Pointer otb::ogr::DataSource::CreateAnother ( void  ) const
virtual

Default builder. This builder function creates a new DataSource with its default constructor. The actual GDALDataset is using the in-memory OGRSFDriver: OGRMemDriver.

Exceptions
itk::ExceptionObjectif the inner GDALDataset cannot be opened.
Note
OGRRegisterAll() is implicitly called on construction.
See Also
DataSource()

Reimplemented from itk::Object.

Layer otb::ogr::DataSource::CreateLayer ( std::string const &  name,
OGRSpatialReference *  poSpatialRef = nullptr,
OGRwkbGeometryType  eGType = wkbUnknown,
std::vector< std::string > const &  papszOptions = std::vector< std::string >() 
)

Creates a new layer.

Parameters
[in]namename for the layer
poSpatialRefthe coordinate system to use for the new layer, or NULL if no coordinate system is available.
[in]eGTypethe geometry type for the layer. Use wkbUnknown if there are no constraints on the types geometry to be written.
[in]papszOptionsa StringList of name=value options. Options are driver specific.
Returns
a proxy on the OGRLayer created.
Exceptions
itk::ExceptionObjectin case the layer cannot be created on the data source.
Note
A proxy-class is returned instead of a plain OGRLayer is order to encapsulate all lifetime management of the OGRLayer obtained (i.e. never to be destroyed). If you want to delete a layer obtained with CreateLayer(), you must use DeleteLayer().
The papszOptions parameter may later become a std::vector<std::string>.
See Also
GDALDataset::CreateLayer()

Referenced by otb::PersistentSamplingFilterBase< TInputImage, TMaskImage >::InitializeOutputDataSource().

void otb::ogr::DataSource::DeleteLayer ( vcl_size_t  i)

Deletes the i-th layer from the data source.

Parameters
[in]ilayer index
Exceptions
itk::ExceptionObjectin case the index is out of range
itk::ExceptionObjectif the layer cannot be deleted from the data source.
Precondition
The data source must support the delete operation.
The index i must be in range [0, GetLayersCount()).
See Also
GDALDataset::DeleteLayer()
const_iterator otb::ogr::DataSource::end ( ) const
inline

Definition at line 254 of file otbOGRDataSourceWrapper.h.

iterator otb::ogr::DataSource::end ( )
Layer otb::ogr::DataSource::ExecuteSQL ( std::string const &  statement,
OGRGeometry *  poSpatialFilter,
char const *  pszDialect 
)

Executes the statement..

Parameters
[in]statementtextual description of the SQL statement.
[in]poSpatialFilterGeometry representing a spatial filter – may be null.
[in]pszDialectallows control of the statement dialect. If set to NULL, the OGR SQL engine will be used, except for RDBMS drivers that will use their dedicated SQL engine, unless OGRSQL is explicitly passed as the dialect.
Returns
a new Layer that contains the matching Features. In case of error, or no matching result sets, a null Layer will be returned. Check for Layer's validity before doing anything else.
Exceptions
Noneeven when there is an error – OGR can not report errors, neither this wrapping.
Note
The returned Layer will be automatically collected on its destruction; i.e. unlike OGR API, no need to explicitly call GDALDataset::ReleaseResultSet().
See Also
GDALDataset::ExecuteSQL()
std::string otb::ogr::DataSource::GetDatasetDescription ( ) const
private

Get a string describing the dataset

std::string otb::ogr::DataSource::GetGlobalExtent ( double &  ulx,
double &  uly,
double &  lrx,
double &  lry,
bool  force = false 
) const

Retrieves the union of the extents of all layers.

Parameters
[out]ulxreference to upper-left x coordinate of the extent
[out]ulyreference to upper-left y coordinate of the extent
[out]lrxreference to lower-right x coordinate of the extent
[out]ulyreference to lower-right y coordinate of the extent
[in]forceForce computation of layers extents if not available. May force the driver to walk all geometries to compute the extent.
Returns
The Wkt of the extent projection (which is the wkt of the first layer SRS)
Exceptions
itk::ExceptionObjectif the layers extents can not be retrieved.
OGREnvelope otb::ogr::DataSource::GetGlobalExtent ( bool  force = false,
std::string *  outwkt = nullptr 
) const

Retrieves the union of the extents of all layers.

Parameters
[in]forceForce computation of layers extents if not available. May force the driver to walk all geometries to compute the extent.
[out]outwktThe Wkt of the extent projection (which is the wkt of the first layer SRS); if null, nothing is returned this way
Returns
the extent of all layers
Exceptions
itk::ExceptionObjectif the layers extents can not be retrieved.
otb::ogr::Layer otb::ogr::DataSource::GetLayer ( vcl_size_t  i)
inline
otb::ogr::Layer const otb::ogr::DataSource::GetLayer ( vcl_size_t  i) const
inline

Definition at line 62 of file otbOGRDataSourceWrapper.hxx.

Layer otb::ogr::DataSource::GetLayer ( std::string const &  name)

Unchecked Accessor to a given layer.

Parameters
[in]namename of the layer to search
Returns
the layer requested, possibly a null one.
Exceptions
None
Note
Use GetLayerChecked(std::string const&) if you'd rather have an exception instead of testing whether the layer obtained is valid.
otb::ogr::Layer const otb::ogr::DataSource::GetLayer ( std::string const &  name) const
inline

Unchecked Accessor to a given layer.

Parameters
[in]namename of the layer to search
Returns
the layer requested, possibly a null one.
Exceptions
None
Note
Use GetLayerChecked(std::string const&) if you'd rather have an exception instead of testing whether the layer obtained is valid.

Definition at line 68 of file otbOGRDataSourceWrapper.hxx.

Layer otb::ogr::DataSource::GetLayerChecked ( vcl_size_t  i)

Checked Accessor to a given layer.

Parameters
[in]iindex of the layer to access
Returns
a reference to the layer requested.
Precondition
i < GetLayersCount(), an exception is raised otherwise.
The layer must available, an exception is raised otherwise.
Note
Use GetLayer() if invalid indices, and null layers, are expected to be programming errors.
Exceptions
None
otb::ogr::Layer const otb::ogr::DataSource::GetLayerChecked ( vcl_size_t  i) const
inline

Checked Accessor to a given layer.

Parameters
[in]iindex of the layer to access
Returns
a reference to the layer requested.
Precondition
i < GetLayersCount(), an exception is raised otherwise.
The layer must available, an exception is raised otherwise.
Note
Use GetLayer() if invalid indices, and null layers, are expected to be programming errors.
Exceptions
None

Definition at line 75 of file otbOGRDataSourceWrapper.hxx.

Layer otb::ogr::DataSource::GetLayerChecked ( std::string const &  name)

Checked Accessor to a given layer.

Parameters
[in]namename of the layer to search
Returns
the layer requested, possibly a null one.
Exceptions
itk::ExceptionObjectif there exist no layer by that name
Note
Use GetLayer(std::string const&) if you'd rather test the obtained layer instead of catching an exception.
Layer const otb::ogr::DataSource::GetLayerChecked ( std::string const &  name) const

Checked Accessor to a given layer.

Parameters
[in]namename of the layer to search
Returns
the layer requested, possibly a null one.
Exceptions
itk::ExceptionObjectif there exist no layer by that name
Note
Use GetLayer(std::string const&) if you'd rather test the obtained layer instead of catching an exception.
const std::vector< std::string >& otb::ogr::DataSource::GetLayerCreationOptions ( ) const
vcl_size_t otb::ogr::DataSource::GetLayerID ( std::string const &  name) const
private
int otb::ogr::DataSource::GetLayerIDUnchecked ( std::string const &  name) const
private
int otb::ogr::DataSource::GetLayersCount ( ) const
OGRLayer* otb::ogr::DataSource::GetLayerUnchecked ( vcl_size_t  i)
private

Internal unchecked accessor to a given layer.

Parameters
[in]iindex of the layer to access
Returns
a reference to the layer requested.
Precondition
i < GetLayersCount(), return 0 otherwise
The layer must available, 0 is returned otherwise.
Exceptions
None
OGRLayer * otb::ogr::DataSource::GetLayerUnchecked ( vcl_size_t  i) const
inlineprivate

otb::ogr::DataSource::GetLayerUnchecked(size_t i)

otb::ogr::DataSource::GetLayerUnchecked(size_t i)

Definition at line 81 of file otbOGRDataSourceWrapper.hxx.

virtual const char* otb::ogr::DataSource::GetNameOfClass ( ) const
virtual

Default builder. This builder function creates a new DataSource with its default constructor. The actual GDALDataset is using the in-memory OGRSFDriver: OGRMemDriver.

Exceptions
itk::ExceptionObjectif the inner GDALDataset cannot be opened.
Note
OGRRegisterAll() is implicitly called on construction.
See Also
DataSource()

Reimplemented from itk::DataObject.

void otb::ogr::DataSource::Graft ( const itk::DataObject data)
overridevirtual

Grafts data and information from one data source to another.

Deprecated:
OGRLayer has an embedded input iterator. As a consequence, the layer cannot support multiple access to its elements.

This is a convenience function to setup a second data source with all the meta information of another data source and use the same underlying GDALDataset.

Reimplemented from itk::DataObject.

bool otb::ogr::DataSource::HasCapability ( std::string const &  capabilityName) const

Returns whether a capability is avalaible.

Parameters
[in]capabilityNamename of the capability to check.
Exceptions
None
See Also
GDALDataset::TestCapability()
bool otb::ogr::DataSource::IsLayerModifiable ( vcl_size_t  i) const
private
bool otb::ogr::DataSource::IsLayerModifiable ( std::string const &  name) const
private
static Pointer otb::ogr::DataSource::New ( )
static
static Pointer otb::ogr::DataSource::New ( std::string const &  datasourcename,
Modes::type  mode = Modes::Read 
)
static

Builder from an existing named data source.

Parameters
[in]datasourcenameOGR identifier of the data source
[in]modeopening mode (read or read-write)
Returns
a newly created DataSource.
Exceptions
itk::ExceptionObjectif the inner GDALDataset cannot be opened.
Note
OGRRegisterAll() is implicitly called on construction
See Also
DataSource(GDALDataset *)
static Pointer otb::ogr::DataSource::New ( GDALDataset *  sourcemode,
Modes::type  mode = Modes::Read,
const std::vector< std::string > &  layerOptions = std::vector< std::string >() 
)
static

Builder from a built GDALDataset.

Parameters
[in,out]sourceGDALDataset already constructed.
Returns
a newly created DataSource that assumes ownership of source.
Exceptions
Nothing
Note
OGRRegisterAll() is supposed to have been called before building source.
No condition is assumed on the non-nullity of source.
See Also
DataSource(GDALDataset *)
GDALDataset & otb::ogr::DataSource::ogr ( )
inline

Access to raw GDALDataset. This function provides an abstraction leak in case deeper control on the underlying GDALDataset is required.

Precondition
The underlying GDALDataset must be valid, i.e. m_DataSource != 0, an assertion is fired otherwise.
Warning
You must under no circumstance try to delete the GDALDataset obtained this way.

Definition at line 46 of file otbOGRDataSourceWrapper.hxx.

References m_DataSource.

static Pointer otb::ogr::DataSource::OpenDataSource ( std::string const &  datasourceName,
Modes::type  mode 
)
staticprotected
otb::ogr::DataSource::operator int boolean::* ( ) const
inline

Can the data source be used (ie not null).

Hack to provide a boolean operator that is convertible only to a boolean expression to be used in if tests.

See Also
Imperfect C++, Matthew Wilson, Addisson-Welsey, par 24.6

Definition at line 489 of file otbOGRDataSourceWrapper.h.

void otb::ogr::DataSource::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotectedvirtual

Prints self into stream.

Reimplemented from itk::DataObject.

void otb::ogr::DataSource::Reset ( GDALDataset *  source)

Resets current data source with the one in parameter.

Parameters
[in,out]sourcesource GDALDataset that this instance will own.
Exceptions
None
Postcondition
Assumes ownership of the source.
void otb::ogr::DataSource::SetLayerCreationOptions ( const std::vector< std::string > &  options)
int otb::ogr::DataSource::Size ( bool  doForceComputation) const

Returns the number of elements in the Data Source.

Parameters
[in]doForceComputationindicates whether the size shall be computed on each layer even so it's expensive to do so.
Returns
the number of features in the Data Source, -1 if count is unknown
Exceptions
None
See Also
OGRLayer::GetFeatureCount()
void otb::ogr::DataSource::SyncToDisk ( )

Flushes all changes to disk.

Friends And Related Function Documentation

template<class >
friend class layer_iter
friend

Definition at line 249 of file otbOGRDataSourceWrapper.h.

Member Data Documentation

GDALDataset* otb::ogr::DataSource::m_DataSource
private
int otb::ogr::DataSource::m_FirstModifiableLayerID
private

Definition at line 575 of file otbOGRDataSourceWrapper.h.

std::vector< std::string > otb::ogr::DataSource::m_LayerOptions
private

Definition at line 573 of file otbOGRDataSourceWrapper.h.

Modes::type otb::ogr::DataSource::m_OpenMode
private

Definition at line 574 of file otbOGRDataSourceWrapper.h.


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