OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeoOpsRuntime.cpp File Reference
#include "Geospatial/Utm.h"
#include <cmath>
+ 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 21 of file GeoOpsRuntime.cpp.

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

Referenced by transform_utm_900913_x().

21  {
22  constexpr double a = 6378137; // WGS84 Equatorial radius (m)
23  constexpr double rad_div_deg = M_PI / 180;
24  constexpr double c = a * rad_div_deg;
25  return c * x;
26 }
constexpr double rad_div_deg
Definition: Utm.h:42
#define M_PI
Definition: constants.h:25
constexpr double a
Definition: Utm.h:38

+ Here is the caller graph for this function:

ALWAYS_INLINE double transform_4326_900913_y ( double  ,
const double  y 
)

Definition at line 29 of file GeoOpsRuntime.cpp.

References anonymous_namespace{Utm.h}::a, and M_PI.

Referenced by transform_utm_900913_y().

29  {
30  constexpr double a = 6378137; // WGS84 Equatorial radius (m)
31  constexpr double rad_div_two_deg = M_PI / (2 * 180);
32  constexpr double pi_div_four = M_PI / 4;
33  return a * log(tan(rad_div_two_deg * y + pi_div_four));
34 }
#define M_PI
Definition: constants.h:25
constexpr double a
Definition: Utm.h:38

+ 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 50 of file GeoOpsRuntime.cpp.

References Transform4326ToUTM::calculateX().

Referenced by transform_900913_utm_x().

52  {
53  return Transform4326ToUTM(utm_srid, x, y).calculateX();
54 }
ALWAYS_INLINE double calculateX() const
Definition: Utm.h:172

+ 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 56 of file GeoOpsRuntime.cpp.

References Transform4326ToUTM::calculateY().

Referenced by transform_900913_utm_y().

58  {
59  return Transform4326ToUTM(utm_srid, x, y).calculateY();
60 }
ALWAYS_INLINE double calculateY() const
Definition: Utm.h:197

+ 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 36 of file GeoOpsRuntime.cpp.

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

Referenced by transform_900913_utm_x(), and transform_900913_utm_y().

36  {
37  constexpr double a = 6378137; // WGS84 Equatorial radius (m)
38  constexpr double deg_div_rad = 180 / M_PI;
39  constexpr double c = deg_div_rad / a;
40  return c * x;
41 }
#define M_PI
Definition: constants.h:25
constexpr double a
Definition: Utm.h:38
constexpr double deg_div_rad
Definition: Utm.h:41

+ Here is the caller graph for this function:

ALWAYS_INLINE double transform_900913_4326_y ( double  ,
const double  y 
)

Definition at line 43 of file GeoOpsRuntime.cpp.

References anonymous_namespace{Utm.h}::a, and M_PI.

Referenced by transform_900913_utm_x(), and transform_900913_utm_y().

43  {
44  constexpr double a = 6378137; // WGS84 Equatorial radius (m)
45  constexpr double a_inv = 1 / a;
46  constexpr double two_deg_div_rad = 2 * 180 / M_PI;
47  return two_deg_div_rad * atan(exp(a_inv * y)) - 90;
48 }
#define M_PI
Definition: constants.h:25
constexpr double a
Definition: Utm.h:38

+ 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 74 of file GeoOpsRuntime.cpp.

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

76  {
77  return transform_4326_utm_x(
78  utm_srid, transform_900913_4326_x(x, {}), transform_900913_4326_y({}, y));
79 }
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 81 of file GeoOpsRuntime.cpp.

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

83  {
84  return transform_4326_utm_y(
85  utm_srid, transform_900913_4326_x(x, {}), transform_900913_4326_y({}, y));
86 }
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 62 of file GeoOpsRuntime.cpp.

References TransformUTMTo4326::calculateX().

Referenced by transform_utm_900913_x().

64  {
65  return TransformUTMTo4326(utm_srid, x, y).calculateX();
66 }
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 68 of file GeoOpsRuntime.cpp.

References TransformUTMTo4326::calculateY().

Referenced by transform_utm_900913_y().

70  {
71  return TransformUTMTo4326(utm_srid, x, y).calculateY();
72 }
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 88 of file GeoOpsRuntime.cpp.

References transform_4326_900913_x(), and transform_utm_4326_x().

90  {
91  return transform_4326_900913_x(transform_utm_4326_x(utm_srid, x, y), {});
92 }
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 94 of file GeoOpsRuntime.cpp.

References transform_4326_900913_y(), and transform_utm_4326_y().

96  {
97  return transform_4326_900913_y({}, transform_utm_4326_y(utm_srid, x, y));
98 }
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: