Fixposition SDK 0.0.0-heads/main-0-g7b59b93
Collection of c++ libraries and apps for use with Fixposition products
Loading...
Searching...
No Matches
fpsdk::common::trafo::Transformer Class Reference

"Universal" coordinate transformer, backed by PROJ More...

#include <trafo.hpp>

Public Member Functions

 Transformer (const std::string &name="")
 Constructor.
 
bool Init (const std::string &source_crs, const std::string &target_crs)
 Initialise transformer.
 
bool Transform (Eigen::Vector3d &inout, const bool inv=false)
 Transform coordinates.
 
bool Transform (const Eigen::Vector3d &in, Eigen::Vector3d &out, const bool inv=false)
 Transform coordinates.
 
bool Transform (const Eigen::Vector4d &in, Eigen::Vector4d &out, const bool inv=false)
 Transform coordinates (with time)
 
Transformeroperator= (const Transformer &)=delete
 
 Transformer (const Transformer &)=delete
 
 Transformer (Transformer &&)=delete
 
Transformeroperator= (Transformer &&)=delete
 

Detailed Description

"Universal" coordinate transformer, backed by PROJ

Definition at line 208 of file trafo.hpp.

Constructor & Destructor Documentation

◆ Transformer()

fpsdk::common::trafo::Transformer::Transformer ( const std::string & name = "")

Constructor.

Parameters
[in]nameOptional name, for debugging

Member Function Documentation

◆ Init()

bool fpsdk::common::trafo::Transformer::Init ( const std::string & source_crs,
const std::string & target_crs )

Initialise transformer.

The source and target CRS specification can be anything that proj_create_crs_to_crs() understands (see https://proj.org/en/9.4/development/reference/functions.html#c.proj_create_crs_to_crs). You may have to change the PROJ configuration (proj.ini) and/or update some PROJ data yourself to support some CRS. See the PROJ documentation for details (see https://proj.org/en/9.4/resource_files.html).

Parameters
[in]source_crsSource coordinate reference system, e.g. "EPSG:4326"
[in]target_crsTarget coordinate reference system, e.g. "EPSG:2056"
Returns
true on success, false otherwise (bad params, missing data, ...)

◆ Transform() [1/3]

bool fpsdk::common::trafo::Transformer::Transform ( Eigen::Vector3d & inout,
const bool inv = false )

Transform coordinates.

Parameters
[in,out]inoutCoordinates to transform, will be replaced with result
[in]invDo the inverse transformation (true), default is forward (false)
Returns
true on success, false otherwise

◆ Transform() [2/3]

bool fpsdk::common::trafo::Transformer::Transform ( const Eigen::Vector3d & in,
Eigen::Vector3d & out,
const bool inv = false )

Transform coordinates.

Parameters
[in]inCoordinates to transform
[out]outTransformed coordinates
[in]invDo the inverse transformation (true), default is forward (false)
Returns
true on success, false otherwise

◆ Transform() [3/3]

bool fpsdk::common::trafo::Transformer::Transform ( const Eigen::Vector4d & in,
Eigen::Vector4d & out,
const bool inv = false )

Transform coordinates (with time)

Parameters
[in]inCoordinates to transform (with time)
[out]outTransformed coordinates (with time)
[in]invDo the inverse transformation (true), default is forward (false)
Returns
true on success, false otherwise

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