GeoTessCPP 2.6.1 Software to facilitate storage and retrieval of 3D information about the Earth.

Loading...
Searching...
No Matches
geotess::EarthShape Class Reference

Defines the ellipsoid that is to be used to convert between geocentric and geographic latitude and between depth and radius. More...

`#include <EarthShape.h>`

## Public Member Functions
| EarthShape (const string &earthShape="WGS84")
void | setEarthShape (const string &earthShape)
virtual | ~EarthShape ()
virtual int | class_size () const
double | getEarthRadius (const double *const v)
double | getGeocentricLat (const double &lat)
double | getGeographicLat (const double &lat)
double | getGeocentricLatDegrees (const double &lat)
double | getGeographicLatDegrees (const double &lat)
double | getLat (const double *const v)
double | getLatDegrees (const double *const v)
double | getLon (const double *const v)
double | getLonDegrees (const double *const v)
void | getVectorDegrees (const double &lat, const double &lon, double *v)
double * | getVectorDegrees (const double &lat, const double &lon)
double * | getVector (const double &lat, const double &lon)
double * | getVector (const double &lat, const double &lon, double *v)
string | getLatLonString (const double *const v)
bool | isConstantRadius () const
double | getEccentricitySqr () const
double | getEquatorialRadius () const
double | getInverseFlattening () const
bool | isSphere () const
const string & | getShapeName () const

## Static Public Member Functions
static string | class_name ()

## Detailed Description

Defines the ellipsoid that is to be used to convert between geocentric and geographic latitude and between depth and radius.

EarthShape defines the ellipsoid that is to be used to convert between geocentric and geographic latitude and between depth and radius. The default is WGS84. The following EarthShapes are defined:

- 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.

Definition at line 85 of file EarthShape.h.

## Constructor & Destructor Documentation

## ◆ EarthShape()

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

  earthShape | one of SPHERE, GRS80, GRS80_RCONST, WGS84, WGS84_RCONST

Definition at line 158 of file EarthShape.h.

## ◆ ~EarthShape()

virtual geotess::EarthShape::~EarthShape | ( |  | ) |
| inline virtual

Destructor.

Definition at line 249 of file EarthShape.h.

## Member Function Documentation

## ◆ class_name()

string geotess::EarthShape::class_name | ( |  | ) |
| inline static

Returns the class name.

Returns
  class name

Definition at line 257 of file EarthShape.h.

## ◆ class_size()

virtual int geotess::EarthShape::class_size | ( |  | ) | const
| inline virtual

Returns the class size.

Returns
  class size

Definition at line 264 of file EarthShape.h.

## ◆ getEarthRadius()

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

  v | Earth-centered unit vector

Returns
  radius of the Earth in km at specified position.

Definition at line 274 of file EarthShape.h.

## ◆ getEccentricitySqr()

double geotess::EarthShape::getEccentricitySqr | ( |  | ) | const
| inline

Definition at line 438 of file EarthShape.h.

## ◆ getEquatorialRadius()

double geotess::EarthShape::getEquatorialRadius | ( |  | ) | const
| inline

Definition at line 440 of file EarthShape.h.

## ◆ getGeocentricLat()

double geotess::EarthShape::getGeocentricLat | ( | const double & | lat | ) |
| inline

Return geocentric latitude given a geographic latitude

Parameters

  lat | geographic latitude in radians

Returns
  geocentric latitude in radians

Definition at line 284 of file EarthShape.h.

## ◆ getGeocentricLatDegrees()

double geotess::EarthShape::getGeocentricLatDegrees | ( | const double & | lat | ) |
| inline

Return geocentric latitude given a geographic latitude

Parameters

  lat | geographic latitude in degrees

Returns
  geocentric latitude in degrees

Definition at line 304 of file EarthShape.h.

## ◆ getGeographicLat()

double geotess::EarthShape::getGeographicLat | ( | const double & | lat | ) |
| inline

Return geographic latitude given a geocentric latitude

Parameters

  lat | geocentric latitude in radians

Returns
  geographic latitude in radians

Definition at line 294 of file EarthShape.h.

## ◆ getGeographicLatDegrees()

double geotess::EarthShape::getGeographicLatDegrees | ( | const double & | lat | ) |
| inline

Return geographic latitude given a geocentric latitude

Parameters

  lat | geocentric latitude in degrees

Returns
  geographic latitude in degrees

Definition at line 314 of file EarthShape.h.

## ◆ getInverseFlattening()

double geotess::EarthShape::getInverseFlattening | ( |  | ) | const
| inline

Definition at line 442 of file EarthShape.h.

## ◆ getLat()

double geotess::EarthShape::getLat | ( | const double *const | v | ) |
| inline

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

Parameters

  v | 3-component unit vector

Returns
  geographic latitude in radians.

Definition at line 323 of file EarthShape.h.

## ◆ getLatDegrees()

double geotess::EarthShape::getLatDegrees | ( | const double *const | v | ) |
| inline

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

Parameters

  v | 3-component unit vector

Returns
  geographic latitude in degrees.

Definition at line 332 of file EarthShape.h.

## ◆ getLatLonString()

string geotess::EarthShape::getLatLonString | ( | const double *const | v | ) |
| inline

Parameters

  v | unit vector to be converted to lat, lon string

Returns
  a String of lat,lon in degrees formatted with "%10.6f %11.6f"

Definition at line 428 of file EarthShape.h.

## ◆ getLon()

double geotess::EarthShape::getLon | ( | const double *const | v | ) |
| inline

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

Parameters

  v | 3 component unit vector

Returns
  longitude in radians.

Definition at line 341 of file EarthShape.h.

## ◆ getLonDegrees()

double geotess::EarthShape::getLonDegrees | ( | const double *const | v | ) |
| inline

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

Parameters

  v | 3 component unit vector

Returns
  longitude in degrees.

Definition at line 350 of file EarthShape.h.

## ◆ getShapeName()

const string & geotess::EarthShape::getShapeName | ( |  | ) | const
| inline

Definition at line 446 of file EarthShape.h.

## ◆ getVector() [1/2]

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

  lat | geographic latitude in radians.
  lon | longitude in radians.

Returns
  3 component unit vector.

Definition at line 389 of file EarthShape.h.

## ◆ getVector() [2/2]

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

  lat | geographic latitude in radians.
  lon | longitude in radians.
  v | 3-component unit vector.

Returns
  a pointer to v

Definition at line 406 of file EarthShape.h.

## ◆ getVectorDegrees() [1/2]

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

  lat | geographic latitude in degrees.
  lon | longitude in degrees.

Returns
  pointer to v

Definition at line 375 of file EarthShape.h.

## ◆ getVectorDegrees() [2/2]

void 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

  lat | geographic latitude in degrees.
  lon | longitude in degrees.
  v | 3 component unit vector.

Returns
  pointer to v

Definition at line 363 of file EarthShape.h.

## ◆ isConstantRadius()

bool geotess::EarthShape::isConstantRadius | ( |  | ) | const
| inline

Definition at line 436 of file EarthShape.h.

## ◆ isSphere()

bool geotess::EarthShape::isSphere | ( |  | ) | const
| inline

Definition at line 444 of file EarthShape.h.

## ◆ setEarthShape()

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

  earthShape | one of SPHERE, GRS80, GRS80_RCONST, WGS84, WGS84_RCONST, IERS2003, IERS2003_RCONST

Definition at line 185 of file EarthShape.h.

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

- rstt_v3.2.1/GeoTessCPP/include/EarthShape.h