Skip to main content

parsePGM

From-v3.4

Parse a GeographicLib geoid PGM file into a Geoid. The parser requires one complete 16-bit raster matching the declared dimensions and finite offset and scale metadata. The scale must be positive.

Functions​

parsePGM(data, options)​

Parse "Earth Gravity Model" loaded from a *.pgm file, e.g. https://geographiclib.sourceforge.io/html/geoid.html

parsePGM(data: Uint8Array, options: object}): GeoidHeightModel
  • data - binary buffer of pgm file
  • options - loader options
  • GeoidHeightModel - instance of GeoidHeightModel class