cesium-native  0.41.0
CesiumGeospatial::EarthGravitationalModel1996Grid Class Referencefinal

Loads and queries heights from an Earth Gravitational Model 1996 (EGM96) grid. More...

#include <CesiumGeospatial/EarthGravitationalModel1996Grid.h>

Public Member Functions

double sampleHeight (const Cartographic &position) const
 Samples the height at the given position. More...
 

Static Public Member Functions

static std::optional< EarthGravitationalModel1996GridfromBuffer (const gsl::span< const std::byte > &buffer)
 Attempts to create a EarthGravitationalModel1996Grid from the given buffer. More...
 

Detailed Description

Loads and queries heights from an Earth Gravitational Model 1996 (EGM96) grid.

EGM96 is a standard geopotential model of the earth's surface, which can be used to obtain an approximation of the mean sea level (MSL) height at any location on Earth.

Definition at line 24 of file EarthGravitationalModel1996Grid.h.

Member Function Documentation

◆ fromBuffer()

static std::optional<EarthGravitationalModel1996Grid> CesiumGeospatial::EarthGravitationalModel1996Grid::fromBuffer ( const gsl::span< const std::byte > &  buffer)
static

Attempts to create a EarthGravitationalModel1996Grid from the given buffer.

This method expects the buffer to contain the contents of the WW15MGH.DAC 15-arcminute grid. It must be at least 721 * 1440 * 2 = 2,076,480 bytes. Any additional bytes at the end of the buffer are ignored.

Returns
The instance created from the buffer, or std::nullopt if the buffer cannot be interpreted as an EGM96 grid.

◆ sampleHeight()

double CesiumGeospatial::EarthGravitationalModel1996Grid::sampleHeight ( const Cartographic position) const

Samples the height at the given position.

Parameters
positionThe position to sample. The height is ignored.
Returns
The height (in meters) of the EGM96 surface above the WGS84 ellipsoid. A positive value indicates that EGM96 is above the ellipsoid's surface, while a negative value indicates that EGM96 is below the ellipsoid's surface.

The documentation for this class was generated from the following file: