[OSM-dev] Projection code

Immanuel Scholz immanuel.scholz at gmx.de
Fri Apr 28 21:31:20 BST 2006


> Can someone point me to the code to project (lat, lon)  to (x,y)
> please? I've had a look around on the svn, but can't download it here
> to search.

>From Wikipedia:

x = lon*PI/180,
y = log(tan(PI/4+lat*PI/360)))

the other way round:

lat = atan(sinh(y))*180/PI,
lon = x*180/PI;

(for a java implementation, see

More information about the dev mailing list