3

Wondering where I can find more documentation on GeoGridPosition. Specifically, what formulas does Mathematica use to transform lat/long points to x/y coordinates? As a test point, I do the following:

    GeoGridPosition[GeoPosition[{45, -45}], "Mercator"]

which returns:

    GeoGridPosition[{-45, (180 Log[Cot[π/8]])/π}, "Mercator"]

which can be simplified to the point {-45, 50.499}, I just don't know how this is computed, or what Mathematica uses as a reference. If anyone could explain or point me in the right direction, that'd be great.

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
lwcarani
  • 179
  • 1
  • 5

1 Answers1

4

I'm not sure whether your question concerns what mathematical transformations are used or what the geodetic reference parameters are for a particular projection. Perhaps you are concerned about both issues.

  • To learn about the geodetic reference parameters are for a particular projection, refer to GeoProjectionData.

  • To learn about the mathematics of a particular projection, Google on the projections name. To learn what projections are available, again refer to GeoProjectionData.

However, one can make a good guess about the mathematical transform directly from the result given by GeoGridPosition by posing a request that uses distinctive primes as latitude and longitude values.

For example:

GeoGridPosition[GeoPosition[{17, 43}], "Mercator"]
GeoGridPosition[{43, (180 Log[Cot[(73 π)/360]])/π}, "Mercator"]

Noting that 73 is the colatitude of 17, this suggests that the transform is

toMercator[lat_, long_] := {long, 180 Log[Cot[(90 - lat) π/360]]/π}

Some tests to confirm this finding.

toMercator[17, 43]
{43, (180 Log[Cot[(73 π)/360]])/π}
toMercator[45, -45]
{-45, (180 Log[Cot[π/8]])/π}

This works for other projections as well. Here is a more complex but still informative example.

 GeoGridPosition[GeoPosition[{17, 43}], "Albers"]
GeoGridPosition[
  {4 Sqrt[1/3 (1-1/2 Sqrt[3] Sin[(17 π)/180])] Sin[(43 π)/(240 Sqrt[3])], 
   4/Sqrt[3]-4 Cos[(43 π)/(240 Sqrt[3])] Sqrt[1/3 (1-1/2 Sqrt[3] Sin[(17 π)/180])]}, 
  "Albers"]

I won't work out a Mathematica projection function from this, but I think you can see the form it would take fairly well.

m_goldberg
  • 107,779
  • 16
  • 103
  • 257