From 8e63fa82a98c355cb5a6a87e7838a7cd281909b3 Mon Sep 17 00:00:00 2001 From: Frank Warmerdam Date: Wed, 19 Oct 2005 03:23:59 +0000 Subject: New git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1310 4e78687f-474d-0410-85f9-8d5e500ac6b2 --- com/README.TXT | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 com/README.TXT (limited to 'com') diff --git a/com/README.TXT b/com/README.TXT new file mode 100755 index 00000000..08ca7cb7 --- /dev/null +++ b/com/README.TXT @@ -0,0 +1,41 @@ + PROJ.4 COM Interface + ==================== + +This directory contains a Visual Studio 6 project to build +a COM object with a partial interface to PROJ.4. + +Once built, you should be able to: + + regsvr32 debug\proj4com.dll + +Then in VB6: + + o Add the type library as a resource and enable it. + + o Setup code like the following: + +Private Sub Command1_Click() + Dim pUTM As PROJ4Lib.IProjDef + Dim pLL As PROJ4Lib.IProjDef + + Set pUTM = New PROJ4Lib.ProjDef + Set pLL = New PROJ4Lib.ProjDef + + pUTM.Initialize ("+proj=utm +zone=11 +datum=WGS84") + pLL.Initialize ("+proj=latlong +datum=WGS84") + + Dim X As Double, Y As Double, Z As Double + + X = 25000 + Y = 3000000 + Z = 0 + + MsgBox X & " " & Y + + If pLL.TransformPoint3D(pUTM, X, Y, Z) = 0 Then + MsgBox "TransformPoint3D " & pLL.GetLastError() + End If + + MsgBox X & " " & Y + +End Sub \ No newline at end of file -- cgit v1.2.3