OTB  6.7.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::OGRCoordinateTransformationDeleter
CoordinateTransformationPtr
 

Public Member Functions

 CoordinateTransformation (const SpatialReference &source, const SpatialReference &destination)
 
 CoordinateTransformation (const CoordinateTransformation &other)
 
SpatialReference GetSourceSpatialReference () const
 
SpatialReference GetTargetSpatialReference () const
 
CoordinateTransformationoperator= (const CoordinateTransformation &other) noexcept
 
std::tuple< double, double,
double > 
Transform (const std::tuple< double, double, double > &in) const
 
std::tuple< double, double > Transform (const std::tuple< 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

Definition at line 84 of file otbCoordinateTransformation.h.

Constructor & Destructor Documentation

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
InvalidCoordinateTransfromationExceptionin case of failure
otb::CoordinateTransformation::CoordinateTransformation ( const CoordinateTransformation other)

Copy constructor.

Member Function Documentation

SpatialReference otb::CoordinateTransformation::GetSourceSpatialReference ( ) const
Returns
The source spatial reference
SpatialReference otb::CoordinateTransformation::GetTargetSpatialReference ( ) const
Returns
The target spatial reference
CoordinateTransformation& otb::CoordinateTransformation::operator= ( const CoordinateTransformation other)
noexcept

Asignment operator.

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
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

Friends And Related Function Documentation

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

different operator

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

equal operator

Member Data Documentation

CoordinateTransformationPtr otb::CoordinateTransformation::m_Transform
private

Definition at line 126 of file otbCoordinateTransformation.h.


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