OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Macros | Functions
ossimGoogleProjection.cpp File Reference
#include <ossim/projection/ossimGoogleProjection.h>

Go to the source code of this file.

Macros

#define deg2rad(d)   (((d)*M_PI)/180)
 
#define rad2deg(d)   (((d)*180)/M_PI)
 
#define earth_radius   6378137
 

Functions

double y2lat_d (double y)
 
double x2lon_d (double x)
 
double lat2y_d (double lat)
 
double lon2x_d (double lon)
 
double y2lat_m (double y)
 
double x2lon_m (double x)
 
double lat2y_m (double lat)
 
double lon2x_m (double lon)
 

Macro Definition Documentation

◆ deg2rad

#define deg2rad (   d)    (((d)*M_PI)/180)

Definition at line 17 of file ossimGoogleProjection.cpp.

Referenced by lat2y_d(), lat2y_m(), lon2x_m(), and y2lat_d().

◆ earth_radius

#define earth_radius   6378137

Definition at line 19 of file ossimGoogleProjection.cpp.

Referenced by lat2y_m(), lon2x_m(), x2lon_m(), and y2lat_m().

◆ rad2deg

#define rad2deg (   d)    (((d)*180)/M_PI)

Definition at line 18 of file ossimGoogleProjection.cpp.

Referenced by lat2y_d(), x2lon_m(), y2lat_d(), and y2lat_m().

Function Documentation

◆ lat2y_d()

double lat2y_d ( double  lat)

Definition at line 25 of file ossimGoogleProjection.cpp.

References deg2rad, M_PI, and rad2deg.

25 { return rad2deg(log(tan(M_PI/4+ deg2rad(lat)/2))); }
#define rad2deg(d)
#define M_PI
#define deg2rad(d)

◆ lat2y_m()

double lat2y_m ( double  lat)

Definition at line 32 of file ossimGoogleProjection.cpp.

References deg2rad, earth_radius, and M_PI.

Referenced by ossimGoogleProjection::forward().

32 { return earth_radius * log(tan(M_PI/4+ deg2rad(lat)/2)); }
#define M_PI
#define earth_radius
#define deg2rad(d)

◆ lon2x_d()

double lon2x_d ( double  lon)

Definition at line 26 of file ossimGoogleProjection.cpp.

26 { return lon; }

◆ lon2x_m()

double lon2x_m ( double  lon)

Definition at line 33 of file ossimGoogleProjection.cpp.

References deg2rad, and earth_radius.

Referenced by ossimGoogleProjection::forward().

33 { return deg2rad(lon) * earth_radius; }
#define earth_radius
#define deg2rad(d)

◆ x2lon_d()

double x2lon_d ( double  x)

Definition at line 24 of file ossimGoogleProjection.cpp.

References x.

24 { return x; }
ossim_uint32 x

◆ x2lon_m()

double x2lon_m ( double  x)

Definition at line 31 of file ossimGoogleProjection.cpp.

References earth_radius, rad2deg, and x.

Referenced by ossimGoogleProjection::inverse().

31 { return rad2deg(x / earth_radius); }
ossim_uint32 x
#define rad2deg(d)
#define earth_radius

◆ y2lat_d()

double y2lat_d ( double  y)

Definition at line 23 of file ossimGoogleProjection.cpp.

References deg2rad, M_PI, rad2deg, and y.

23 { return rad2deg(2 * atan(exp( deg2rad(y) ) ) - M_PI/2); }
ossim_uint32 y
#define rad2deg(d)
#define M_PI
#define deg2rad(d)

◆ y2lat_m()

double y2lat_m ( double  y)

Definition at line 30 of file ossimGoogleProjection.cpp.

References earth_radius, M_PI, rad2deg, and y.

Referenced by ossimGoogleProjection::inverse().

30 { return rad2deg(2 * atan(exp( (y / earth_radius ) )) - M_PI/2); }
ossim_uint32 y
#define rad2deg(d)
#define M_PI
#define earth_radius