[Gambas-user] C Sharp conversion to a Gambas Library/Component

Fabien Bodard gambas.fr at ...626...
Mon Feb 24 17:07:31 CET 2014


Hi john,

Install proj package

then add my proj class to your project

and my MapPointClass too
And MapBound, if you don't use gb.map


with all of that your code will look :

  Dim WGS As Proj = Proj("epsg:4326")
  Dim OBSG36 As Proj = Proj("epsg:27700")

  Dim hLatLon As MapPoint

  hLatLon = WGS.TransformMPoint(OBSG36, MapPoint(Val(TextBox1.Text),
Val(TextBox2.Text)))
 Message(hLatLon.Lat & "   /   " & hLatLon.Lon)



wel i can do more shorter

hLatLon = Proj("epsg:4326").TransformMPoint(Proj("epsg:27700"),MapPoint(Val(TextBox1.Text),
Val(TextBox2.Text)))

I've made a test for Edinburg... it look to be quite precise



2014-02-24 14:18 GMT+01:00 Benoît Minisini <gambas at ...1...>:
> Le 24/02/2014 13:51, John Rose a écrit :
>> I've asked this once before without my understanding what to do but I
>> thought that I would try again. Someone has written a routine in C
>> Sharp  which is used as a library for the Android RAD Basic4android: I
>> have successfully used this library with a Basic4android app that I have
>> written. I would like to be able to use this library in Gambas. Is this
>> possible with just a small amount of changes to the code (which I have
>> attached)? If so, could someone give me the steps (which must be easy as
>> I have no knowledge of C or how to 'integrate' a C 'program' into a
>> Gambas app?
>>
>
> You must convert the C Sharp syntax into Gambas syntax. I won't do that
> for you, but I can tell you that everything is convertible without any
> problem.
>
> Regards,
>
> --
> Benoît Minisini
>
> ------------------------------------------------------------------------------
> Flow-based real-time traffic analytics software. Cisco certified tool.
> Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
> Customize your own dashboards, set traffic alerts and generate reports.
> Network behavioral analysis & security monitoring. All-in-one tool.
> http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



-- 
Fabien Bodard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: democonvert-0.0.1.tar.gz
Type: application/x-gzip
Size: 7889 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20140224/3e8f0240/attachment.bin>


More information about the User mailing list