Loading...
Searching...
No Matches
cuproj::projection< Coordinate, T > Class Template Reference

A projection transforms coordinates between coordinate reference systems. More...

Public Member Functions

 projection (std::vector< operation_type > const &operations, projection_parameters< T > const &params, direction dir=direction::FORWARD)
 Construct a new projection object.
 
device_projection< Coordinate > get_device_projection (direction dir) const
 Get a device_projection object that can be passed to device code.
 
template<class InputCoordIter , class OutputCoordIter >
void transform (InputCoordIter first, InputCoordIter last, OutputCoordIter result, direction dir, rmm::cuda_stream_view stream=rmm::cuda_stream_default) const
 Transform a range of coordinates.
 

Detailed Description

template<typename Coordinate, typename T = typename Coordinate::value_type>
class cuproj::projection< Coordinate, T >

A projection transforms coordinates between coordinate reference systems.

Projections are constructed from a list of operations to be applied to coordinates. The operations are applied in order, either forward or inverse.

Template Parameters
Coordinatethe coordinate type
Tthe coordinate value type. Specify this if Coordinate does not have a value_type

Definition at line 59 of file projection.cuh.

Constructor & Destructor Documentation

◆ projection()

template<typename Coordinate , typename T = typename Coordinate::value_type>
cuproj::projection< Coordinate, T >::projection ( std::vector< operation_type > const & operations,
projection_parameters< T > const & params,
direction dir = direction::FORWARD )
inline

Construct a new projection object.

Parameters
operationsthe list of operations to apply to coordinates
paramsthe projection parameters
dirthe default order to execute the operations, FORWARD or INVERSE

Definition at line 68 of file projection.cuh.

Member Function Documentation

◆ get_device_projection()

template<typename Coordinate , typename T = typename Coordinate::value_type>
device_projection< Coordinate > cuproj::projection< Coordinate, T >::get_device_projection ( direction dir) const
inline

Get a device_projection object that can be passed to device code.

This object can be used to transform coordinates on the device.

Note
The implementation is in detail::pipeline.
Parameters
dirthe direction of the transform, FORWARD or INVERSE.
Returns
the device projection

Definition at line 86 of file projection.cuh.

◆ transform()

template<typename Coordinate , typename T = typename Coordinate::value_type>
template<class InputCoordIter , class OutputCoordIter >
void cuproj::projection< Coordinate, T >::transform ( InputCoordIter first,
InputCoordIter last,
OutputCoordIter result,
direction dir,
rmm::cuda_stream_view stream = rmm::cuda_stream_default ) const
inline

Transform a range of coordinates.

Template Parameters
CoordIterthe coordinate iterator type
Parameters
firstthe start of the coordinate range
lastthe end of the coordinate range
resultthe output coordinate range
dirthe direction of the transform, FORWARD or INVERSE. If INVERSE, the operations will run in the reverse order of the direction specified in the constructor.
streamthe CUDA stream on which to run the transform

Definition at line 105 of file projection.cuh.


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