# How to do stereographic projection conversion (w.r.t. changing point of projection)?

Given a stereographic point P1 projected from point P, and given another point Q, I would like to know how to transform P1's coordinates to that of a stereographic point Q1 projected from point Q.

The Q I'm using is pretty close to P, and the points on the sphere/earth to be projected are pretty near the antipode of P/Q, possibly clustered together, and having a high accuracy on each point in order to differentiate them is important. I'm wondering if a simple adding of an offset value to P1 will provide a good approximation? I need to preserve conformality and relative distances of projected points (since distance is not preserved in a stereographic projection, but I think that relative distances of points are preserved?). P's and Q's latitude and longitude will be known.

Do let me know if this question is better posted at math.stackexchange.com

-
(1) There's no problem with accuracy in stereographic projections in the hemisphere opposite the point of projection (P), so it seems there is no advantage to reprojection. (2) Are you using a spherical or ellipsoidal earth model? (There are simple formulas--fractional linear transformations--for the sphere; there are no simple solutions for ellipsoids.) (3) You cannot preserve relative distances with a conformal change of coordinates unless you are merely rotating about the axis through P. –  whuber Nov 30 '10 at 16:02
Thank you for your comment. (1) The reason why I want to do reprojection that there's going to be a new system which gives values projected w.r.t. P, and I need to convert the values so that the old system which reads values projected w.r.t. Q can take them in a usable form. I only have access to reading from the new system and writing to the old system. (2) I'm using a spherical earth model. Fractional linear transformation seems beyond my current understanding, but it's good to know it exists. –  blizpasta Dec 1 '10 at 5:16
(3) Sorry, I might not have used "relative distances" correctly. What I wanted to say is to preserve the isomorphic (not sure if I used the term here correct) relation between the Euclidean distance between a projected point and the origin on the plane of projection, and the great-circle distance between that point and the antipode of the point of projection. I'm not sure if there exist that isomorphism, but it seems intuitively true though. –  blizpasta Dec 1 '10 at 5:17

You appear to be describing rotations of the Riemann Sphere: they are conformal and preserve the spherical metric. There are several simple ways to write them down (not involving any trigonometry!). A good one is to consider coordinates (x,y) in the plane as complex numbers z = x + yI, I^2 = -1. Given any four complex numbers a, b, c, and d, a fractional linear transformation of z is the value (az + b)/(cz + d). Thinking of z as the image of a point on the sphere via stereographic projection, it's easy to work out that for a fractional linear transformation to be a true rotation, a and d must be complex conjugates of each other and b and -c must also be mutual complex conjugates. (This defines the matrix group SU(2,C).)

Let Q be the point (in projected coordinates) you would like to base a new projection on. All we need to do is rotate Q to infinity, because infinity corresponds to the projection's base point (the north pole). This implies the denominator cz + d must equal zero, giving a solution

a = Conjugate of Q,
b = 1,
c = -1,
d = Q.


In other words, the change of coordinates you seek has the formula

z --> (1 + Conjugate(Q)*z) / (Q - z).


As an example, suppose you want to make Q = (5, 5) = 5 + 5I the new origin of projection. Using the rules of complex arithmetic we can work out the transformation in terms of the coordinates (x,y):

z --> (1 + (5 - 5I)*z) / (5 + 5I - z)

= (1 + (5 - 5I)*(x + yI)) / (5 + 5I - (x + yI))

= (1 + 5x + 5y + (5y - 5x)I) / (5 - x + (5-y)I)

= [(5 - x + 50y - 5x^2 - 5y^2) + (-5 - 50x + y + 5x^2 + 5y^2)I]
/ ((5-x)^2 + (5-y)^2).


That is, writing the new coordinates of (x,y) as (x',y'), we have

x' = (5 - x + 50y - 5x^2 - 5y^2) / ((5-x)^2 + (5-y)^2)


and

y' = (-5 - 50x + y + 5x^2 + 5y^2) / ((5-x)^2 + (5-y)^2).


You can follow this up by any rotation around the origin to reorient the new map. A good choice is to multiply the result by Q/Conjugate(Q) = Q^2 / |Q|^2. This is because the transformation has a nice interpretation:

(1 + Conjugate(Q)*z) / (Q - z) * Q / Conjugate(Q)

= (1/Conjugate(Q) + z) (1 + z/Q + (z/Q)^2 + ...).


The first factor merely translates all points by the (small) amount 1/Conjugate(Q). In particular, this keeps the map oriented correctly. The second factor can be ignored when z/Q is very small. Typically, for small rotations, Q is already "near infinity": that is, it is large compared with any point on the map, because it is the projection a point close to the original north pole. This justifies approximating the change in projection by means of a translation and, in addition, it tells us how to measure the error: the size of z/Q (the first, and largest, neglected term in the series on the right) is the ratio of the sizes of z and Q (that is, the ratio of their distances from the map origin). In other words, when the original projection of Q is way beyond the extent of your map, you will likely be ok with the approximate formula.

-
Thank you. I don't understand your solution since I've not learnt projective geometry nor lie groups. Basically, I don't have mathematics beyond college (pre-university). (wish I have the time to learn more maths) I don't like to use something which I don't understand, so for now, I approximate it with linear offsets as the shift in the point of projection is relatively small, and the projected points are in the vicinity of the antipode. There will be some distortion but I guess it's acceptable since this is the method I was advised to use at work. It's not very elegant nor general though. –  blizpasta Feb 25 '11 at 5:39
I'm sorry, this answer was intended to be accessible. In the US, complex arithmetic is supposed to be taught in the third year of high school, usually around tenth grade (en.wikibooks.org/wiki/High_School_Mathematics_Extensions/…). Stereographic projection isn't: but you obviously already know about that! The bottom line is that the formulas, once they are developed to the point shown here, involve basic arithmetic--no exponentials, logs, trig, or anything else beyond grade school. That means it's easy to implement in almost any programming environment. –  whuber Feb 25 '11 at 5:55
@blizpasta In response to your comment about linear offsets, I added a paragraph to justify this approach and to measure the amount of distortion. –  whuber Feb 25 '11 at 6:06
this and other math-literate answers on the site make me wonder if its worth getting mathjax.org support enabled for the site. –  scw Feb 25 '11 at 8:35
@scw I have thought about this for a while and would appreciate that support, but have held back with the suggestion because the TeX escapes ($and$\$) can surprise people who are not familiar with this mechanism. It would be nice if we had an option to turn the TeX support on or off for individual replies or threads, possibly by means of a specific tag ("math", perhaps). –  whuber Feb 25 '11 at 16:09