OmniSciDB  2e3a973ef4
Transforms.h File Reference
#include <cmath>
#include <string>
+ Include dependency graph for Transforms.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::pair< double, double > geotransform_4326_to_900913 (const double lon, const double lat)
 
std::pair< double, double > geotransform (const std::string &src_proj, const std::string &dst_proj, const double x, const double y)
 

Variables

const std::string OMNISCI_GEO_PREFIX {"omnisci_geo"}
 
const std::string LEGACY_GEO_PREFIX {"mapd_geo"}
 

Function Documentation

◆ geotransform()

std::pair<double, double> geotransform ( const std::string &  src_proj,
const std::string &  dst_proj,
const double  x,
const double  y 
)
inline

Definition at line 37 of file Transforms.h.

References geotransform_4326_to_900913().

40  {
41  return geotransform_4326_to_900913(x, y);
42 }
std::pair< double, double > geotransform_4326_to_900913(const double lon, const double lat)
Definition: Transforms.h:25
+ Here is the call graph for this function:

◆ geotransform_4326_to_900913()

std::pair<double, double> geotransform_4326_to_900913 ( const double  lon,
const double  lat 
)
inline

Definition at line 25 of file Transforms.h.

References pi().

Referenced by geotransform().

26  {
27  static const double e_circ = 40075016.68; // Earth's circumference, meters
28  static const double e_circ_360 = e_circ / 360;
29  static const double pi = std::acos(-1);
30 
31  std::pair<double, double> ll;
32  ll.first = lon * e_circ_360;
33  ll.second = e_circ_360 * std::log(std::tan((90 + lat) * pi / 360)) / (pi / 180);
34  return ll;
35 }
EXTENSION_NOINLINE double pi()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ LEGACY_GEO_PREFIX

const std::string LEGACY_GEO_PREFIX {"mapd_geo"}

Definition at line 23 of file Transforms.h.

Referenced by DBHandler::import_geo_table().

◆ OMNISCI_GEO_PREFIX

const std::string OMNISCI_GEO_PREFIX {"omnisci_geo"}