Prototype and description of the function setntvgridfindalg() (Function of the unlock requiring group "NTv2 Transformations") |
setntvgridfindalg() Sets the algorithm for finding NTv2 grids. Prototype of the DLL function in C++ syntax (attend lower case!): extern "C" __declspec(dllimport) unsigned long __stdcall setntvgridfindalg( unsigned long lSwitch); Prototype of the DLL function in Visual Objects syntax: _DLL function setntvgridfindalg(; lSwitch as logic); // 4 Byte, char* as logic pascal:geodll32.setntvgridfindalg // 4 Byte An NTv2 file can contain one or more grids. If the NTv2 file contains more than one grids and subgrids, the grids can overlap and be nested within each other. Normally, the subgrids of an NTv2 grid have a higher accuracy than the grid itself. A coordinate can therefore correspond to several grids. When calculating the coordinate, the grid with the highest accuracy intended exactly for this coordinate must be found from all grids. GeoDLL provides two algorithms for finding the appropriate grid. 1) Search with the name hierarchy (normal case) lSwitch = 0 (FALSE), default setting The grid names and parent names contained in each grid map a hierarchy for finding the grid that matches the coordinate. By setting lSwitch to 0, this hierarchy is used to find the matching grid. 2) Search with the smallest grid mesh diagonal (special case) lSwitch = 1 (TRUE) The grid mesh sizes are a benchmark for the resolution and accuracy of an NTv2 grid. GeoDLL calculates the grid mesh diagonal from the horizontal and vertical grid mesh sizes. This means that the grid with the smallest grid mesh size is used for the coordinate transformation. It can happen that the grid names and parent names (1) in an NTv2 file are not unambiguous. GeoDLL acknowledges this with an error message. In such a case, the algorithm for searching with the grid mesh diagonal (2) can be used. The parameters are passed and/or returned as follows: lSwitch Switch for the algorithm to find NTv2 grids. TRUE Search for the smallest grid mesh diagonal. FALSE Search with the name hierarchy (normal case). (default) returnVal In case of an error the function returns FALSE, otherwise TRUE. Unlocking: This function needs no unlocking. |