Prototype and description of the function meritrans()

(Function of the unlock requiring group "Coordinate Transformations")

 

meritrans()
Coordinate Transformation to an other meridian strip.

Prototype of the DLL function in C++ syntax (attend lower case!):
extern "C" __declspec(dllimport) unsigned long __stdcall meritrans(
     double nCoordXQ,
     double nCoordYQ,
     double *nCoordXZ,
     double *nCoordYZ,
     unsigned short nCoordSys,
     unsigned short nEllipsoid,
     unsigned short nStrip);

Prototype of the DLL function in Visual Objects syntax:
_DLL function meritrans(;
     nCoordXQ as real8,;                   // 8 Byte
     nCoordYQ as real8,;                   // 8 Byte
     nCoordXZ ref real8,;                  // 4 Byte
     nCoordYZ ref real8,;                  // 4 Byte
     nCoordSys as word,;                   // 2 Byte
     nEllipsoid as word,;                  // 2 Byte
     nStrip as word);                      // 2 Byte
as logic pascal:geodll32.meritrans         // 4 Byte


The function converts Gauss-Krueger and UTM source coordinates nCoordXQ
and nCoordYQ on an arbitrary meridian strip to the target coordinates
nCoordXZ and nCoordYZ of the same Coordinate System on a desired meridian
strip. The source coordinates may be indicated in the "wrong" meridian
strip also. The transformation is accomplished with high exactness and
great speed.

The basis Coordinate System is registered in nCoordSys (see parameter
description). It must be a "Transversal Mercator meridian strip system".

The passed source coordinates and the calculated target coordinates are
examined for the range validity within their Coordinate Systems and for
syntactic correctness. The range validity is specified in the list
"Defaults of the Coordinate Systems". The range and syntax
check can be switched on or off with the function setcoordarea().

If in nCoordSys the value 1000 is passed, the function uses the
parameters of the user-defined Coordinate System passed before by the
function setusercoordsys1() and the earth ellipsoid defined before by
the function setuserellsource().

With the Coordinate Transformation the geodetic Ellipsoid nEllipsoid is
considered. If in nEllipsoid the value 0 is passed, then the geodetic
ellipsoids, usual for the respective Coordinate Systems, are taken (see
list "Defaults of the Coordinate Systems").

If in nEllipsoid the value 1000 is passed, the function uses the
Parameters of the user-defined earth ellipsoids passed before by the
function setuserellsource().

For transformations the meridian strip nStrip, to which the target
coordinates refers, can be given. The given meridian strip should not
deviate more than 3 strips from the native meridian strip of the target
Coordinate System. If in nStrip the value 0 is passed, an automatic
computation of the native meridians strip from the geographical length
will be made.


The parameters are passed and/or returned as follows:
nCoordXQ    East or X component of the source coordinate.
            The input format of the coordinate (notation) is described
            in the list "Defaults of the Coordinate Systems".

nCoordYQ    North or Y component of source coordinate.
            The input format of the coordinate (notation) is described
            in the list "Defaults of the Coordinate Systems".

nCoordXZ    East or X component of the target coordinate.
(ref)       The return format of the coordinate (notation) is described in
            the list "Defaults of the Coordinate Systems".

nCoordYZ    North or Y component of the target coordinate.
(ref)       The return format of the coordinate (notation) is described in
            the list "Defaults of the Coordinate Systems".

nCoordSys   Coordinate System of the source and target coordinates.
 › 0        The Coordinate System must be a "Transversal Mercator meridian
            strip system" (see list "Coordinate Reference Systems").
1000        User definied Coordinate System
            [Function setusercoordsys1()]

nEllipsoid  Geodetic ellipsoid.
   0        Standard ellipsoid (see list "Defaults of the coordinate
            systems").
 › 0        The numbers of the Reference Systems specify the geodetic
            ellipsoids (see list "Coordinate Reference Systems").
1000        User definied ellipsoid parameter
            [Function setuserellsource()]

nStrip      Required meridian strip
   0        Calculation of the native meridian strip from the geographic
            longitude.
 › 0        Valid number of the required meridian strip.

returnVal   In case of an error the function returns FALSE, otherwise TRUE.


Unlocking:
This function is a component of the unlock requiring function group
"Coordinate Transformations". 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.