Module talk:Location map/data/NATO: Difference between revisions

Content deleted Content added
Cewbot (talk | contribs)
m Maintain {{WPBS}}: 1 WikiProject template. Create {{WPBS}}.
Spischot (talk | contribs)
 
(2 intermediate revisions by the same user not shown)
Line 2:
{{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 <math>px_0</math>, <math>py_0</math>, <math>dx</math> and <math>dy</math>.
 
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
:<math>X_{UR} =0.97716044 \text{; } Y_{UR} =0.82614817</math>
 
However, the lower left corner moves to approximately lat = 14.35 N; lon = 96.55 W. Conversion of the lower left corner with the <code>proj</code> tool:
:
proj +proj=laea +lat_0=35 +lon_0=-35 +a=1 -f %.8f
-96.55 14.35
'''-0.97701214 -0.07076885'''
 
:<math>X_{LL} =-0.97701214 \text{; } Y_{LL} =-0.07076885</math>
 
From these values the projection parameters can be computed as:
 
:<math>px_0 = -100 \frac{X_{LL}}{X_{UR}-X_{LL}} = -100 \frac{-0.97701214}{0.97716044 - -0.97701214} = 49.9962</math>
:<math>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</math>
:<math>dx = \frac 1 {X_{UR}-X_{LL}} = \frac 1 {0.97716044 - -0.97701214} = 0.5117</math>
:<math>dy = \frac 1 {Y_{UR}-Y_{LL}} = \frac 1 {0.82614817 - -0.07076885} = 1.1149</math>
[[User:Spischot|Spischot]] ([[User talk: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
::<math>y = \frac{575}{324} \times ((100 - 48.0905) - 62.8332 \times \dotsb)</math>
:can be simplified as
::<math>y = \frac{575}{324} \times (51.9095 - 62.8332 \times \dotsb)</math>
::<math>= \frac{575 \times 51.9095}{324} - \frac{575 \times 62.8332}{324} \times \dotsb</math>
::<math>= 92.1234 - 111.5096 \times \dotsb</math>
:so the projection parameters are actually
::vertical projection center <math>py_0 = 92.1234</math>
::vertical scaling <math>dy = 1.115096</math>
:which are pretty close to my computation above. The deviation of 0.015% was caused by my approximation of the new lower left corner. [[User:Spischot|Spischot]] ([[User talk:Spischot|talk]]) 09:40, 3 October 2024 (UTC)