@math.gl/geoid module provides support for irregular Earth models defined by earth gravity model files.
While spherical and ellipsoidal models of the earth can be very useful, the Earth is ultimately an irregular object, with lumps of higher density etc. This irregular model of the earth is usually referred to as a "geoid" (essentially, an irregular "ellipsoid").
Earth gravity models can be used to describe this geoid. The models implemented by
@math.gl/geoid use a superposition of spherical harmonics to approximate measured gravity.
Calculates difference between mean see level height and WGS84 ellipsoid height
Gravity Height Model data files tend to be stored in PGM format.