An ellipsoid is a mathematically defined approximation of the earth’s surface.
Ellipsoid class is this representation.
An ellipsoid is defined by two parameters:
a and b together define the flattening of the ellipsoid f: f = (a-b)/a
TsGeo is based on phpgeo so the same algorithm is used. TsGeo's ellipsoids are defined by a and 1/f instead of a and b.
TsGeo supports arbitrary ellipsoids. WGS-84 is used as default when no other ellipsoid is given. For day-to-day calculations it’s not needed to care about ellipsoids in the most cases.
It’s possible to create an instance of the Ellipsoid class either by specifing a name or by providing the three parameters name, a, and 1/f.
A default configuration is defined in
These configurations can be used to create a default
constructor (name: string, a: number, f:number)
Ellipsoid object with a and 1/f under the name name.
Return the name of
Return the parameter a of
Return the parameter b of
Ellipsoid. Computed by b = a * (1 - 1/f) (number)
Return the parameter 1/f of
Calculates the arithmetic mean radius.
createDefault(name = 'WGS-84': string)
Ellipsoid using the default configuration by name.
Ellipsoid defined by config array. config shall have the following fields: