OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeoOpsRuntime.cpp File Reference
#include "Geospatial/Utm.h"
+ Include dependency graph for GeoOpsRuntime.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ALWAYS_INLINE double transform_4326_900913_x (const double x, double)
 
ALWAYS_INLINE double transform_4326_900913_y (double, const double y)
 
ALWAYS_INLINE double transform_900913_4326_x (const double x, double)
 
ALWAYS_INLINE double transform_900913_4326_y (double, const double y)
 
ALWAYS_INLINE double transform_4326_utm_x (unsigned const utm_srid, double const x, double const y)
 
ALWAYS_INLINE double transform_4326_utm_y (unsigned const utm_srid, double const x, double const y)
 
ALWAYS_INLINE double transform_utm_4326_x (unsigned const utm_srid, double const x, double const y)
 
ALWAYS_INLINE double transform_utm_4326_y (unsigned const utm_srid, double const x, double const y)
 
ALWAYS_INLINE double transform_900913_utm_x (unsigned const utm_srid, double const x, double const y)
 
ALWAYS_INLINE double transform_900913_utm_y (unsigned const utm_srid, double const x, double const y)
 
ALWAYS_INLINE double transform_utm_900913_x (unsigned const utm_srid, double const x, double const y)
 
ALWAYS_INLINE double transform_utm_900913_y (unsigned const utm_srid, double const x, double const y)
 

Function Documentation

ALWAYS_INLINE double transform_4326_900913_x ( const double  x,
double   
)

Definition at line 19 of file GeoOpsRuntime.cpp.

References anonymous_namespace{Utm.h}::a, and math_consts::rad_div_deg.

Referenced by transform_utm_900913_x().

19  {
20  constexpr double a = 6378137; // WGS84 Equatorial radius (m)
21  constexpr double c = a * math_consts::rad_div_deg;
22  return c * x;
23 }
constexpr double rad_div_deg
Definition: math_consts.h:21
constexpr double a
Definition: Utm.h:32

+ Here is the caller graph for this function:

ALWAYS_INLINE double transform_4326_900913_y ( double  ,
const double  y 
)

Definition at line 26 of file GeoOpsRuntime.cpp.

References anonymous_namespace{Utm.h}::a, and math_consts::m_pi.

Referenced by transform_utm_900913_y().

26  {
27  constexpr double a = 6378137; // WGS84 Equatorial radius (m)
28  constexpr double rad_div_two_deg = math_consts::m_pi / (2 * 180);
29  constexpr double pi_div_four = math_consts::m_pi / 4;
30  return a * log(tan(rad_div_two_deg * y + pi_div_four));
31 }
constexpr double m_pi
Definition: math_consts.h:20
constexpr double a
Definition: Utm.h:32

+ Here is the caller graph for this function:

ALWAYS_INLINE double transform_4326_utm_x ( unsigned const  utm_srid,
double const  x,
double const  y 
)

Definition at line 46 of file GeoOpsRuntime.cpp.

References Transform4326ToUTM::calculateX().

Referenced by transform_900913_utm_x().

48  {
49  return Transform4326ToUTM(utm_srid, x, y).calculateX();
50 }
DEVICE ALWAYS_INLINE double calculateX() const
Definition: Utm.h:170

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ALWAYS_INLINE double transform_4326_utm_y ( unsigned const  utm_srid,
double const  x,
double const  y 
)

Definition at line 52 of file GeoOpsRuntime.cpp.

References Transform4326ToUTM::calculateY().

Referenced by transform_900913_utm_y().

54  {
55  return Transform4326ToUTM(utm_srid, x, y).calculateY();
56 }
DEVICE ALWAYS_INLINE double calculateY() const
Definition: Utm.h:195

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ALWAYS_INLINE double transform_900913_4326_x ( const double  x,
double   
)

Definition at line 33 of file GeoOpsRuntime.cpp.

References anonymous_namespace{Utm.h}::a, and math_consts::deg_div_rad.

Referenced by transform_900913_utm_x(), and transform_900913_utm_y().

33  {
34  constexpr double a = 6378137; // WGS84 Equatorial radius (m)
35  constexpr double c = math_consts::deg_div_rad / a;
36  return c * x;
37 }
constexpr double deg_div_rad
Definition: math_consts.h:22
constexpr double a
Definition: Utm.h:32

+ Here is the caller graph for this function:

ALWAYS_INLINE double transform_900913_4326_y ( double  ,
const double  y 
)

Definition at line 39 of file GeoOpsRuntime.cpp.

References anonymous_namespace{Utm.h}::a, and math_consts::m_pi.

Referenced by transform_900913_utm_x(), and transform_900913_utm_y().

39  {
40  constexpr double a = 6378137; // WGS84 Equatorial radius (m)
41  constexpr double a_inv = 1 / a;
42  constexpr double two_deg_div_rad = 2 * 180 / math_consts::m_pi;
43  return two_deg_div_rad * atan(exp(a_inv * y)) - 90;
44 }
constexpr double m_pi
Definition: math_consts.h:20
constexpr double a
Definition: Utm.h:32

+ Here is the caller graph for this function:

ALWAYS_INLINE double transform_900913_utm_x ( unsigned const  utm_srid,
double const  x,
double const  y 
)

Definition at line 70 of file GeoOpsRuntime.cpp.

References transform_4326_utm_x(), transform_900913_4326_x(), and transform_900913_4326_y().

72  {
73  return transform_4326_utm_x(
74  utm_srid, transform_900913_4326_x(x, {}), transform_900913_4326_y({}, y));
75 }
ALWAYS_INLINE double transform_900913_4326_y(double, const double y)
ALWAYS_INLINE double transform_4326_utm_x(unsigned const utm_srid, double const x, double const y)
ALWAYS_INLINE double transform_900913_4326_x(const double x, double)

+ Here is the call graph for this function:

ALWAYS_INLINE double transform_900913_utm_y ( unsigned const  utm_srid,
double const  x,
double const  y 
)

Definition at line 77 of file GeoOpsRuntime.cpp.

References transform_4326_utm_y(), transform_900913_4326_x(), and transform_900913_4326_y().

79  {
80  return transform_4326_utm_y(
81  utm_srid, transform_900913_4326_x(x, {}), transform_900913_4326_y({}, y));
82 }
ALWAYS_INLINE double transform_900913_4326_y(double, const double y)
ALWAYS_INLINE double transform_4326_utm_y(unsigned const utm_srid, double const x, double const y)
ALWAYS_INLINE double transform_900913_4326_x(const double x, double)

+ Here is the call graph for this function:

ALWAYS_INLINE double transform_utm_4326_x ( unsigned const  utm_srid,
double const  x,
double const  y 
)

Definition at line 58 of file GeoOpsRuntime.cpp.

References TransformUTMTo4326::calculateX().

Referenced by transform_utm_900913_x().

60  {
61  return TransformUTMTo4326(utm_srid, x, y).calculateX();
62 }
DEVICE ALWAYS_INLINE double calculateX() const
Definition: Utm.h:255

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ALWAYS_INLINE double transform_utm_4326_y ( unsigned const  utm_srid,
double const  x,
double const  y 
)

Definition at line 64 of file GeoOpsRuntime.cpp.

References TransformUTMTo4326::calculateY().

Referenced by transform_utm_900913_y().

66  {
67  return TransformUTMTo4326(utm_srid, x, y).calculateY();
68 }
DEVICE ALWAYS_INLINE double calculateY() const
Definition: Utm.h:263

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ALWAYS_INLINE double transform_utm_900913_x ( unsigned const  utm_srid,
double const  x,
double const  y 
)

Definition at line 84 of file GeoOpsRuntime.cpp.

References transform_4326_900913_x(), and transform_utm_4326_x().

86  {
87  return transform_4326_900913_x(transform_utm_4326_x(utm_srid, x, y), {});
88 }
ALWAYS_INLINE double transform_utm_4326_x(unsigned const utm_srid, double const x, double const y)
ALWAYS_INLINE double transform_4326_900913_x(const double x, double)

+ Here is the call graph for this function:

ALWAYS_INLINE double transform_utm_900913_y ( unsigned const  utm_srid,
double const  x,
double const  y 
)

Definition at line 90 of file GeoOpsRuntime.cpp.

References transform_4326_900913_y(), and transform_utm_4326_y().

92  {
93  return transform_4326_900913_y({}, transform_utm_4326_y(utm_srid, x, y));
94 }
ALWAYS_INLINE double transform_4326_900913_y(double, const double y)
ALWAYS_INLINE double transform_utm_4326_y(unsigned const utm_srid, double const x, double const y)

+ Here is the call graph for this function: