PROJ C++ API
|
A geometric figure that can be used to describe the approximate shape of an object. More...
#include <datum.hpp>
Public Member Functions | |
const common::Length & | semiMajorAxis () PROJ_CONST_DECL |
Return the length of the semi-major axis of the ellipsoid. More... | |
const util::optional< common::Scale > & | inverseFlattening () PROJ_CONST_DECL |
Return the inverse flattening value of the ellipsoid, if the ellipsoid has been defined with this value. More... | |
const util::optional< common::Length > & | semiMinorAxis () PROJ_CONST_DECL |
Return the length of the semi-minor axis of the ellipsoid, if the ellipsoid has been defined with this value. More... | |
bool | isSphere () PROJ_CONST_DECL |
Return whether the ellipsoid is spherical. More... | |
const util::optional< common::Length > & | semiMedianAxis () PROJ_CONST_DECL |
Return the length of the semi-median axis of a triaxial ellipsoid. More... | |
common::Scale | computeInverseFlattening () const |
Return or compute the inverse flattening value of the ellipsoid. More... | |
common::Length | computeSemiMinorAxis () const |
Return or compute the length of the semi-minor axis of the ellipsoid. More... | |
const std::string & | celestialBody () PROJ_CONST_DECL |
Return the name of the celestial body on which the ellipsoid refers to. | |
EllipsoidNNPtr | identify () const |
Return a Ellipsoid object where some parameters are better identified. More... | |
bool | isEquivalentTo (const util::IComparable *other, util::IComparable::Criterion criterion=util::IComparable::Criterion::STRICT) const override |
Returns whether an object is equivalent to another one. More... | |
![]() | |
const metadata::IdentifierNNPtr & | name () PROJ_CONST_DECL |
Return the name of the object. More... | |
const std::string & | nameStr () PROJ_CONST_DECL |
Return the name of the object. More... | |
const std::vector< metadata::IdentifierNNPtr > & | identifiers () PROJ_CONST_DECL |
Return the identifier(s) of the object. More... | |
const std::vector< util::GenericNameNNPtr > & | aliases () PROJ_CONST_DECL |
Return the alias(es) of the object. | |
const std::string & | remarks () PROJ_CONST_DECL |
Return the remarks. | |
bool | isDeprecated () PROJ_CONST_DECL |
Return whether the object is deprecated. More... | |
std::string | alias () PROJ_CONST_DECL |
Return the (first) alias of the object as a string. More... | |
int | getEPSGCode () PROJ_CONST_DECL |
Return the EPSG code. More... | |
bool | isEPSG (int code) PROJ_CONST_DECL |
Return whether the object has a identifiers() in the EPSG code space. | |
![]() | |
std::string | exportToWKT (WKTFormatter *formatter) const |
![]() | |
std::string | exportToPROJString (PROJStringFormatter *formatter) const |
Builds a PROJ string representation. More... | |
Static Public Member Functions | |
static EllipsoidNNPtr | createSphere (const util::PropertyMap &properties, const common::Length &radius, const std::string &celestialBody=EARTH) |
Instanciate a Ellipsoid as a sphere. More... | |
static EllipsoidNNPtr | createFlattenedSphere (const util::PropertyMap &properties, const common::Length &semiMajorAxisIn, const common::Scale &invFlattening, const std::string &celestialBody=EARTH) |
Instanciate a Ellipsoid from its inverse/reverse flattening. More... | |
static EllipsoidNNPtr | createTwoAxis (const util::PropertyMap &properties, const common::Length &semiMajorAxisIn, const common::Length &semiMinorAxisIn, const std::string &celestialBody=EARTH) |
Instanciate a Ellipsoid from the value of its two semi axis. More... | |
![]() | |
static IdentifiedObjectNNPtr | create (const util::PropertyMap &properties) |
Instanciate a new IdentifiedObject. More... | |
Static Public Attributes | |
static const std::string | EARTH |
Earth celestial body. | |
static const EllipsoidNNPtr | CLARKE_1866 |
The EPSG:7008 / "Clarke 1866" Ellipsoid. | |
static const EllipsoidNNPtr | WGS84 |
The EPSG:7030 / "WGS 84" Ellipsoid. | |
static const EllipsoidNNPtr | GRS1980 |
The EPSG:7019 / "GRS 1980" Ellipsoid. | |
![]() | |
static const std::string | NAME_KEY |
Key to set the name of a common::IdentifiedObject. More... | |
static const std::string | IDENTIFIERS_KEY |
Key to set the identifier(s) of a common::IdentifiedObject. More... | |
static const std::string | ALIAS_KEY |
Key to set the alias(es) of a common::IdentifiedObject. More... | |
static const std::string | REMARKS_KEY |
Key to set the remarks of a common::IdentifiedObject. More... | |
static const std::string | DEPRECATED_KEY |
Key to set the deprecation flag of a common::IdentifiedObject. More... | |
Additional Inherited Members | |
![]() | |
enum | Criterion { Criterion::STRICT, Criterion::EQUIVALENT } |
Comparison criterion. More... | |
A geometric figure that can be used to describe the approximate shape of an object.
For the Earth an oblate biaxial ellipsoid is used: in mathematical terms, it is a surface formed by the rotation of an ellipse about its minor axis.
common::Scale osgeo::proj::datum::Ellipsoid::computeInverseFlattening | ( | ) | const |
Return or compute the inverse flattening value of the ellipsoid.
If computed, the inverse flattening is the result of a / (a - b), where a is the semi-major axis and b the semi-minor axis.
common::Length osgeo::proj::datum::Ellipsoid::computeSemiMinorAxis | ( | ) | const |
Return or compute the length of the semi-minor axis of the ellipsoid.
If computed, the semi-minor axis is the result of a * (1 - 1 / rf) where a is the semi-major axis and rf the reverse/inverse flattening.
|
static |
Instanciate a Ellipsoid from its inverse/reverse flattening.
properties | See General properties. At minimum the name should be defined. |
semiMajorAxisIn | the semi-major axis. |
invFlattening | the inverse/reverse flattening. |
celestialBody | Name of the celestial body on which the ellipsoid refers to. |
|
static |
Instanciate a Ellipsoid as a sphere.
properties | See General properties. At minimum the name should be defined. |
radius | the sphere radius (semi-major axis). |
celestialBody | Name of the celestial body on which the ellipsoid refers to. |
|
static |
Instanciate a Ellipsoid from the value of its two semi axis.
properties | See General properties. At minimum the name should be defined. |
semiMajorAxisIn | the semi-major axis. |
semiMinorAxisIn | the semi-minor axis. |
celestialBody | Name of the celestial body on which the ellipsoid refers to. |
EllipsoidNNPtr osgeo::proj::datum::Ellipsoid::identify | ( | ) | const |
const util::optional< common::Scale > & osgeo::proj::datum::Ellipsoid::inverseFlattening | ( | ) |
Return the inverse flattening value of the ellipsoid, if the ellipsoid has been defined with this value.
|
overridevirtual |
Returns whether an object is equivalent to another one.
other | other object to compare to |
criterion | comparaison criterion. |
Implements osgeo::proj::util::IComparable.
bool osgeo::proj::datum::Ellipsoid::isSphere | ( | ) |
Return whether the ellipsoid is spherical.
That is to say is semiMajorAxis() == computeSemiMinorAxis().
A sphere is completely defined by the semi-major axis, which is the radius of the sphere.
const common::Length & osgeo::proj::datum::Ellipsoid::semiMajorAxis | ( | ) |
Return the length of the semi-major axis of the ellipsoid.
const util::optional< common::Length > & osgeo::proj::datum::Ellipsoid::semiMedianAxis | ( | ) |
Return the length of the semi-median axis of a triaxial ellipsoid.
This parameter is not required for a biaxial ellipsoid.
const util::optional< common::Length > & osgeo::proj::datum::Ellipsoid::semiMinorAxis | ( | ) |
Return the length of the semi-minor axis of the ellipsoid, if the ellipsoid has been defined with this value.