PDA

View Full Version : Calculating map altitude



Douglas Kaye
02-24-2012, 10:19 AM
First, is the following possible to calculate and second how would it be done.

Given a geographic location, map dimensions and a desired 'map.PixelSize' value can I calculate the altitude to display the map at? I've tried many things and maybe it comes down to a misunderstanding of what 'altitude' acutally means when dealing with a map projection but I haven't been able to come up with anything that works.

Thanks

Douglas Kaye
02-24-2012, 12:19 PM
...and before anyone indicates that I could use How To Display A Particular Radius with MapPoint (http://support.microsoft.com/?kbid=297348) I'd just like to point out that this code does not work at all. Even ignoring the issues with getting the physical size of a monitor correctly, if I plug 500 kms as my desired radius with a 1440 x 900 monitor with physical dimensions of 0.367m x .23m and a map which is 766 pixels x 362 pixels it returns an altitude of 4446km but after setting the map to that altitude my map width is 3319km and my map height is 1531km, which will fit a 500km radius circle but the ideal altitude is actually 2908km which is way different than the calculated value.

Eric Frost
02-24-2012, 03:31 PM
Thanks, but I have to admit I'm puzzling over your question. I guess I never had to address this.

But about if you set the window size of the MapPoint application?

After that you might need you develop your own scaling conversion table.

Or is that exactly what you are not wanting to do?

Eric

Douglas Kaye
02-24-2012, 03:48 PM
I was hoping to avoid using a lookup table but may have to go that way if I can't find an equation which correlates PixelSize and Altitude.

Restricting the size or aspect ratio of the map if not an option available to me.

Basically I have a set of points which are rendered as 5 pixel radius circles on the map. After the user chooses the set using a mechanism outside the scope of MapPoint I need to display them on a map at an altitude where none of the circles will overlap but as low as possible to show the most map detail possible.

Winwaed
02-27-2012, 07:43 AM
Sounds like the redraws could be slow?

Of course MapPoint doesn't know anything about screen sizes or DPI - it only knows about the pixel size of its own window. However when printing it should know all these things, but acts as if the resolution is much lower than it is (ie. little fine detail) and then scales accordingly.
Is this useful? I'm not sure.

If you do create a LUT, remember the window shape is going to be important: will MapPoint use teh width, height, or diagonal of the window for its calculations?