OmniSciDB  16c4e035a1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.


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)


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

Function Documentation

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

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:

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

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);
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 }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const std::string LEGACY_GEO_PREFIX {"mapd_geo"}

Definition at line 23 of file Transforms.h.

Referenced by DBHandler::import_geo_table_internal().

const std::string OMNISCI_GEO_PREFIX {"omnisci_geo"}