It's been way too long since algebra. I need to translate from one coordinate system to another I have an image with (a set of) points (x,y) that correspond to coordinates (long,lat) So I need a program to get the constants for the translate equations

xp = A*xl +B and yp = C*yl + D.

Where (x,y) is the point on the map image and xl = (180-latitude) and yl = (180-longitude).

I think this can be solved with LAPACK and others but I can't figure out what to call and how the matrices are formed.

Since the magnitudes of the latitudes and longitudes are inverse relative to the x, y coordinates ( when x goes up the longitude goes down, etc) I have subtracted each from 180 to understand it better. I realize that the solution would account for the negative slope but I visualize it better this way.

Here's the set:

x 180-long y 180-lat

-----------------------------

136 56.90 100 130.18

153 57.72 552 142.38

300 62.92 725 147.47

473 69.10 741 147.47

819 81.52 832 150.52

858 82.87 83 130.18

1121 92.38 402 138.32

1327 99.77 944 154.58

1467 104.83 474 140.35

1511 106.45 265 134.25

The projection is not perfect so I'm just looking for the best fit. If the edges are too far off, I'll add a fudge factor. How do I calculate A, B, C and D for a pair of these data points?

Jim.