#include <otbGeometriesToGeometriesFilter.h>
Helper class to operate an exact copy of the fields from a source layer.
- Since
- OTB v 3.14.0
Definition at line 193 of file otbGeometriesToGeometriesFilter.h.
◆ DefineFields()
void otb::FieldCopyTransformation::DefineFields |
( |
ogr::Layer const & |
source, |
|
|
ogr::Layer & |
dest |
|
) |
| const |
Defines the fields in the destination layer. The default action is to copy all fields from one layer to another.
- Parameters
-
[in] | source | source Layer |
[in,out] | dest | destination Layer |
- Exceptions
-
itk::ExceptionObject | in case the operation cannot succeed. |
◆ fieldsTransform() [1/2]
void otb::FieldCopyTransformation::fieldsTransform |
( |
ogr::Feature const & |
| ) |
const |
|
inline |
◆ fieldsTransform() [2/2]
By-Copy transformation: copies all fields.
- Parameters
-
[in] | inFeature | input Feature |
[in,out] | outFeature | output Feature |
- Exceptions
-
itk::ExceptionObject | if the fields cannot be copied. |
◆ getDefinition()
OGRFeatureDefn& otb::FieldCopyTransformation::getDefinition |
( |
ogr::Layer & |
outLayer | ) |
const |
|
inline |
◆ m_SourceToDestFieldIndicesMap
std::map<int, int> otb::FieldCopyTransformation::m_SourceToDestFieldIndicesMap |
|
mutableprivate |
Associative table to know how fields are mapped from one layer to another. This table is necessary as:
- some data source drivers add their own fields (as a consequence, the number of fields differ between two layers).
- other data source drivers truncate the name of the fields (as a consequence, we can't rely on field names).
- Todo:
std::map
may not be the fastest structure available => use a (sorted?) vector of pairs of ints, and search with a simple std::find
(as we can expect the number of fields to be quite low).
Definition at line 238 of file otbGeometriesToGeometriesFilter.h.
The documentation for this struct was generated from the following file: