Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to divide the globe into 1000 $\times$ 1000 meter geodesic squares, and then map any long / lat to the applicable square.

The altitude of each block would be the altitude of the earth at the block's center.

Could someone point me in the right direction please as to how to calculate the flat grid and map long/lat to it.


Since squares don't map onto a sphere, a solution I thought of is to calculate the circumference for a given latitude (taking into account the 1000 m grid), and divide it into 1000 m blocks (rounded up). So the number of blocks that map around the earth will decrease as we move away from the equator.

The squares will be slightly narrower at the top as we go North, and at the bottom as we go South.

share|cite|improve this question
What do you want to do about the fact that circles of latitude get shorter as you go towards the poles? The circumference of the earth is 40,000 km at the equator, so you would have 40 squares there. At 45 degrees latitude, it is only 28,000 km, so you would only have 28. One choice is to have more squares at the equator (dividing the central latitude circle by 1000 km, rounding, and letting the north and south boundaries be a different length). Or use ranges of longitude and letting the squares change size. Or, which gives up on squares. – Ross Millikan Aug 23 '12 at 12:53
I want the geodesic squares to remain the same size regardless of position. – IamIC Aug 23 '12 at 13:50
I understand that squares don't fit onto a sphere. They would have to scale slightly to fit as they go away from the equator. – IamIC Aug 23 '12 at 13:55
up vote 3 down vote accepted

The length of a line of latitude is $4.0075E8 \cos \lambda$ meters, where $\lambda$ is the latitude. Similarly it is $4.0008E8$ meters around a line of longitude due to flattening. So your spacing in latitude is $\frac {360}{40075}$ degrees all the way around. Then at each latitude (it doesn't change much in 1 km) you have a spacing of $\frac {360}{40075 \cos \lambda}$ degrees to get 1 km by 1 km squares.

share|cite|improve this answer
Thanks Ross. I had managed to work it out shortly before you answered. Sometimes one has to look from another angle, no pun intended. Added floor to get the vertical row height. – IamIC Aug 23 '12 at 17:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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