[Math] Formula to calculate the height of a Satellite Image in degrees

trigonometry

Do you know of a formula or function that can calculate the real world height of a satellite image in degrees?

The image is from Google Static Maps and the image uses Mercator projection which makes calculating the height very difficult. I can successfully calculate the width but I don't know of a formula to calculate the height of the satellite image in degrees.

enter image description here
For the above image I know this information:

  • Width= 400px
  • Height= 400px
  • Central mid point is: -32 Lat 151 Long
  • Google's zoom value is 14

This is how I calculate the width which works:

// The reason I use 256 is because in google the whole earth fits inside 256 pixels
// when the zoom value is 0(zoom can be 0 > zoom < 25)
float meshWidthDeg = (imgWidth/256f)*(360f / Math.Pow(2f,zoom));

Best Answer

After a quick look at the Wikipedia entry for the Mercador projection, I believe that for short distances, the horizontal and vertical scales are the same (on a printed map). Scroll down to Formulae for distance. Pixels are usually not square, so you have to allow for that, and it could vary between devices.

There is a comment there that Google uses a variant of the Mercador.

Related Question