Documentation |
Read 15-minute gridded geoid heights from EGM96
[Z, refvec] = egm96geoid(samplefactor)
[Z, refvec] = egm96geoid(samplefactor,latlim,lonlim)
[Z, refvec] = egm96geoid(samplefactor) imports global geoid height in meters from the EGM96 geoid model. The data set is gridded at 15-minute intervals, but may be down-sampled as specified by the positive integer samplefactor. The result is returned in the regular data grid Z along with referencing vector refvec. At full resolution (a samplefactor of 1), Z will be 721-by-1441.
The gridded EGM96 data set must be on your path in a file named 'WW15MGH.GRD'.
[Z, refvec] = egm96geoid(samplefactor,latlim,lonlim) imports data for the part of the world within the specified latitude and longitude limits. The limits must be two-element vectors in units of degrees. Longitude limits can be defined in the range [-180 180] or [0 360]. For example, lonlim = [170 190] returns data centered on the dateline, while lonlim = [-10 10] returns data centered on the prime meridian.
Although the Earth is round, it is not exactly a sphere. The shape of the Earth is usually defined by the geoid, which is defined as a gravitational equipotential surface, but can be conceptualized as the shape the ocean surface would take in the absence of waves, weather, and land. For cartographic purposes it is generally sufficient to treat the Earth as a sphere or ellipsoid of revolution. For other applications, a more detailed model of the geoid such as EGM 96 may be required. EGM 96 is a spherical harmonic model of the geoid complete to degree and order 360. This function reads from a file of gridded geoid heights derived from the EGM 96 harmonic coefficients.
Read the EGM 96 geoid grid for the world, taking every 10th point.
[N,refvec] = egm96geoid(10);
Read a subset of the geoid grid at full resolution and interpolate to find the geoid height at a point between grid points.
[N,refvec] = egm96geoid(1,[-10 -12],[129 132]); n = ltln2val(N,refvec,-11.1,130.22,'bicubic') n = 52.7151