Killet Software Ing.-GbR - short: KilletSoft - is a software company, which was established in the year 1991. The society is divided into the ranges "Geodetic Standard Software", "Development Tools for Geoinformatics" and "International Geodata". The industrial sectors of emphasis of the companies supplied by KilletSoft are consulting engineers, GIS developers, Internet marketing, public utilities, logistics, telecommunications, security and public services.
Print page body  •    Contact  •    Imprint
Deutsch English

Proposal for using Polygonal Validity Scopes in NTv2 grid files
An attempt for meaningful supplement of the NTv2 standard
 
Kempen (Germany), December 2015, revised July 2016
Killet Software Ing.-GbR
 Download Press Release and Worksheet as MS WORD file
Publicised in VDVmagazin, Verband Deutscher Vermessungsingenieure, Booklet 2/2016

 

Preface
NTv2-Logo By means of NTv2 grid files it is possible to transform points from one coordinate reference system to another with very high accuracy. An NTv2 file contains one or more quasi-rectangular coordinate grids which are defined in the NTv2 headers. Instead of a rectangular area only an embedded polygonal area should and must be covered, for example, a state territory within the country borders. How can outside of a polygonal administrative area located coordinates be excluded from the coordinate transformations and reference system transitions (datum shifts) and thereby localization errors be suppressed? The author presents a simple but effective solution for this problem. The article matches GIS developers who generate NTv2 files for accurate reference system transitions in administrative areas. It also addresses GIS users who perform coordinate transformations and reference system transitions using NTv2 files.

 

New terms used in the text:
 
Polygonal Validity Scope
A polygon within a NTv2 grid in which reference system transitions are allowed.
 
Exopolygonal Entry
Entry of the value pair -99/-99 in shift values or accuracy values of a grid mesh for exclusion from the polygonal validity scope.
NTv2 was developed in Canada in the mid-nineties and means “National Transformation Version 2”. Meantime the pretty precise NTv2 method is used for the implementation of reference system transitions in many countries. NTv2 uses coordinate grids which are stored in files to perform exact transformations from one geodetic reference system to another. The coordinate grids of the NTv2 files contain the required shifts between both reference systems. Using bilinear interpolation, the exact coordinates of points in the source reference system are calculated to the target reference system.
 
The NTv2 file is composed of one or several parent and child coordinate grids in hierarchical structure. With compacted grid meshes optional child coordinate grids improve subareas of the parent coordinate grids lying below. In a hierarchical way child grids can appear as parent grids to further child grids lying above (see figure 3). Most grid files, e.g. the German Beta2007, only contain one single parent coordinate grid.

 

SUB_NAME DHDN90
PARENT   NONE
CREATED  06-11-09
UPDATED  06-11-09
S_LAT    169200.000000
N_LAT    199080.000000
E_LONG   -56400.000000
W_LONG   -19800.000000
LAT_INC  360.000000
LONG_INC 600.000000
GS_COUNT 5208
NUM_OREC 11
NUM_SREC 11
NUM_FILE 1
GS_TYPE  SECONDS
VERSION  NTv2.0
SYSTEM_F DHDN90
SYSTEM_T ETRS89
MAJOR_F  6377397.155
MINOR_F  6356078.963
MAJOR_T  6378137.000
MINOR_T  6356752.314
The NTv2 file begins with a main header (left) in which general information, the names of the used reference systems and the particular ellipsoid parameters are stored. Parent and child coordinate grids follow and each begins with a sub header (right). Therein validity scopes of the coordinate grids are specified by southern and northern latitudes and western and eastern longitudes.

 

 -2.749746  7.165792  0.000000  0.000000
 -2.750032  7.067153  0.000000  0.000000
 -2.750411  6.968641  0.000000  0.000000
 -2.750896  6.870278  0.000000  0.000000
 -2.751498  6.772085  0.000000  0.000000
Each sub header is followed by grid meshes with two values for longitudinal and latitudinal shifts as well as two values for accuracy. Shifts between reference systems are mostly specified in seconds, but can also be stored as minutes or degrees. Optionally the accuracy can be specified in meters for the mean error of the longitudinal and latitudinal shifts.

 
NTv2 grid with rectangular validity scope
NTv2 grid with rectangular validity scope

Thus, the rectangular validity scope of a NTv2 file is defined by one or several quasi-rectangular coordinate grids. Therefore, the limitation to the actually required polygonal area, e.g. defined by national frontiers, is not possible. As a result, all coordinate transformations outside of the polygonal validity scope are incorrect. To solve this problem you could fill grid meshes that lie outside of the desired polygonal area with certain values. These values are called “exopolygonal entries” in the following text.

Figure 1: This rectangular coordinate grid of a common NTv2 file covers the state territory of the Federal Republic of Germany. Coordinate transformations outside of the state territory, which is provided for the reference system transition, will inevitably cause errors.
 

 

The first option for implementing polygonal structures is the use of exopolygonal entries for accuracy values of the grid meshes. In most NTv2 files, accuracy values are set to 0 or -1 to indicate that there is no information about accuracy available. Empirically, there are no NTv2 files in which accuracy values are specified by plausible numbers. There is no known GIS software that includes accuracy values in calculations.

 

Grid meshes that are supposed to be excluded are marked as invalid, in case you determine both of their accuracy values by an exopolygonal entry of -99. So labeled grid meshes are excluded from the calculations of reference system transitions. The number -99 is proper for the mark because it cannot be found as a value pair for plausible accuracies.

 

The second option is the exopolygonal entry -99 in both longitudinal and latitudinal shifts of the grid meshes. Again it applies, that this value pair cannot be found for plausible longitudinal or latitudinal shifts.

NTv2 grid with polygonal validity scope
NTv2 grid with polygonal validity scope

Figure 2: This example addresses the area of the Federal Republic of Germany as polygonal validity scope. The red grid meshes are marked by exopolygonal entries and thus excluded from reference system transitions. The white grid meshes are border areas in which reference system transitions have to occur.
 

 

 -2.749746   7.165792   0.000000   0.000000
 -2.750032   7.067153   0.000000   0.000000
-99.000000 -99.000000   0.000000   0.000000
-99.000000 -99.000000   0.000000   0.000000
 -2.751498   6.772085   0.000000   0.000000
 -2.752229   6.674087 -99.000000 -99.000000
 -2.753104   6.576315 -99.000000 -99.000000
 -2.754140   6.478805   0.000000   0.000000
 -2.755358   6.381604   0.000000   0.000000
The example on the left shows both methods for the implementation of polygonal validity scopes. The shifts of two grid meshes marked yellow and the accuracy values of two further grid meshes marked blue have exopolygonal entries. Consequently, these four grid meshes are outside of the polygonal validity scope.

 

To implement polygonal validity scopes, a GIS software can query exopolygonal entries in the four shift and accuracy values of the grid meshes. During the calculation of reference system transitions, the coordinates that are to be transformed are examined for their association with such grid meshes. It is crucial whether the grid mesh is part of a parent coordinate grid or of a therein contained child coordinate grid. In case it lies in a child grid, the attempt is to continue the calculation in the parent grid lying below. When grid meshes fitting to a coordinate are marked by exopolygonal entries in all hierarchically stacked child and parent grids, then the coordinate is outside of the polygonal validity scope. It is excluded from the calculation of the reference system transition and a note is generated.

 
Testing coordinates on polygonal validity
Testing coordinates on polygonal validity
 

Figure 3: In this example, three coordinate grids are arranged one upon the other. Only when a coordinate falls through all exopolygonal grid meshes it lies outside of the polygonal validity and is excluded from the reference system transition.

 

There are two methods for the implementation of polygonal validity scopes resulting from the use of exopolygonal entries in shift or in accuracy values. Both methods have different effects.

 
Usage of accuracy values for the exclusion of one single grid mesh
Usage of accuracy values for the exclusion of one single grid mesh

Method 1: Exopolygonal entry in accuracy values of a grid mesh.

 

Exactly one grid mesh is addressed that has a grid spacing LAT_INC in northern direction and a grid spacing LON_INC in western direction from the grid point. Exactly this grid mesh is defined by the grid point and addressed regarding the interpolation of a coordinate that lies within. This grid mesh is excluded from the polygonal validity scope of the NTv2 grid.

Figure 4: Usage of accuracy values for the exclusion of one single grid mesh.
 

 
Usage of shift values for the exclusion of four adjacent grid meshes
Usage of shift values for the exclusion of four adjacent grid meshes

Method 2: Exopolygonal entry in longitudinal and latitudinal shifts of a grid mesh.

 

With a bilinear interpolation the four adjacent grid points of a coordinate are used. Each may contain exopolygonal entries. So, all in all four grid meshes are addressed and each has one grid spacing LAT_INC in northern and southern direction and one grid spacing LON_INC in western and eastern direction from the grid point.

Figure 5: Usage of shift values for the exclusion of four adjacent grid meshes.
 

 

These are the four grid meshes that are arranged around the grid point. Exactly these four grid meshes are excluded from the polygonal validity scope of the NTv2 grid. Thereby grid meshes may also be excluded from polygonal validity in an overlapping order.

 

Method 1 should be preferred because every single grid mesh in the NTv2 file can be excluded from polygonal validity. Method 2 should be applied when the GIS software used for the creation of a NTv2 grid file does not allow access to accuracy values. In case method 2 is used, an overlap region has to be taken into consideration due to the quadruple size of the addressed area. Both methods can be used separately or together without any special precautions.

 

The polygonal validity scope is specified by the developer while creating a NTv2 file or subsequently. Therefore the developer inserts exopolygonal entries into the shift or accuracy values of the outside of the required polygon lying grid meshes. The evaluating software then must be so constituted that it can identify the exopolygonal entries and declare them as void.

 

KilletSoft’s Geodetic Software Development Kit GeoDLL from version 16.00 on and their coordinate transformation program TRANSDAT from version 19.00 on already support polygonal validity scopes. Both tools detect exopolygonal entries in shifts and accuracies of grid meshes while checking all hierarchical child and parent coordinate grids. On hits the software generates a message, that the coordinate is located outside of the polygonal validity scope of the NTv2 grid file. Common NTv2 files without polygonal validity scopes still work as usual.

 

It depends on GIS developers and GIS users whether polygonal validity scopes will be implemented in NTv2 files in the future. A few if-statements and an additional loop structure in the source code of programs with NTv2 support are sufficient for implementing polygonal validity scopes. KilletSoft would like to support developers who are interested in this idea.

 

Summary
The author presents a simple method for realizing polygonal validity scopes in NTv2 files. Thereby the structure of the NTv2 file remains unchanged. When generating NTv2 files, grid meshes that are located outside of the polygonal validity can be labeled with exopolygonal entries. The benefit of this method is the exclusive addressing of grid meshes inside the intended administrative area and thus the exclusion of localization errors. Software developers can implement the consideration of polygonal validity scopes in GIS software by a few changes in the source code. KilletSoft already provides GIS software which supports polygonal validity scopes.


 

Note
Since the end of 2014, a note [1] can be found on the Internet which says that the geodetic Open Source Modul Proj.4 does not transform correctly in a minimal area around the edges of the coordinate grids due to a bug, in case there are child coordinate grids in the NTv2 file. The note states it affects a lot of programs which have included Proj.4 for geodetic calculations. GeoDLL and TRANSDAT by KilletSoft have their own algorithms for NTv2 calculations and thus they are not affected by the above mentioned error!


 

Footnotes

  1. GeoSN, 2014-11-11
    Usage of NTv2 grid files with freeware
    Proj.4 trouble ticket number 209 [http://trac.osgeo.org/proj/ticket/209]


 

List of figures

  1. NTv2 grid with rectangular validity scope
    Author: Fred Killet
  2. NTv2 grid with polygonal validity scope
    Author: Fred Killet
  3. Testing coordinates on polygonal validity
    Author: Fred Killet
  4. Usage of accuracy values for the exclusion of one single grid mesh
    Author: Fred Killet
  5. Usage of shift values for the exclusion of four adjacent grid meshes
    Author: Fred Killet
 
Figures 1 to 5 were generated by the program IncScape 0.91 equipped with a "GNU General Public License".


 

Logo QR-URL Author / Writer
Dipl.-Ing. Fred Killet
Escheln 28a
47906 Kempen (Germany)
http://www.killetsoft.de/homee.htm
killet(at)killetsoft.de

KilletSoft News In order that you always are well informed about our company, we write actual news, current information and special offers here into this column.

KilletSoft Logo Anniversary
 
Good service pays off - 25 years Geo Software by KilletSoft!
Read more...

KilletSoft Logo Updates
 
The period, in which you can use free updates of our programs, has been extended!
Read more...

KilletSoft Logo Innovation Award 2016
 
Award 2016 KilletSoft's geodetic software has won for the second year in succession the Innovation Award from the Initiative Small and Medium Enterprises.
Certificate TRANSDAT...
Certificate ORTWIN...
Read the Press Release...

KilletSoft Logo GeoDLL / TRANSDAT
 
Proposal for using Polygonal Validity Scopes in NTv2 grid files.
Read the White Paper...

KilletSoft Logo WINDOWS© 10 compatible
 
Win10 kompatibel Our software has got the certificate "WINDOWS© 10 compatible". So it complies with the compatibility standards of the Microsoft operating systems WINDOWS© 10.

KilletSoft Logo NTv2 Hamburg
 
Highly accurate NTv2 file of the Federal State of Hamburg free of charge for TRANSDAT and GeoDLL users.
Download the NTv2 file ...
Read the Press Release...

KilletSoft Logo GeoDLL
 
GeoDLL provides Time Zone Calculations with aspect to Maritime Territorial Limits.
Read the Press Release...

KilletSoft Logo TRANSDAT / GeoDLL
 
The program and the DLL now support all HARN / HPGN Reference Systems of the United States.
Read more...

KilletSoft Logo Translators wanted!
 
The latest versions of the programs TRANSDAT and SEVENPAR support language files for the programs interface. Since the language dependent texts are managed in external files, new languages can be added at any time by creating new language files. Every user of the program now can compile language files for himself and our customers.