PROJ.4 VB Wrappers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

PROJ.4 VB Wrappers

Piotr Synowiec

link to the proj4 wrappers is not working any more.
PROJ.4 VB Wrappers
<http://ftp.dfg.ca.gov/Outgoing/Nafwb/proj4/proj_api.zip> from Eric G.
Miller.
http://ftp.dfg.ca.gov/Outgoing/Nafwb/proj4/proj_api.zip

Could anybody send me this file by email ?

Cheers
Piotr
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: PROJ.4 VB Wrappers

Eric Miller-4
My PROJ.4 stuff had to be moved:

http://ftp.dfg.ca.gov/Public/BDB/Tools/proj4/

>>> [hidden email] 7/10/2006 2:03 PM >>>

link to the proj4 wrappers is not working any more.
PROJ.4 VB Wrappers
<http://ftp.dfg.ca.gov/Outgoing/Nafwb/proj4/proj_api.zip> from Eric G.

Miller.
http://ftp.dfg.ca.gov/Outgoing/Nafwb/proj4/proj_api.zip 

Could anybody send me this file by email ?

Cheers
Piotr
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: PROJ.4 VB Wrappers

Bart Adriaanse
In reply to this post by Piotr Synowiec
Here's the wrapper i use from VB(6)

------ wrapper ------

' proj.dll projection info
Private Type ProjCoordSys
  ProjPointer As Long
  ProjPar() As String
  isValid As Boolean
  IsLL As Boolean
End Type

' proj.dll declarations
Private Declare Function pj_init Lib "Proj.dll" (ByVal argc As Long, ByRef
argv As Long) As Long
Private Declare Sub pj_free Lib "Proj.dll" (ByVal pointer As Long)
Private Declare Function pj_transform Lib "Proj" (ByVal SrcPrj As Long,
ByVal DestPrj As Long, ByVal nPoints As Long, ByVal Offset As Long, ByRef x
As Double, ByRef y As Double, ByRef z As Double) As Long

------ /wrapper -----


Now to make this work, you do need to recompile proj.dll using MAKEFILE.VC
after editing the source files a bit adding the __stdcall attribute for the
functions you need to use from VB,

in pj_transform.c

int __stdcall pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int
point_offset,
                  double *x, double *y, double *z )

same (ad __stdcall) for pj_init, pj_free functions in pj_init.c

same for all three functions in proj_api.h

Then run NMAKE MAKEFILE.VC (command line) and voila...

I hope that helps, it's not really a wrapper, its just a calling convention
;-)

Bart








"Piotr Synowiec" <[hidden email]> wrote in message
news:[hidden email]...

>
> link to the proj4 wrappers is not working any more.
> PROJ.4 VB Wrappers
> <http://ftp.dfg.ca.gov/Outgoing/Nafwb/proj4/proj_api.zip> from Eric G.
> Miller.
> http://ftp.dfg.ca.gov/Outgoing/Nafwb/proj4/proj_api.zip
>
> Could anybody send me this file by email ?
>
> Cheers
> Piotr
> _______________________________________________
> Proj mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/proj
>



_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj