better to use a dedicated projection library. see the last example here:
http://sumo.dlr.de/wiki/Tools/Sumolib

2014-12-06 5:07 GMT+01:00 kavita pandey <[email protected]>:

> In osm map everything is in Latitude and longitude , i want to convert
> it into x,y coordinate system. So i have searched the net and used the
> following code ,
>
>
> function [x,y] = transform (lat,lon)
>
>
> PI=3.14;
> wgs84radius = 6378137;
> shift = PI * wgs84radius;
> x = lon * shift / 180;
> y = log(tan((90+lat)*PI/360)/ (PI/180));
>
> end
>
>
> could anyone please tell me is it ok or any other way to do it?
>
> thanks
> sims
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to