# Map scale based on altitude

I'm either missing something or failing at some basic math here, but is it possible to calculate the map resolution (map units/pixel) based on altitude (from sea level)? I have center coordinates and projection.

• Your pixel size will not depend on altitude. It would depend more on Latitude. Feb 26, 2016 at 12:31
• @Vesanto only with certain projections Feb 26, 2016 at 13:15

## 2 Answers

Map resolution is in no way related to the altitude, `ESRI` defines resolution as

The detail with which a map depicts the location and shape of geographic features. The larger the map scale, the higher the possible resolution. As scale decreases, resolution diminishes and feature boundaries must be smoothed, simplified, or not shown at all; for example, small areas may have to be represented as points.

• Then what would a functionality that allows you to specify starting viewpoint with latitude, longitude and altitude mean? Feb 26, 2016 at 12:54
• Starting viewpoints are generally specified with latitude, longitude and zoom levels, where exactly did you encounter altitude? Feb 26, 2016 at 12:57
• It is an app requirement from our client. Feb 26, 2016 at 12:59
• If you are specifying the starting viewpoint on a mapping application with latitude, longitude and altitude then it might be using altitude as the height of your viewpoint ( but I'm not sure how that works). Can you post a sample? Feb 26, 2016 at 13:05
• Using your analogy, OpenLayers refers to resolution as "how many world feet can you see through this 2x2 feet square". So the same 2x2 feet square will show more of the world inside it the farther it is from the actual world. Feb 26, 2016 at 16:50

My two cents from the conversation following the previous answer: from what @Thiatt explains, he wants to define resolution as the apparent size of a pixel, viewed from an altitude A (which is actually a good definition). So, this is a simple trigonometry problem.

First, you have to set an "angular swath" (or "field of view", I don't know the english correct term) α, which would be the maximum view angle (from the nadir). Let's say α = 45°, but you can adjust it depending on the resolution you want.

Now, I will assume that the max horizontal and vertical extent of your map, from the center, is N = 500 px (i.e. your map size is 1000 x 1000 px).

Then, if R is the resolution (in m/px), you have the following relationship:

$\tan\alpha=\frac{N\cdot R}{A}$

Thus:

$R=A/N\cdot \tan\alpha$

With α = 45° and N = 500 px, you get R = 0.2 m/px at the altitude A = 100 m, and R = 2 m/px for A = 1000 m. If R is too low for your application, increase α in the formula.

Hope this will help.

• I had looked into that before, but got confused for two reasons, one being I could never wrap my head around trigonometry, and the other being I couldn't see where I could pull the angle α from with the information I had. I still can't specify a resolution based on an altitude because the map width itself depends on the resolution for OpenLayers, but your comment definitely helped in steering me in a workable direction. Thanks. Feb 28, 2016 at 14:12