NDEVR
API Documentation
CoordinateConverterabstract

Forward declaration of the File class. More...

Inheritance diagram for CoordinateConverter:
[legend]
Collaboration diagram for CoordinateConverter:
[legend]

Public Member Functions

 CoordinateConverter (const CoordinateProjection &to_projection, const CoordinateProjection &from_projection)
 Constructs a CoordinateConverter with the given source and destination projections.
virtual ~CoordinateConverter ()
 Virtual destructor for safe polymorphic deletion.
virtual Bounds< 2, fltp08convert (const Bounds< 2, fltp08 > &location, bool inverse=false) const =0
 Converts a 2D bounding box from one projection to another.
virtual Bounds< 3, fltp08convert (const Bounds< 3, fltp08 > &location, bool inverse=false) const =0
 Converts a 3D bounding box from one projection to another.
virtual Matrix< fltp08convert (const Matrix< fltp08 > &location, bool inverse=false) const =0
 Converts a transformation matrix from one projection to another.
virtual Vertex< 2, fltp08convert (const Vertex< 2, fltp08 > &location, bool inverse=false) const =0
 Converts a 2D vertex from one projection to another.
virtual Vertex< 3, fltp08convert (const Vertex< 3, fltp08 > &location, bool inverse=false) const =0
 Converts a 3D vertex from one projection to another.
CoordinateProjection fromProjection ()
 Returns the source coordinate projection.
virtual void setDestinationProjection (const CoordinateProjection &to_projection)=0
 Sets the destination coordinate projection.
virtual void setSourceProjection (const CoordinateProjection &from_projection)=0
 Sets the source coordinate projection.
CoordinateProjection toProjection ()
 Returns the destination coordinate projection.

Protected Attributes

CoordinateProjection m_from_projection
 The source coordinate projection to convert from.
CoordinateProjection m_to_projection
 The destination coordinate projection to convert into.

Detailed Description

Forward declaration of the File class.


Stores different projections and then converts data from one projection into another.

See also
CoordinateProjection, CoordinateProjectionManager

Definition at line 45 of file CoordinateConverter.h.

Constructor & Destructor Documentation

◆ CoordinateConverter()

CoordinateConverter::CoordinateConverter ( const CoordinateProjection & to_projection,
const CoordinateProjection & from_projection )
inline

Constructs a CoordinateConverter with the given source and destination projections.

Parameters
[in]to_projectionThe target coordinate projection to convert into.
[in]from_projectionThe source coordinate projection to convert from.

Definition at line 53 of file CoordinateConverter.h.

References m_from_projection, and m_to_projection.

Member Function Documentation

◆ convert() [1/5]

virtual Bounds< 2, fltp08 > CoordinateConverter::convert ( const Bounds< 2, fltp08 > & location,
bool inverse = false ) const
pure virtual

Converts a 2D bounding box from one projection to another.

Parameters
[in]locationThe 2D bounds to convert.
[in]inverseIf true, performs the inverse conversion (destination to source).
Returns
The converted 2D bounds.

Implemented in Proj4CoordinateConverter.

◆ convert() [2/5]

virtual Bounds< 3, fltp08 > CoordinateConverter::convert ( const Bounds< 3, fltp08 > & location,
bool inverse = false ) const
pure virtual

Converts a 3D bounding box from one projection to another.

Parameters
[in]locationThe 3D bounds to convert.
[in]inverseIf true, performs the inverse conversion (destination to source).
Returns
The converted 3D bounds.

Implemented in Proj4CoordinateConverter.

◆ convert() [3/5]

virtual Matrix< fltp08 > CoordinateConverter::convert ( const Matrix< fltp08 > & location,
bool inverse = false ) const
pure virtual

Converts a transformation matrix from one projection to another.

Parameters
[in]locationThe matrix to convert.
[in]inverseIf true, performs the inverse conversion (destination to source).
Returns
The converted matrix.

Implemented in Proj4CoordinateConverter.

◆ convert() [4/5]

virtual Vertex< 2, fltp08 > CoordinateConverter::convert ( const Vertex< 2, fltp08 > & location,
bool inverse = false ) const
pure virtual

Converts a 2D vertex from one projection to another.

Parameters
[in]locationThe 2D coordinate to convert.
[in]inverseIf true, performs the inverse conversion (destination to source).
Returns
The converted 2D coordinate.

Implemented in Proj4CoordinateConverter.

◆ convert() [5/5]

virtual Vertex< 3, fltp08 > CoordinateConverter::convert ( const Vertex< 3, fltp08 > & location,
bool inverse = false ) const
pure virtual

Converts a 3D vertex from one projection to another.

Parameters
[in]locationThe 3D coordinate to convert.
[in]inverseIf true, performs the inverse conversion (destination to source).
Returns
The converted 3D coordinate.

Implemented in Proj4CoordinateConverter.

◆ fromProjection()

CoordinateProjection CoordinateConverter::fromProjection ( )
inline

Returns the source coordinate projection.

Returns
The projection that input coordinates are expected to be in.

Definition at line 66 of file CoordinateConverter.h.

References m_from_projection.

◆ setDestinationProjection()

virtual void CoordinateConverter::setDestinationProjection ( const CoordinateProjection & to_projection)
pure virtual

Sets the destination coordinate projection.

Parameters
[in]to_projectionThe new destination projection.

Implemented in Proj4CoordinateConverter.

◆ setSourceProjection()

virtual void CoordinateConverter::setSourceProjection ( const CoordinateProjection & from_projection)
pure virtual

Sets the source coordinate projection.

Parameters
[in]from_projectionThe new source projection.

Implemented in Proj4CoordinateConverter.

◆ toProjection()

CoordinateProjection CoordinateConverter::toProjection ( )
inline

Returns the destination coordinate projection.

Returns
The projection that output coordinates will be converted into.

Definition at line 71 of file CoordinateConverter.h.

References m_to_projection.


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