From: Gordon on
Hello,
I have some points recorded with GPS in lat/long format and I want to convert them to Gauss-Kruger plane projection. My intention is to do it with proj.4 library because I have used it before through VBA.

In VBA code this procedure had the following form:

*declared function1 and its library:
Declare Function pjInitPlus Lib "proj_api.dll" (ByVal definition As String) As Long

*declared function2 and its library:
Declare Function pjTransform Lib "proj_api.dll" (ByVal srcPointer As Long, ByVal dstPointer As Long, ByVal count As Long, ByVal offset As Long, xs As Double, ys As Double, zs As Double) As Long

*and conversion:
pjOne = pjInitPlus("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")

pjTwo = pjInitPlus("+proj=tmerc +pm=greenwich +lat_0=0 +lon_0=15 +k=0.9999 +x_0=5500000 +y_0=0 +ellps=bessel +towgs84=550.499,164.116,475.142,5.80967,2.07902,-11.62386,0.99999445824 +units=m")

pjTransform(pjOne, pjTwo, 1, 1, X, Y, vbNull)

Now I need to input this procedure into MATLAB code, but I can't cope with mex definitions and I can't distinguish which procedure do I need to use.

proj.4 file was downloaded from link http://download.osgeo.org/proj/proj446_win32_bin.zip

Has anybody used this proj.4 transformation? I have found something on the net, but nothing explicit. Any example of proj library manipulation in MATLAB would be very helpful.

Thanks!