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

Fabien Bodard gambas.fr at ...626...
Tue Feb 25 23:38:13 CET 2014


The class proj, mapointclass and mapbound are in the project i've sent to you

the C# class you have is very specific...

they are some tools that are able to do that without rewriting the wheel.

libproj of the proj project is one of these tool. It used in every map
displayer in it's js version.

here my proj class is just a frontend class to the cs2cs command line
tool provided with Proj

http://packages.ubuntu.com/saucy/libproj0


gb.map is a tiled map viewer... it's like googlemap or other, it can
display many sort of source for maps ans some shape layers

But for your use you need to study cs2cs and for more ease you can use
my classes.

but i don't know if my choosen epsg are the good ones.

epsg are généric definition for transformation points.

for example
WGS84 is epsg:4326 :

+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs


OSGB36 is epsg:27700 :

+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000
+y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs

http://spatialreference.org/ref/epsg/27700/



You need also to investigate by yourself. We are doing tools for our
use, but it can't be perfect for every body.

2014-02-25 18:41 GMT+01:00 John Rose <john.aaron.rose at ...626...>:
> Fabien,
>
> The C# routine that I previously attached has Subs to do conversions
> between any of OSGBGridmapReference, OSGBEastingNorthing, OSGB36 &
> WGS84. An example point is:
> OSGBGridmapReference: Map=SO, Across=91370, Up=95550
> OSGBEastingNorthing: Easting=391370, Northing=295550
> OSGB36: Latitude=52.557346, Longitude=-2.127308
> WGS84: Latitude=52.557704, Longitude=-2.128725
> Would the software you suggest be capable of all these calculations?
>
> Re your suggestions:
>
> 1. Do you mean the Ubuntu proj package?
>
> 2. Where do I obtain these classes?
> proj, MapPointClass, MapBound (what is gb.map?)
>
> 3. What are epsg numbers in code below?
>    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)
>
>
> ------------------------------------------------------------------------------
> 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




More information about the User mailing list