OmniSciDB  72c90bc290
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)

## Function Documentation

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

Definition at line 34 of file Transforms.h.

References geotransform_4326_to_900913().

37  {
38  return geotransform_4326_to_900913(x, y);
39 }
std::pair< double, double > geotransform_4326_to_900913(const double lon, const double lat)
Definition: Transforms.h:22

Here is the call graph for this function:

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

Definition at line 22 of file Transforms.h.

References pi().

Referenced by geotransform().

23  {
24  static const double e_circ = 40075016.68; // Earth's circumference, meters
25  static const double e_circ_360 = e_circ / 360;
26  static const double pi = std::acos(-1);
27
28  std::pair<double, double> ll;
29  ll.first = lon * e_circ_360;
30  ll.second = e_circ_360 * std::log(std::tan((90 + lat) * pi / 360)) / (pi / 180);
31  return ll;
32 }
EXTENSION_NOINLINE double pi()

Here is the call graph for this function:

Here is the caller graph for this function: