GeoTessCPP  2.1
Software to facilitate storage and retrieval of 3D information about the Earth.
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | Static Public Member Functions | List of all members
geotess::EarthShape Class Reference

#include <EarthShape.h>

Public Member Functions

 EarthShape (const string &earthShape="WGS84")
 
virtual ~EarthShape ()
 
virtual int class_size () const
 
double getEarthRadius (const double *const v)
 
double getEccentricitySqr () const
 
double getEquatorialRadius () const
 
double getGeoCentricLatitude (const double &lat)
 
double getGeoGraphicLatitude (const double &lat)
 
double getInverseFlattening () const
 
double getLat (const double *const v)
 
double getLatDegrees (const double *const v)
 
string getLatLonString (const double *const v)
 
double getLon (const double *const v)
 
double getLonDegrees (const double *const v)
 
const string & getShapeName () const
 
double * getVector (const double &lat, const double &lon)
 
double * getVector (const double &lat, const double &lon, double *v)
 
double * getVectorDegrees (const double &lat, const double &lon)
 
double * getVectorDegrees (const double &lat, const double &lon, double *v)
 
bool isConstantRadius () const
 
bool isSphere () const
 
void setEarthShape (const string &earthShape)
 

Static Public Member Functions

static string class_name ()
 

Constructor & Destructor Documentation

geotess::EarthShape::EarthShape ( const string &  earthShape = "WGS84")
inline

Define the shape of the Earth that is to be used to convert between geocentric and geographic latitude and between depth and radius. The default is WGS84.

  • SPHERE - Geocentric and geographic latitudes are identical and conversion between depth and radius assume the Earth is a sphere with constant radius of 6371 km.
  • GRS80 - Conversion between geographic and geocentric latitudes, and between depth and radius are performed using the parameters of the GRS80 ellipsoid.
  • GRS80_RCONST - Conversion between geographic and geocentric latitudes are performed using the parameters of the GRS80 ellipsoid. Conversions between depth and radius assume the Earth is a sphere with radius 6371.
  • WGS84 - Conversion between geographic and geocentric latitudes, and between depth and radius are performed using the parameters of the WGS84 ellipsoid.
  • WGS84_RCONST - Conversion between geographic and geocentric latitudes are performed using the parameters of the WGS84 ellipsoid. Conversions between depth and radius assume the Earth is a sphere with radius 6371.
Parameters
earthShapeone of SPHERE, GRS80, GRS80_RCONST, WGS84, WGS84_RCONST
virtual geotess::EarthShape::~EarthShape ( )
inlinevirtual

Destructor.

Member Function Documentation

static string geotess::EarthShape::class_name ( )
inlinestatic

Returns the class name.

Returns
class name
virtual int geotess::EarthShape::class_size ( ) const
inlinevirtual

Returns the class size.

Returns
class size
double geotess::EarthShape::getEarthRadius ( const double *const  v)
inline

Retrieve the radius of the Earth in km at the position specified by an Earth-centered unit vector. Uses the WGS84 ellipsoid.

Parameters
vEarth-centered unit vector
Returns
radius of the Earth in km at specified position.
double geotess::EarthShape::getEccentricitySqr ( ) const
inline
double geotess::EarthShape::getEquatorialRadius ( ) const
inline
double geotess::EarthShape::getGeoCentricLatitude ( const double &  lat)
inline

Return geocentric latitude given a geographic latitude

Parameters
latgeographic latitude in radians
Returns
geocentric latitude in radians
double geotess::EarthShape::getGeoGraphicLatitude ( const double &  lat)
inline

Return geographic latitude given a geocentric latitude

Parameters
latgeocentric latitude in radians
Returns
geographic latitude in radians
double geotess::EarthShape::getInverseFlattening ( ) const
inline
double geotess::EarthShape::getLat ( const double *const  v)
inline

Convert a 3-component unit vector to geographic latitude, in radians.

Parameters
v3-component unit vector
Returns
geographic latitude in radians.
double geotess::EarthShape::getLatDegrees ( const double *const  v)
inline

Convert a 3-component unit vector to geographic latitude, in degrees.

Parameters
v3-component unit vector
Returns
geographic latitude in degrees.
string geotess::EarthShape::getLatLonString ( const double *const  v)
inline
Parameters
vunit vector to be converted to lat, lon string
Returns
a String of lat,lon in degrees formatted with "%10.6f %11.6f"
double geotess::EarthShape::getLon ( const double *const  v)
inline

Convert a 3-component unit vector to a longitude, in radians.

Parameters
v3 component unit vector
Returns
longitude in radians.
double geotess::EarthShape::getLonDegrees ( const double *const  v)
inline

Convert a 3-component unit vector to a longitude, in degrees.

Parameters
v3 component unit vector
Returns
longitude in degrees.
const string& geotess::EarthShape::getShapeName ( ) const
inline
double* geotess::EarthShape::getVector ( const double &  lat,
const double &  lon 
)
inline

Convert geographic lat, lon into a geocentric unit vector. The x-component points toward lat,lon = 0, 0. The y-component points toward lat,lon = 0, PI/2. The z-component points toward north pole.

Parameters
latgeographic latitude in radians.
lonlongitude in radians.
Returns
3 component unit vector.
double* geotess::EarthShape::getVector ( const double &  lat,
const double &  lon,
double *  v 
)
inline

Convert geographic lat, lon into a geocentric unit vector. The x-component points toward lat,lon = 0, 0. The y-component points toward lat,lon = 0, PI/2 The z-component points toward north pole.

Parameters
latgeographic latitude in radians.
lonlongitude in radians.
v3-component unit vector.
Returns
a pointer to v
double* geotess::EarthShape::getVectorDegrees ( const double &  lat,
const double &  lon 
)
inline

Convert geographic lat, lon into a geocentric unit vector. The x-component points toward lat,lon = 0, 0. The y-component points toward lat,lon = 0, 90. The z-component points toward north pole.

Parameters
latgeographic latitude in degrees.
lonlongitude in degrees.
Returns
3 component unit vector.
double* geotess::EarthShape::getVectorDegrees ( const double &  lat,
const double &  lon,
double *  v 
)
inline

Convert geographic lat, lon into a geocentric unit vector. The x-component points toward lat,lon = 0, 0. The y-component points toward lat,lon = 0, 90. The z-component points toward north pole.

Parameters
latgeographic latitude in degrees.
lonlongitude in degrees.
v3 component unit vector.
Returns
pointer to v
bool geotess::EarthShape::isConstantRadius ( ) const
inline
bool geotess::EarthShape::isSphere ( ) const
inline
void geotess::EarthShape::setEarthShape ( const string &  earthShape)
inline

Define the shape of the Earth that is to be used to convert between geocentric and geographic latitude and between depth and radius. The default is WGS84.

  • SPHERE - Geocentric and geographic latitudes are identical and conversion between depth and radius assume the Earth is a sphere with constant radius of 6371 km.
  • GRS80 - Conversion between geographic and geocentric latitudes, and between depth and radius are performed using the parameters of the GRS80 ellipsoid.
  • GRS80_RCONST - Conversion between geographic and geocentric latitudes are performed using the parameters of the GRS80 ellipsoid. Conversions between depth and radius assume the Earth is a sphere with radius 6371.
  • WGS84 - Conversion between geographic and geocentric latitudes, and between depth and radius are performed using the parameters of the WGS84 ellipsoid.
  • WGS84_RCONST - Conversion between geographic and geocentric latitudes are performed using the parameters of the WGS84 ellipsoid. Conversions between depth and radius assume the Earth is a sphere with radius 6371.
  • IERS2003 - Conversion between geographic and geocentric latitudes, and between depth and radius are performed using the parameters of the IERS2003 ellipsoid.
  • IERS2003_RCONST - Conversion between geographic and geocentric latitudes are performed using the parameters of the IERS2003 ellipsoid. Conversions between depth and radius assume the Earth is a sphere with radius 6371.
Parameters
earthShapeone of SPHERE, GRS80, GRS80_RCONST, WGS84, WGS84_RCONST, IERS2003, IERS2003_RCONST

The documentation for this class was generated from the following file: