Main Content

egm96geoid

Geoid height from Earth Gravitational Model 1996 (EGM96)

Syntaxes of the egm96geoid function that return referencing vectors have been removed. Use a syntax that returns a reference object instead. For more information, see Version History.

Description

N = egm96geoid(lat,lon) returns the height in meters of the geoid at the specified latitude and longitude from the Earth Gravitational Model of 1996 (EGM96). Specify latitude and longitude in degrees.

example

N = egm96geoid(R) returns geoid heights at the cell center or posting locations specified by the raster reference object R.

example

[N,globalR] = egm96geoid returns geoid heights for the entire globe as a 721-by-1441 matrix spaced at 15-minute intervals with latitude limits [-90 90] and longitude limits [0 360]. The function also returns a raster reference object for the geoid heights.

example

Examples

collapse all

Find geoid heights from EGM96 by specifying latitude and longitude values in degrees. The result is returned in meters.

lat = 27.988056;
lon = 86.925278;
N = egm96geoid(lat,lon)
N = 
-28.7444

View geoid heights from EGM96 for a region including Europe.

Create a GeographicPostingsReference object that associates each geoid height with a location in geographic coordinates. Specify the latitude and longitude limits of the region in degrees. Specify the raster size as the number of rows and columns to include in the grid of geoid heights. Create the object by using the georefpostings function.

latlim = [35 72];
lonlim = [-12 51];
rasterSize = [100 100];
R = georefpostings(latlim,lonlim,rasterSize);

Create a grid of geoid heights for the region by specifying the reference object as input to the egm96geoid function.

N = egm96geoid(R);

Set up a new map using a projected coordinate reference system (CRS) that is appropriate for Europe. Create the CRS using the EPSG authority code 10596, which uses a Lambert Azimuthal Equal Area projection method.

figure
pcrs = projcrs(10596);
newmap(pcrs)
hold on

Display the geoid heights and global coastlines on the map. Add a title and a color bar.

geopcolor(N,R)
load coastlines
geoplot(coastlat,coastlon,Color="k",AffectAutoLimits="off")

title("Geoid Heights (m)")
colorbar

Figure contains an axes object with type mapaxes. The mapaxes object contains 2 objects of type pseudocolorraster, line.

View geoid heights from EGM96 for the entire globe.

Return the geoid heights and a reference object for the globe. The geoid heights are spaced at 15-minute intervals.

[N,R] = egm96geoid;

Display the geoid heights on a world map.

figure
newmap
geopcolor(N,R)
hold on

Display global land areas on the same map. Add a title and a color bar.

land = readgeotable("landareas.shp");
geoplot(land,FaceColor="none")

title("Geoid Heights (m)")
colorbar

Figure contains an axes object with type mapaxes. The mapaxes object contains 2 objects of type pseudocolorraster, polygon.

Input Arguments

collapse all

Latitude in degrees, specified as a scalar, vector, or matrix. The dimension of lat depends on the dimension of the geoid heights you want to find.

  • To find a single geoid height, specify lat and lon as scalars.

  • To find several geoid heights, specify lat and lon as vectors of the same length.

  • To find a p-by-q grid of geoid heights, specify lat and lon as p-by-q matrices.

Data Types: single | double

Longitude in degrees, specified as a scalar, vector, or matrix. The dimension of lon depends on the dimension of the geoid heights you want to find.

  • To find a single geoid height, specify lat and lon as scalars.

  • To find several geoid heights, specify lat and lon as vectors of the same length.

  • To find a p-by-q grid of geoid heights, specify lat and lon as p-by-q matrices.

Data Types: single | double

Raster reference for N, specified as a GeographicPostingsReference object or a GeographicCellsReference object. The raster reference associates each element of N with a location in geographic coordinates.

The RasterSize property of the reference object determines the size of the data grid, size(N).

Output Arguments

collapse all

Geoid height in meters, returned as a scalar, vector, or matrix.

The size of N depends on the syntax:

SyntaxSize of N
N = egm96geoid(lat,lon)Size of lat and lon
N = egm96geoid(R)R.RasterSize
[N,globalR] = egm96geoid721-by-1441 matrix

Data Types: double

Global raster reference, returned as a GeographicPostingsReference object of size 721-by-1441 with latitude limits [-90 90] and longitude limits [0 360].

More About

collapse all

Version History

Introduced before R2006a

expand all