How to convert WGS84 coordinates(B,L) to spherical coordinates(phi,lambda)?

I Need Formulae?

the thing I'm wondering seems quite simple but I've been searching through internet and library of my school about 3 days. I've found nothing about this. Maybe someone have done this before?

  • 1
    Welcome to GIS StackExchange! What are you asking for exactly? The formula to the conversion? You might want to include that in your question.
    – R.K.
    Nov 28, 2014 at 12:44
  • 1
    Please do state it in the question. People usually ask for software packages or good so it pays to make the question explicit.
    – R.K.
    Nov 28, 2014 at 13:09
  • 1
    Are you asking how to convert ellipsoidal coordinates (on the WGS84 ellipsoid) into spherical coordinates on a related sphere (of which there are many)? What does "(B,L)" mean?
    – whuber
    Nov 28, 2014 at 14:48
  • Yes I'm asking how to convert Ellipsoidal to Spherical. I'm using B,L because if I say lat,long or phi , lambda people may get confused which one is sphere or which one is ellipsoid. (B,L)------->Ellipsoidal latitude longitude
    – Capan
    Dec 1, 2014 at 8:03
  • Please i need formulas and procedures to enable me convert wgs84 ellipsoid coordinates to Ghana War Office ellipsoid coordinates. I think it involves rotations,shifts and scaling but i don't know how to do that. Please help. Jul 26, 2018 at 19:42

2 Answers 2


I'll use spherical coordinates as defined here on Wikipedia which uses phi and theta (which is probably your lambda).

Phi is the angle from the north pole. Hence if the WGS84 point is 10.0.0N, phi will be 80 degrees. For a point in the southern hemisphere, say 12.30.00S, phi will be 90 + 12.5 = 102.5 degrees.

Theta is just the longitude in degrees, if the x-axis is the line going to the longitude=0 meridian (Greenwich). It's positive and between 0 and 180 for the eastern hemisphere and negative for the western hemisphere. This should just be the numeric value of your WGS84 longitude, with a "-" if its West. You can add 360 to negative thetas to get a range of 0 to 360.

If you need any spherical coordinates (phi or theta) in radians instead of degrees, then multiply by pi/180.

  • If this is the correct answer, could OP (or someone) please edit the question so it fits?
    – Martin F
    Nov 30, 2014 at 4:23
  • Actually this answer is right but not the one I'm looking for. I've edited question.
    – Capan
    Dec 1, 2014 at 10:07

Maybe Spacedman have already gave the answer but I was actually looking for formulae . I have found this page which is Turkish so I'll give you only the part you can understand. It says with this formulization we can transform our Geographic(Ellipsoidal) coordinates to Cartesian Coordinates. ( "h" is ellipsoidal height)

Then I have found this page which is Turkish again (but I'm sure you can find English one) describes how to transform Cartesian Coordinates to Spherical Coordinates.

So shortly my approach to this problem is like ;

İnput: Ellipsoidal Geographic Coordinates and ellipsoidal height.(GPS data of each point).

Process: Transform this coordinates to Cartesian Coordinates. Then transform Cartesian Coordinates to Spherical Coordinates

Output: Spherical Coordinates.

Please let me know if you think this is a wrong approach for this problem or you think this is right way..

  • WGS coordinates are not Cartesian: they are coordinates on an ellipsoid.
    – whuber
    Nov 28, 2014 at 14:48
  • Okey thats way I'm transforming them to Cartesian coordinates. (B,L) to X,Y,Z .
    – Capan
    Nov 28, 2014 at 16:32
  • 1
    That would be earth-centered spherical coordinates. There are other spherical coordinate systems for the earth. What is the purpose of your intended conversion?
    – whuber
    Nov 28, 2014 at 22:09
  • 1
    I'm trying to make some calculations on earth with an android program. Just like many other web services I'm using pseude-mercator for visualization of my map. Pseudeo-mercator uses Auxilary Sphere(a=6378137m) so we can say that it is a sphere. But GPS coordinates are ellipsodial.When user input GPS coordinates I need to convert these coordinates properly to the spherical coordiates. Which is not very common. Thats why I need it ...
    – Capan
    Dec 1, 2014 at 7:59
  • You should read the outstanding account at alastaira.wordpress.com/2011/01/23/…. Note particularly the passage "... the underlying geographic coordinates are defined using WGS84 (as in 3857), but projected as if they were defined on a sphere (as in 3785)." This means you don't have to make any conversion at all: you just pretend (lat, lon) for WGS84 mean (lat, lon) for a sphere.
    – whuber
    Dec 1, 2014 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.