Blog

Adding Local Datum Corrections to CZMIL CPF, CHARTS HOF, and Generic Sensor Format Files

Introduction

In the past, when we needed to add local datum corrections to a dataset, we would set up tide
zones for different tide regimes in the area of the dataset. This produced discontinuities in the data at the boundaries of the tide zones. The Earth Gravitational Model 2008 (EGM2008) is a publicly available model of the difference between the WGS84 ellipsoid and the geoid. The geoid is a model of the global mean sea level. Using this model and measured data from tide gauges we can now create a correction surface with no zone boundaries or discontinuities. The correction surface is then used to apply corrections to the data in CZMIL CPF, CHARTS HOF, or Generic Sensor Format (GSF) files.

Using the datumSurface Program

In order to create a correction surface we need to have tide data for a number of tide gauges in the area of interest. The more gauges you have, the better the results. For each gauge you need the difference between Mean Sea Level (MSL) computed at the gauge and the WGS84 ellipsoid. You alsoneed the difference between MSL and the desired local datum. For this example we will be using a generic area file (datum_example.are) that contains the following points:
34.80955832, 134.00707504
33.12310434, 134.00707504
33.12310434, 135.84426130
34.80955832, 135.84426130

We will use an ASCII file (datum_example.yxz) of (fictitious) tide gauge data that looks like this:
33.88008700,134.67574698,36.00,-.05
34.72605750,134.38551364,36.10,-.07
34.42231617,135.21971481,37.01,-.08
33.87511712,135.15382920,37.40,-.04

For this example the local datum is Mean Lower Low Water (MLLW). The first two fields in each line are, obviously, latitude and longitude and the last two fields are the difference between MSL and the ellipsoid and the difference between MSL and MLLW. The method used by datumSurface to compute the correction surface is as follows:
1. Read the area file (either a polygon SHAPE file or a generic area file) to define the area for which the correction surface will be computed.
2. Read the data points associated with each tide gauge location.
3. Use the Minimum Curvature Spline Interpolation (MISP) function to compute a gridded
surface that represents the shape of the MLLW to MSL difference using the data from each tide
gauge location. This is the Z0 surface.
4. Use the MISP function to compute a gridded surface that represents the difference between the EGM2008 model of the ellipsoid to geoid difference and the measured WGS84 ellipsoid to
MSL difference. This is the Z1 surface.
5. Combine the two computed surfaces to create the correction surface grid.
A more simple explanation is that we are taking the shape of the ellipsoid/MSL difference from the EGM2008 model and warping it to the measured values of the difference at each tide gauge. We have two measured differences at each tide gauge location. The difference between the MSL and the WGS84 ellipsoid and the difference between the MSL and MLLW. Since we only measured at a small number of points we don’t know the actual values of these differences between or around the tide gauge locations. We are assuming that the shape of the EGM2008 ellipsoid/MSL difference is correct but that the actual differences are off by some amount. In other words, we’re using the shape of the EGM2008 model to compute points around and in between the tide gauge locations.

The following picture shows the grid produced by datumSurface using the example input data:
example1_datumSurface
Since changes in the geoid (global mean sea level) are very low frequency we’ve used a grid size of 100 meters. To make a comparison to the old tide zone paradigm you can think of this grid as 1890 rows by 1717 columns of 100 meter square tide zones. Since there are so many grids representing a very low frequency surface we don’t see any discontinuities in the corrected data between the grid squares. The color scale in this image goes from red (lower values) to magenta (higher values). The red boxesindicate the locations of the tide gauges. The fields at the bottom of the image are the latitude, longitude, and Z value (in this case a correction value) at the cursor (pencil point). The cursor location is very close to the location of the second tide gauge listed in the input file. The value at that location, 36.17, is the measured difference between MSL and the ellipsoid minus the measured difference between MSL and MLLW. This data is stored by the datumSurface program in a CHRTR2 file. The CHRTR2 format is a simple grid format that is used by the Joint Airborne LiDAR Bathymetry Technical Center of Expertise (JALBTCX). The resulting CHRTR2 grid can be viewed using the areaCheck program.

Using the datumShift Program

To apply the datum correction surface generated with the datumSurface program to one or
more CPF, HOF, or GSF files we use a program called datumShift. This program is a wizard that allows you to select the CHRTR2 file created by datumSurface and then any number of data files to be corrected. Data files are chosen using a file browsing dialog to select multiple files or, much more easily, a directory browsing dialog that allows you to select the top level folder and have the program get every file of the specified type in the folder tree. You can even use a combination of the file and directory browsing tools. The datumShift program reads each record from the input files, gets the latitude and longitude of the data point, retrieves the correction value from the CHRTR2 grid file, and then places the correction in the input file.

Caveats

The datumShift program applies the corrections differently depending on the type of file being
modified. In a GSF file the corrections are actually applied to the Z values. In CPF files the correction is stored in the local_vertical_datum_offset field of the CZMIL_CPF_Data structure. At this time the datumShift program sets the local_vertical_datum field of the CPF header to Mean Lower Low Water (CZMIL_V_DATUM_MLLW = 2). If you want to use some other datum the program must be modified to provide a datum selection menu. If the local_vertical_datum field of the CPF header isset to anything other than CZMIL_V_DATUM_UNDEFINED (0) then ABE programs that read the CPF files (like pfmLoad or czmil2LAS) will apply the correction when the data is read. The local_vertical_datum_offset value is only applied by application programs, not by the CZMIL API.
The signs of the differences in the tide gauge YXZ file are very important. If you are using
MLLW as your local datum then all of the MSL/MLLW differences should be negative. If, for some unknown reason, you wanted to use Mean Higher High Water (MHHW) the MSL/MHHW differences would have to be positive. Since datumShift only works with MLLW at the moment this is a moot point. Before applying the correction surface to all of your data files test it on a single file that has both land and water (assuming you’re working with LiDAR data) and check the results by building a small PFM from that one file. If everything is correct you can then apply the correction surface to all of the files.

Leave a Comment

Your email address will not be published. Required fields are marked *