Skip to end of metadata
Go to start of metadata

This Howto describes how to create a geoid model using the Geoid Model Utility program.

In case of a geoid file in ASCII with a constant point spacing you could also use Howto Create a Vertical Offset Model (v8.16)

To convert a third party geoid file to a binary geoid file which QINSy accepts, a few steps need to be taken:

  1. Adjust the GEOIDMODELS.XML file, see the Howto document Howto Update Geoid Models.xml
  2. Convert the geoid file
  3. Set up a Database containing the correct geodetic settings, including the geoid model to be created

QINSy geoid model files

Most geoid models are available as ASCII files containing height values on a regular geographical grid.
In order to obtain the necessary real-time file seeking speed, QINSy can only use binary files in "LLDLLD" or "NGS" format, except for DLL's or river line models.
Files in other formats must therefore be converted using the Geoid Model Utility which can be found in the QINSy Console.

A geoid file must be a rectangular grid (except for river models), but may contain a so-called mask: grid points where the geoid heights are not defined.
Such geoid heights must be indicated by values less than -999 or larger than 999. 

Most geoid files must contain geoid heights on coordinate lines starting at the northern-most latitude (or northing) going from west to east, until the southern-most latitude (or northing), i.e. from the north-west corner to the south-east corner.
One exception is the binary grid file format from NGS, which starts at the south-west corner, going from south to north.
The other exception to this rule are the geoid files containing river models, defined along one or more survey lines.

A list of file formats and files that are supported by the Geodetic Library.

  • Geoid Models
    • Rectangular Grid Formats 
      • Binary *.bin Formats
      • NOAA NGS *.bin Format
      • NOAA VDatum *.gtx Format
      • NRCan *.byn Format
      • NRCan NTv2 *.gsb Format
      • Surfer DSBB *.grd Format
    • Triangular TIN Formats
      • QPS QGF *.qgfvom Format
      • TerraModel *.pro Format
  • Grid Shift Models
    • Rectangular Grid Formats 
      • Binary *.bin Formats
      • NADCON *.las *.los Format
      • NRCan NTv2 *.gsb Format
      • Surfer DSBB *.grd Format
  • File Formats for File Conversion
    • Rectangular Grid Formats
      • ASCII Text *.* Formats
      • AUSGEOID *.dat Format
      • ASCII IGN *.mnt Format
      • ASCII OSTN02 *.* Format
      • ASCII OSGM02 *.* Format
      • Binary IFE *.bin Format
      • Binary NGA *.* Format

Convert ASCII file to BIN file

After you have changed the GEOIDMODELS.XML file, you may need to convert the ASCII file in the Geoid Model Utility.
This will be the case when you have a model in a format which is not supported by QINSy.
Geoid model files should be located in the <\Geoid > subdirectory of the QINSy installation directory (e.g. <C:\Program Files\QPS\QINSy 8.x0\Geoid>), so it is easiest to put the file that needs to be converted (GEOID.TXT in the example above) also in that directory.

The points in the LLH file should have a specific format.
First Latitude, then Longitude, then Height, on separate lines.
They should be defined on a rectangular grid, so they always need to have the same spacing in between them in both latitude and longitude.
They also should make up a fully filled grid, so make sure that missing points are added using the 'mask' height value defined in the GEOIDMODELS.XML file (e.g. -999).
They should also be in a specific order: The first point in your LLH file should be the northwest corner or the southwest corner.
Then the points should go east on the northern-most latitude band until the northeast corner is reached (if you start at the NW-corner), or east on the southern-most latitude (if you start at the SW-corner).
The next points should make up the following latitude band (one latitude spacing south if you start at the NW-corner and one latitude spacing north if you start at the SW-corner).
So start at the northwest corner going east and add latitude bands from north to south until you reach the southeast corner, or start at the southwest corner going east and add latitude bands from south to north until you reach the northeast corner.
Going south from NW to SE adding longitude bands from west to east, or going north from SW to NE adding longitude bands from west to east, is also allowed.

  1. Open the Geoid Model Utility from the QINSy Console.
    (If the utility is not visible yet, right-click with your mouse button, select 'Add/Remove QPS Programs' and add it).

  2. Open the Computation Mode drop down list and select the 'Convert Geoid File' option.
  3. Open the Computation Model list and select the 'input file' you just entered in the GEOIDMODELS.XML setup file.
  4. Make sure the QINSy Database is the template database that contains the proper geodetic conversion settings.
  5. Make sure the Geoid Data File is the 'input file' you entered in the GEOIDMODELS.XML.
  6. Click 'Convert' button and wait until the conversion process creates the 'output file'.

  7. Check if the minimum and maximum values of your file are consistent with the outcome of the Geoid Model Utility.

  8. Open the Computation Mode dropdown list and select the 'Compute Geoid Height' option.
  9. Make sure the Geoid Data File is the 'output file' you entered in the GEOIDMODELS.XML.
  10. Enter a known Input Position, click 'Calculate' and check Output Results to see if the conversion went correctly.

    Check the first point and the last point from your 'input file' plus some grid points somewhere else in the file.
    Also select a position halfway between two grid points (with different heights) to check the interpolated geoid height.

Select model in Database Setup

After the binary geoid model file is created, you can select it in the Database Setup program as Mean Water Level Model (in order to compute height aiding observations) or as Vertical Datum (for height results and fixed nodes).
If it is not visible in the drop down lists, the file is probably not located in the <\Geoid > subdirectory of the QINSy installation directory (or status="disabled" is used in GEOIDMODELS.XML).

The 'Test Geodetical Parameters' dialog in Database Setup lists the geoid height (above the selected datum ellipsoid) as 'MSL Height'.
You can check the same points as with the Geoid Model Utility checks to see whether the geoid model file will give the correct results when using QINSy Online or Replay.