Home    |    Concepts   |   API   |   Samples
Concepts > Geometry > Coordinate References > Coordinate Systems > Geographic Coordinate Systems
Using Grid-Based Geographic Transformation Methods

Some countries, like the United States and Canada, use a grid-based geographic (datum) transformation method. A grid contains the differences (often in seconds) between two geographic coordinate systems. Grid-based methods can be very accurate because a grid can model small changes in the fit between the two geographic coordinate systems (GCS).

Grids can be quite large. PEDATAHOME, a system environment variable, has been defined to allow a platform- and software-independent implementation for the grids? location.

setenv PEDATAHOME /path/to/the/grids(C shell)
PEDATAHOME = /path/to/the/grids;
export PEDATAHOME(Bourne shell)
set PEDATAHOME /path/to/the/grids

MapObjects 2.0 and ArcView Projection Utility in ArcView GIS 3.2 set PEDATAHOME to "C:/Program Files/Common Files/ESRI/PE_GRIDS". If you have installed either software, check your environment to see if PEDATAHOME is already set.

Within the PEDATAHOME directory, subdirectories will be added to store the grid data as support is expanded. Currently, one grid type and method is supported: the United States National Geodetic Survey (NGS) format. All NGS grids are available for download at ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon/. NGS has grids to convert from NAD 1927 and other old datums to NAD 1983. These are grouped in the nadcon subdirectory. Any transformation actually needs two grids: one for latitude shifts and one for longitude shifts. Each has a .las or a .los extension. The nadcon files are:

alaska /* NAD27 - NAD83 shifts for Alaska */
conus /* NAD27 - NAD83 shifts for the contiguous US (lower 48) */
hawaii /* Old Hawaiian to NAD83 shifts */
prvi /* NAD27 - NAD83 shift for Puerto Rico and Virgin Islands */
stgeorge /* Alaskan island datum to NAD83 shifts for St. George Island */
stlrnc /* Alaskan island datum to NAD83 shifts for St. Lawrence Island */
stpaul /* Alaskan island datum to NAD83 shifts for St. Paul Island */

Note: Currently, ArcSDE does not automatically install these grids.

NGS also provides high accuracy regional network (HARN) or high precision geodetic network (HPGN) grids. These are a more accurate redefinition of the NAD 1983 datum. Store these in the harn subdirectory in PEDATAHOME. Here are a few examples:

alhpgn /* HARN shifts for Alabama */
nehpgn /* HARN shifts for New England states: Connecticut, Massachusetts, New Hampshire, Rhode Island, and Vermont */
ohhpgn /* HARN shifts for Ohio */

Check pedef.h for the supported HARN states. Here is an example that initializes the predefined HARN grid for Ohio.

PE_GEOGTRAN ohio_harn; ohio_harn = pe_factory_geogtran(PE_GT_NAD_1983_HARN_OH);

Canada has a similar method to NADCON called NTv2. Grid shift files contain the shifts between NAD 1927 and NAD 1983. One grid contains data for the entire country. Several main grids cover the entire country. These grids and higher density data for urban areas are integrated into one grid file. Australia and New Zealand have also released grids based on NTv2.

Within the NTv2 directory, create directories called australia, canada, and newzealand.

The grid for New Zealand converts between NZGD 1949 and NZGD 2000. More information and the grid is available at http://www.linz.govt.nz/services/surveysystem/osgpublications/nzgd2000_trans.html. The grid name is nzgd2kgrid0005.gsb.

The Australian grids convert between either AGD 1966 or AGD 1984 and GDA 1994. See http://www.anzlic.org.au/icsm/gdatm/chapter7.htm#high for more information and links to the grid files. Currently, the available grids include:

nt_0599.gsb /* Northern Territory */
QLD0900.gsb /* Queensland */
SEAust_21_06_00.gsb /* Southeast Australia (New South Wales, Victoria, and ACT */
Tas_1098.gsb /* Tasmania*/
Vic_0799.gsb /* Victoria (released prior to the combined, Southeast grid */
WA_0700.gsb /* Western Australia */

Be careful to match the case exactly or use all lower-case letters in the grid names.

The Canadian grids convert between NAD 1927 or NAD 1927 (Definition 1976) and NAD 1983. The NAD 1927 (Definition 1976) coordinate system is a readjustment of NAD 1927 for Ontario. The grids are:
 
Ntv2_0.gsb /* NAD 1927 to NAD 1983 */
May76v20.gsb /* NAD 1927 (Definition 1976) to NAD 1983 for Ontario */

If you do not already have these grids, you may purchase them from Natural Resources Canada. More information is at http://cgis.geod.nrcan.gc.ca/ with the English language fact sheet at http://cgis.geod.nrcan.gc.ca/products/html-public/GSDapps/English/NTv2_Fact_Sheet.html.

Using a new grid Top

You can use new state HARN grids. Add the two grids (.las and .los extensions) to the harn directory in PEDATAHOME. Let?s say the Ohio HARN data doesn?t have a predefined macro. Define the method, the from and to GCS, a parameter array, and a geographic transformation. Use pe_parameter_new to define the HARN grid. When defining a dataset location, use the prefix dataset_ and add the base grid name. If the grid name is ohhpgn, the full parameter name is dataset_ohhpgn. The location of the grid is defined by PEDATAHOME and the file name extensions are added automatically. Here?s an example:

int i;
PE_GEOGTRAN ohio_harn;
PE_GEOGCS nad83,nad83_harn;
PE_PARAMETER oh_par[PE_PARM_MAX];
PE_METHOD harnmeth;

harnmeth = pe_factory_method(PE_MTH_HARN);

nad83 = pe_factory_geogcs(PE_GCS_NAD_1983);
nad83_harn = pe_factory_geogcs(PE_GCS_NAD_1983_HARN);

for (i = 0; i < PE_PARM_MAX; i++)
{
   oh_par[i] = (PE_PARAMETER)0;
}

oh_par[PE_PARM_ND] = pe_parameter_new("dataset_ohhpgn",0.0);
ohio_harn = pe_geogtran_new("OHHARN",nad83,nad83_harn,harnmeth,oh_par);

To differentiate between data on NAD 1983 and data using a HARN definition, a GCS for HARN, PE_GCS_NAD_1983_HARN has been added. You can create your own NADCON or HARN grid. You can convert any NGS grid to an ASCII format with the NADGRD executable on the NGS website. Use that to define your own pair of grid shifts, use NADGRD to convert the files back to binary, and place them in the appropriate PEDATAHOME subdirectory.

Improving performance Top

Currently, the grids are accessed from disk. You can usually substantially improve performance by loading a grid into memory. After creating a geographic transformation object, use the pe_geogtran_load_constants function to attach the in-memory grid to the object. Grid sizes range from 2KB for the smallest HARN grids to 12MB for the Canada NTv2 grid. You can unload the grid from memory with pe_geogtran_unload_constants or check whether the grid is loaded with pe_geogtran_isconstloaded. When you destroy the geographic transformation, the grid is unloaded automatically.

PE_GEOGTRAN ohio_harn;

/* Create the geographic transformation object. */
ohio_harn = pe_factory_geogtran(PE_GT_NAD_1983_TO_HARN_OH);

/* Load the Ohio HARN grid into memory. */
pe_geogtran_load_constants(ohio_harn);

/* Do the transformation here. */

/* Delete the geogtran object. */
pe_geogtran_del(ohio_harn);
feedback | privacy | legal