OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
otb::CoordinateTransformation Class Reference

#include <otbCoordinateTransformation.h>

+ Collaboration diagram for otb::CoordinateTransformation:

Public Types

typedef std::unique_ptr< OGRCoordinateTransformation, internal::OGRCoordinateTransformationDeleterCoordinateTransformationPtr
 

Public Member Functions

 CoordinateTransformation (const CoordinateTransformation &other)
 
 CoordinateTransformation (const SpatialReference &source, const SpatialReference &destination)
 
SpatialReference GetSourceSpatialReference () const
 
SpatialReference GetTargetSpatialReference () const
 
CoordinateTransformationoperator= (const CoordinateTransformation &other) noexcept
 
std::tuple< double, double > Transform (const std::tuple< double, double > &in) const
 
std::tuple< double, double, double > Transform (const std::tuple< double, double, double > &in) const
 

Private Attributes

CoordinateTransformationPtr m_Transform
 

Friends

OTBGdalAdapters_EXPORT friend bool operator!= (const CoordinateTransformation &ct1, const CoordinateTransformation &ct2) noexcept
 
OTBGdalAdapters_EXPORT friend bool operator== (const CoordinateTransformation &ct1, const CoordinateTransformation &ct2) noexcept
 

Detailed Description

This class is a wrapper around OGRCoordinateTransformation.

This class is a wrapper around OGRCoordinateTransformation. It aims at manipulating coordinate transformations between spatial reference systems within OTB, in a safe and easy way. The class constructors enforce RAII: either they fail or they provide a definitive, valid object.

Definition at line 77 of file otbCoordinateTransformation.h.

Member Typedef Documentation

◆ CoordinateTransformationPtr

Definition at line 83 of file otbCoordinateTransformation.h.

Constructor & Destructor Documentation

◆ CoordinateTransformation() [1/2]

otb::CoordinateTransformation::CoordinateTransformation ( const SpatialReference source,
const SpatialReference destination 
)

Builds a coordinate transformation out of source and target spatial reference systems.

Parameters
sourceThe source spatial reference
targetThe target spatial reference
Exceptions
InvalidCoordinateTransformationExceptionin case of failure

◆ CoordinateTransformation() [2/2]

otb::CoordinateTransformation::CoordinateTransformation ( const CoordinateTransformation other)

Copy constructor.

Member Function Documentation

◆ GetSourceSpatialReference()

SpatialReference otb::CoordinateTransformation::GetSourceSpatialReference ( ) const
Returns
The source spatial reference

◆ GetTargetSpatialReference()

SpatialReference otb::CoordinateTransformation::GetTargetSpatialReference ( ) const
Returns
The target spatial reference

◆ operator=()

CoordinateTransformation& otb::CoordinateTransformation::operator= ( const CoordinateTransformation other)
noexcept

Assignment operator.

◆ Transform() [1/2]

std::tuple<double, double> otb::CoordinateTransformation::Transform ( const std::tuple< double, double > &  in) const

Transform a 2D point from source to target spatial reference

Parameters
inputcoords as a 2 double tuple
Returns
output coords as a 2 double tuple
Exceptions
TransformFailureExceptionif transform failed

◆ Transform() [2/2]

std::tuple<double, double, double> otb::CoordinateTransformation::Transform ( const std::tuple< double, double, double > &  in) const

Transform a 3D point from source to target spatial reference

Parameters
inputcoords as a 3 double tuple
Returns
output coords as a 3 double tuple
Exceptions
TransformFailureExceptionif transform failed

Friends And Related Function Documentation

◆ operator!=

OTBGdalAdapters_EXPORT friend bool operator!= ( const CoordinateTransformation ct1,
const CoordinateTransformation ct2 
)
friend

different operator

◆ operator==

OTBGdalAdapters_EXPORT friend bool operator== ( const CoordinateTransformation ct1,
const CoordinateTransformation ct2 
)
friend

equal operator

Member Data Documentation

◆ m_Transform

CoordinateTransformationPtr otb::CoordinateTransformation::m_Transform
private

Definition at line 125 of file otbCoordinateTransformation.h.


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