| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Digikam::Ellipsoid Class Reference

Geometric figure that can be used to describe the approximate shape of the earth. More...

## Public Member Functions
double | eccentricity () const
| The ratio of the distance between the center and a focus of the ellipse to the length of its semimajor axis.
double | inverseFlattening () const
| Returns the value of the inverse of the flattening constant.
bool | isIvfDefinitive () const
| Indicates if the inverse flattening is definitive for this ellipsoid.
bool | isSphere () const
| `true` if the ellipsoid is degenerate and is actually a sphere.
double | orthodromicDistance (double x1, double y1, double x2, double y2)
| Returns the orthodromic distance between two geographic coordinates.
double | radiusOfCurvature (double latitude)
| Returns the Radius Of Curvature for the given latitude, using the geometric mean of two radii of curvature for all azimuths.
double | semiMajorAxis () const
| Length of the semi-major axis of the ellipsoid.
double | semiMinorAxis () const
| Length of the semi-minor axis of the ellipsoid.

## Static Public Member Functions
static Ellipsoid | CLARKE_1866 ()
| Clarke 1866 ellipsoid with axis in metres.
static Ellipsoid | createEllipsoid (const QString &name, double semiMajorAxis, double semiMinorAxis)
| Constructs a new ellipsoid using the specified axis length.
static Ellipsoid | createFlattenedSphere (const QString &name, double semiMajorAxis, double inverseFlattening)
| Constructs a new ellipsoid using the specified axis length and inverse flattening value.
static Ellipsoid | GRS80 ()
| GRS 80 ellipsoid with axis in metres.
static Ellipsoid | INTERNATIONAL_1924 ()
| International 1924 ellipsoid with axis in metres.
static Ellipsoid | SPHERE ()
| A sphere with a radius of 6371000 metres.
static Ellipsoid | WGS84 ()
| WGS 1984 ellipsoid with axis in metres.

## Protected Member Functions
| Ellipsoid (const QString &name, double radius, bool ivfDefinitive)
| Ellipsoid (const QString &name, double semiMajorAxis, double semiMinorAxis, double inverseFlattening, bool ivfDefinitive)
| Constructs a new ellipsoid using the specified axis length.

## Protected Attributes
double | m_inverseFlattening = 0.0
| The inverse of the flattening value, or DBL_MAX if the ellipsoid is a sphere.
bool | m_isSphere = false
bool | m_ivfDefinitive = false
| Tells if the Inverse Flattening definitive for this ellipsoid.
double | m_semiMajorAxis = 0.0
| The equatorial radius.
double | m_semiMinorAxis = 0.0
| The polar radius.
QString | name

## Detailed Description

In mathematical terms, it is a surface formed by the rotation of an ellipse about its minor axis. An ellipsoid requires two defining parameters:

- semi-major axis and inverse flattening, or
- semi-major axis and semi-minor axis.

## Constructor & Destructor Documentation

## ◆ Ellipsoid()

Digikam::Ellipsoid::Ellipsoid | ( | const QString & | name,
|  | double | semiMajorAxis,
|  | double | semiMinorAxis,
|  | double | inverseFlattening,
|  | bool | ivfDefinitive
| ) |  |
| protected

The properties map is given unchanged to the AbstractIdentifiedObjectAbstractIdentifiedObject(Map) super-class constructor.

Parameters

  name | The ellipsoid name.
  semiMajorAxis | The equatorial radius.
  semiMinorAxis | The polar radius.
  inverseFlattening | The inverse of the flattening value.
  ivfDefinitive | `true` if the inverse flattening is definitive.

See also
  createEllipsoid
  createFlattenedSphere

## Member Function Documentation

## ◆ createEllipsoid()

Ellipsoid Digikam::Ellipsoid::createEllipsoid | ( | const QString & | name,
|  | double | semiMajorAxis,
|  | double | semiMinorAxis
| ) |  |
| static

Parameters

  name | The ellipsoid name.
  semiMajorAxis | The equatorial radius.
  semiMinorAxis | The polar radius.

## ◆ createFlattenedSphere()

Ellipsoid Digikam::Ellipsoid::createFlattenedSphere | ( | const QString & | name,
|  | double | semiMajorAxis,
|  | double | inverseFlattening
| ) |  |
| static

Parameters

  name | The ellipsoid name.
  semiMajorAxis | The equatorial radius.
  inverseFlattening | The inverse flattening value. values.

## ◆ eccentricity()

double Digikam::Ellipsoid::eccentricity | ( |  | ) | const

The eccentricity can alternately be computed from the equation: e=sqrt(2f-f^2).

## ◆ inverseFlattening()

double Digikam::Ellipsoid::inverseFlattening | ( |  | ) | const

Flattening is a value used to indicate how closely an ellipsoid approaches a spherical shape. The inverse flattening is related to the equatorial/polar radius by the formula

ivf=r_e/(r_e-r_p).

For perfect spheres (i.e. if isSphere returns `true`), the DoublePOSITIVE_INFINITY value is used.

Returns
  The inverse flattening value.

## ◆ isIvfDefinitive()

bool Digikam::Ellipsoid::isIvfDefinitive | ( |  | ) | const

Some ellipsoids use the IVF as the defining value, and calculate the polar radius whenever asked. Other ellipsoids use the polar radius to calculate the IVF whenever asked. This distinction can be important to avoid floating-point rounding errors.

Returns
  `true` if the inverse flattening is definitive, or `false` if the polar radius is definitive.

## ◆ isSphere()

bool Digikam::Ellipsoid::isSphere | ( |  | ) | const

The sphere is completely defined by the semi-major axis, which is the radius of the sphere.

Returns
  `true` if the ellipsoid is degenerate and is actually a sphere.

## ◆ orthodromicDistance()

double Digikam::Ellipsoid::orthodromicDistance | ( | double | x1,
|  | double | y1,
|  | double | x2,
|  | double | y2
| ) |  |

The orthodromic distance is the shortest distance between two points on a sphere's surface. The orthodromic path is always on a great circle. This is different from the loxodromic distance, which is a longer distance on a path with a constant direction on the compass.

Parameters

  x1 | Longitude of first point (in decimal degrees).
  y1 | Latitude of first point (in decimal degrees).
  x2 | Longitude of second point (in decimal degrees).
  y2 | Latitude of second point (in decimal degrees).

Returns
  The orthodromic distance (in the units of this ellipsoid's axis).

## ◆ radiusOfCurvature()

double Digikam::Ellipsoid::radiusOfCurvature | ( | double | latitude | ) |

Parameters

  latitude | in degrees

## ◆ semiMajorAxis()

double Digikam::Ellipsoid::semiMajorAxis | ( |  | ) | const

This is the equatorial radius in axis linear unit.

Returns
  Length of semi-major axis.

## ◆ semiMinorAxis()

double Digikam::Ellipsoid::semiMinorAxis | ( |  | ) | const

This is the polar radius in axis linear unit.

Returns
  Length of semi-minor axis.

## ◆ SPHERE()

Ellipsoid Digikam::Ellipsoid::SPHERE | ( |  | ) |
| static

Spheres use a simpler algorithm for orthodromic distance computation, which may be faster and more robust.

## ◆ WGS84()

Ellipsoid Digikam::Ellipsoid::WGS84 | ( |  | ) |
| static

This ellipsoid is used in GPS systems and is the default for most `org.geotools` packages.

## Member Data Documentation

## ◆ m_inverseFlattening

double Digikam::Ellipsoid::m_inverseFlattening = 0.0
| protected

See also
  getInverseFlattening

## ◆ m_ivfDefinitive

bool Digikam::Ellipsoid::m_ivfDefinitive = false
| protected

See also
  isIvfDefinitive

## ◆ m_semiMajorAxis

double Digikam::Ellipsoid::m_semiMajorAxis = 0.0
| protected

See also
  getSemiMajorAxis

## ◆ m_semiMinorAxis

double Digikam::Ellipsoid::m_semiMinorAxis = 0.0
| protected

See also
  getSemiMinorAxis