Module talk:Location map/data/NATO

{{WikiProject banner shell|

{{WikiProject Maps}}

}}

Formulae after cropping

I find it difficult to understand the vertical stretch factor 575/324 in the formula for y introduced in [https://en.wikipedia.org/w/index.php?title=Module:Location_map/data/NATO&diff=prev&oldid=1212692713 this edit].

If I am not mistaken :File:NATO Territory Map.svg is a derivative of :File:North Atlantic Ocean laea location map.svg by cropping the lower border at 324/575 = 56.3478260869565%.

Imho this operation on a map with Lambert azimuthal equal-area projection cannot be compensated for by adding some vertical stretch factor but it requires the correction of the parameters px_0, py_0, dx and dy.

The upper right corner of the map remains at lat = 71.02192702284165 N; lon = 38.61651360858501 E and the projection center remains at lat = 35 N; lon = 35 W. The projection of the upper right corner remains at

:X_{UR} =0.97716044 \text{; } Y_{UR} =0.82614817

However, the lower left corner moves to approximately lat = 14.35 N; lon = 96.55 W. Conversion of the lower left corner with the proj tool:

:

proj +proj=laea +lat_0=35 +lon_0=-35 +a=1 -f %.8f

-96.55 14.35

-0.97701214 -0.07076885

:X_{LL} =-0.97701214 \text{; } Y_{LL} =-0.07076885

From these values the projection parameters can be computed as:

:px_0 = -100 \frac{X_{LL}}{X_{UR}-X_{LL}} = -100 \frac{-0.97701214}{0.97716044 - -0.97701214} = 49.9962

:py_0 = 100 \times \left(1+ \frac{Y_{LL}}{Y_{UR}-Y_{LL}}\right) = 100 \times \left(1+ \frac{-0.07076885}{0.82614817 - -0.07076885}\right) = 92.1098

:dx = \frac 1 {X_{UR}-X_{LL}} = \frac 1 {0.97716044 - -0.97701214} = 0.5117

:dy = \frac 1 {Y_{UR}-Y_{LL}} = \frac 1 {0.82614817 - -0.07076885} = 1.1149

Spischot (talk) 12:14, 2 October 2024 (UTC)

:After spending some more time thinking I do now consider the vertical stretching by factor 575/324 as correct. All positions in the upper 324/575 part of the original map (y between 0% and 56.3...%) are strechteched out to extend vertically over all (0% - 100%) of the new, cropped map.

:How does this relate to my computation of the new factors above?

:The formula for

::y = \frac{575}{324} \times ((100 - 48.0905) - 62.8332 \times \dotsb)

:can be simplified as

::y = \frac{575}{324} \times (51.9095 - 62.8332 \times \dotsb)

::= \frac{575 \times 51.9095}{324} - \frac{575 \times 62.8332}{324} \times \dotsb

::= 92.1234 - 111.5096 \times \dotsb

:so the projection parameters are actually

::vertical projection center py_0 = 92.1234

::vertical scaling dy = 1.115096

:which are pretty close to my computation above. The deviation of 0.015% was caused by my approximation of the new lower left corner. Spischot (talk) 09:40, 3 October 2024 (UTC)