Factory functions to create coordinate projections.
More...
Factory functions to create coordinate projections.
These factories make it easier to create projections from a variety of sources.
◆ make_projection() [1/3]
template<typename Coordinate >
Create a projection object from EPSG codes.
- Exceptions
-
- Note
- Currently only WGS84 to UTM and UTM to WGS84 are supported, so one of the EPSG codes must be "EPSG:4326" (WGS84) and the other must be a UTM EPSG code.
- Template Parameters
-
Coordinate | the coordinate type |
- Parameters
-
src_epsg | the source EPSG code |
dst_epsg | the destination EPSG code |
- Returns
- a unique_ptr to a projection object implementing the transformation between the two EPSG codes
Definition at line 128 of file projection_factories.cuh.
◆ make_projection() [2/3]
template<typename Coordinate >
cuproj::projection< Coordinate > * cuproj::make_projection |
( |
int | src_epsg, |
|
|
int const & | dst_epsg ) |
Create a projection object from integer EPSG codes.
- Exceptions
-
- Note
- Currently only WGS84 to UTM and UTM to WGS84 are supported, so one of the EPSG codes must be 4326 (WGS84) and the other must be a UTM EPSG code.
- Template Parameters
-
Coordinate | the coordinate type |
- Parameters
-
src_epsg | the source EPSG code |
dst_epsg | the destination EPSG code |
- Returns
- a pointer to a projection object implementing the transformation between the two EPSG codes
Definition at line 189 of file projection_factories.cuh.
◆ make_projection() [3/3]
template<typename Coordinate >
cuproj::projection< Coordinate > * cuproj::make_projection |
( |
std::string const & | src_epsg, |
|
|
std::string const & | dst_epsg ) |
Create a projection object from EPSG codes as "EPSG:XXXX" strings.
- Exceptions
-
- Note
- Currently only WGS84 to UTM and UTM to WGS84 are supported, so one of the EPSG codes must be "EPSG:4326" (WGS84) and the other must be a UTM EPSG code.
-
Auth strings are case insensitive
- Template Parameters
-
Coordinate | the coordinate type |
- Parameters
-
src_epsg | the source EPSG code |
dst_epsg | the destination EPSG code |
- Returns
- a pointer to a projection object implementing the transformation between the two EPSG codes
Definition at line 165 of file projection_factories.cuh.
◆ make_utm_projection()
template<typename Coordinate , typename T = typename Coordinate::value_type>
Create a WGS84<-->UTM projection for the given UTM zone and hemisphere.
- Template Parameters
-
Coordinate | the coordinate type |
Coordinate::value_type | the coordinate value type |
- Parameters
-
zone | the UTM zone |
hemisphere | the UTM hemisphere |
dir | if FORWARD, create a projection from UTM to WGS84, otherwise create a projection from WGS84 to UTM |
- Returns
- a unique_ptr to a projection object implementing the requested transformation
Definition at line 96 of file projection_factories.cuh.