WorldToEcef and EcefToWorld free functions
Summary
GeocentricTransform<TDirectionOfMapping, TScalarType>
is a otb::Transform
that can be used to transform geographic points to and from ECEF points.
In some cases it is interesting to perform the conversion without having to instantiate a transform object, for example if only one conversion is required. This MR implements otb::Projection::WorldToEcef and otb::Projection::EcefToWorld as free function. These functions are used internally by GeocentricTransform
See this discussion
Implementation Details
The functions are implemented in Modules/Core/Transform/GeocentricTransform.h/hxx
and are templated over the scalar type and over a struct holding the ellipsoid parameters used for the computations. By default the WGS84 ellispoid parameters (new struct otb::Projection::WGS84Ellispoid
) are used. Prior to this merge request, these parameters were stored in GeocentricTransform
Additionally, this MR removes useless map projection instantiation in the GeocentricTransform
constructor, which is now defaulted.
Copyright
The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.
Check before merging:
- All discussions are resolved
- At least 2
👍 votes from core developers, no👎 vote. - The feature branch is (reasonably) up-to-date with the base branch
- Dashboard is green
- Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
- Optionally, run
git diff develop... -U0 --no-color | clang-format-diff.py -p1 -i
on latest changes and commit