Prototype and description of the function getntvgridheader()

(Function of the unlock requiring group "NTv2 grid data")

 

getntvgridheader()
Determination of the header parameter of one or all NTv2 subgrids.

Prototype of the DLL function in C++ syntax (attend lower case!):
__declspec(dllimport) unsigned long __stdcall getntvgridheader(
     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 subgrids 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 subgrid from which the header parameter are to
               be determined.
            0: The parameter of all subgrids contained in the NTv2 file are
               determined.

pszgridHeader  Header parameter of the NTv2 subgrid.
(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 subgrids.

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 sub grid No. 1
   Name of the sub 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 grid data". 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 only a few function calls for test purposes (shareware
principle) are possible. It should be noted that in addition the function
group "Coordinate Transformations" must be unlocked.