Main Content

Reference ellipsoid

A `referenceEllipsoid`

object encapsulates a reference
ellipsoid, modeled as an oblate spheroid with three additional properties: name, unit of
length of the semi-major and semi-minor axes, and a numerical EPSG code.

You can create a general `referenceEllipsoid`

object with the
`referenceEllipsoid`

function described here. You can also create a
`referenceEllipsoid`

with properties specific to the World Geodetic
System 1984 reference ellipsoid using the `wgs84Ellipsoid`

function.

`E = referenceEllipsoid`

creates a
`referenceEllipsoid`

object that represents the unit
sphere.

`E = referenceEllipsoid(`

creates
a `name`

)`referenceEllipsoid`

object corresponding to
`name`

. `name`

is case-insensitive.
The values of the `SemimajorAxis`

and
`SemiminorAxis`

properties are in meters.

`E = referenceEllipsoid(`

creates
a `code`

)`referenceEllipsoid`

object corresponding to the numerical
EPSG code, `code`

. The unit of length used for the
`SemimajorAxis`

and `SemiminorAxis`

properties depends on the ellipsoid selected, and is indicated in the property
`LengthUnit`

.

`E = referenceEllipsoid(`

and`name`

,`lengthUnit`

)

`E = referenceEllipsoid(`

create a `code`

,`lengthUnit`

)`referenceEllipsoid`

object with the
`SemimajorAxis`

and `SemiminorAxis`

properties in the specified unit of length, `LengthUnit`

. The
unit of length can be any length unit supported by the `validateLengthUnit`

function.

When you define an ellipsoid in terms of semimajor and semiminor axes (rather than semimajor axis and inverse flattening, or semimajor axis and eccentricity), a small loss of precision in the last few digits of

`Flattening`

,`Eccentricity`

, and`ThirdFlattening`

may occur. This is unavoidable, but does not affect the results of practical computation.

`geocrs`

| `oblateSpheroid`

| `referenceSphere`

| `validateLengthUnit`

| `wgs84Ellipsoid`