Table of Contents
Chevron DownDeveloper Guide
Chevron DownAPI Reference


The librarys provides support for geospatial math.

It provides classes and utilities to facilitate working with the major geospatial coordinate systems and projections used with computer maps, primarily:

Ellipsoid and WGS84

EllipsoidImplements ellipsoid
Ellipsoid.WSG84An Ellipsoid instance initialized with Earth radii per WGS84.

Usage Examples

A major use of this library is to convert between "cartesian" (x, y, z) and "cartographic" (longitude, latitude, height) representations of WSG84 coordinates. The Ellipsoid class implements these calculations.


Determine the Cartesian representation of a Cartographic position on a WGS84 ellipsoid.

import {toRadians} from '';
import {Ellipsoid} from '';
const cartographicPosition = [toRadians(21), toRadians(78), 5000];
const cartesianPosition = Ellipsoid.WGS84.cartographicToCartesian(cartographicPosition);

Determine the Cartographic representation of a Cartesian position on a WGS84 ellipsoid.

import {Ellipsoid} from '';
const cartesianPosition = [17832.12, 83234.52, 952313.73];
const cartographicPosition = Ellipsoid.WGS84.cartesianToCartographic(cartesianPosition);

Get the transform from local east-north-up at cartographic (0.0, 0.0) to Earth's fixed frame.

import {Ellipsoid} from '';
const transformMatrix = Ellipsoid.WGS84.eastNorthUpToFixedFrame([0, 0, 0]);

Framework Independence

Like all non-core modules, this module can be used independently of core classes.

  • Any input or result vectors can be supplied as JavaScript Array instances of length 3, or objects with x, y, z elements.


This library was initially developed as a fork of selected classes from Cesium math library, as part of a collaboration between and Cesium teams to provide framework-independent, portable support for the 3D tiles specification.


This code was initially forked from Cesium under the Apache 2 License.