Prototype and description of the function getntvgridheader() (Function of the unlock requiring group "NTv2 Tools") |
getntvgridheader() Determination of the header parameter of one or all NTv2 grids. Prototype of the DLL function in C++ syntax (attend lower case!): extern "C" __declspec(dllimport) unsigned long __stdcall getntvgridheader( const char *pszFileNtv, unsigned long lAscii, unsigned short nGridNo, char **pszGridHeader); Prototype of the DLL function in Visual Objects syntax: _DLL function getntvgridheader; (pszFileNtv as psz,; // 4 Byte, char* lAscii as logic,; // 4 Byte nGridNo as word,; // 2 Byte pszGridHeader ref psz); // 4 Byte, char**, x*600 alloc. as logic pascal:geodll32.getntvgridheader The allocation of memory for "ref psz" / "char**" is necessary only if setstringallocate(FALSE) is called before. The parameters are passed and/or returned as follows: pszFileNtv File name of the ASCII or binary formatted NTv2 file from which the header parameter of grids are to be determined. The file name may contain a drive letter, a directory path and a file name extension. lAscii TRUE: The NTv2 file is ASCII formatted. FALSE: The NTv2 file is binary formatted. nGridNo n: Number of the grid from which the header parameter are to be determined. 0: The parameter of all grids contained in the NTv2 file are determined. pszGridHeader Header parameter of the NTv2 grid. (ref) Note: "ref pszGridHeader" corresponds to "char**" in C! The below calculated bytes of memory for the zero terminated string must be allocated with dependence to the call of the function setstringallocate(). Please consider the notes in the description of the function setstringallocate(). nGridNo n: 600 bytes of memory are needed. nGridNo 0: 600 times the number of subrids as bytes of memory are needed. Call the function getntvgridcount() to get the number of grids. returnVal In case of an error the function returns FALSE, otherwise TRUE. The returned text looks dependently of the geodetic source and target systems e.g. like this: Header of the grid No. 1 Name of the NTv2 grid: DHDN90 Name of the parent grid: NONE Date of creation: 06-11-09 Date of change: 06-11-09 South border [degrees]: 47.00000 North border [degrees]: 55.30000 East border [degrees]: 15.66667 West border [degrees]: 5.50000 grid spacing on latitude [degrees]: 0.10000 grid spacing on longitude [degrees]: 0.16667 Number of grid values: 5208 Unlocking: This function is a component of the unlock requiring function group "NTv2 tools". It is unlocked for unrestricted use together with the other functions of the group by passing the unlock parameters, acquired from the software distribution company, trough the function setunlockcode(). Without unlocking no calls for test purposes (shareware principle) are possible with this function. |