<html><head></head><body name="Mail Message Editor"><div><br></div><div>[Resending minus tables, since they exceeded the 40K limit for posting.]</div><div><br></div><div>On Feb 16, 2010, at 3:01:04 AM, "Jan Hartmann" <j.l.h.hartmann@uva.nl> wrote:<br><blockquote style="padding-left: 5px; margin-left: 5px; border-left-width: 2px; border-left-style: solid; border-left-color: blue; color: blue; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="width: 749px; "><div id="felix-mail-header-block" style="color: black; background-color: white; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: silver; padding-bottom: 1em; margin-bottom: 1em; width: 749px; ">Do you have a programmatic version of the algorithm? It's something that would be really useful for a global map provider. I am working with the Royal Tropical Institute here in Amsterdam (<a class="moz-txt-link-abbreviated" href="http://www.kit.nl">www.kit.nl</a>), on an index for their 10.000s of historical maps from all over the globe. In the long run we would like to offer some thematic functionality, with an optimal projection</div></div></span></blockquote><div>I have no program code (that I can find or recall), though I found the Maple V worksheet I constructed at the time, and from which I made the corrections noted below. I also found tables I calculated giving optimal standard parallels for pairs of bounding parallels.</div><div><br></div>On Feb 16, 2010, at 3:57:03<font class="Apple-style-span" size="3"><span class="Apple-style-span" style="background-color: transparent; font-size: 12px; "> AM, </span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="background-color: transparent; font-size: 12px; ">Oscar van Vlijmen</span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="background-color: transparent; font-size: 12px; "> <ovv@hetnet.</span></font>nl> wrote:<br><blockquote style="padding-left: 5px; margin-left: 5px; border-left-width: 2px; border-left-style: solid; border-left-color: blue; color: blue; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; ">Very interesting!<br>But, could you please balance the parentheses in equation 4 (and 3), because <br>equation 4 cannot be calculated.<br></span></span></blockquote><br><div>Eek. Yes. Correcting, and using more uniform notation:</div><div><br></div><div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">1) sin (phi[0]) = A +/- sqrt (A^2 - 1)</p><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">2) A = [sin (phi[N]) * cos^2 (phi[S]) - sin (phi[S]) * cos^2 (phi[N])] /</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space: pre; "> </span>[cos^2 (phi[S]) - cos^2 (phi[N])]</p><div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">3) sin (phi[2]) = [sin (phi[1]) - 2 * sin (phi[0]) + sin (phi[1]) * sin^2 (phi[0])] /</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space: pre; "> </span>[2 * sin (phi[0]) * sin (phi[1]) - sin^2 (phi[0]) - 1]</p><div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">4) cos^2 (phi[1]) * sqrt [1 + sin^2 (phi[0]) - 2 * sin (phi[0]) * sin (phi[S])] -</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space: pre; "> </span>cos (phi[S]) * [1 + sin^2 (phi[0]) - 2 * sin (phi[0]) * sin (phi[1])] = 0</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" color="#0000FF"><br></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;">Equation (4) is of the form</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-family: Monaco; font-size: 11px; ">5) a * cos^2 (phi[1]) + b * sin (phi[1]) + c = 0</span></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;">which has a closed-form solution, though it is a little messy. There</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">a = sqrt [1 + sin^2 (phi[0]) - 2 * sin (phi[0]) * sin (phi[S])]</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">b = 2 * cos (phi[S]) * sin (phi[0])</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">c = - cos (phi[S]) - cos (phi[S]) * sin^2 (phi[0])</p><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium; ">with solution</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-style-span" style="background-color: transparent;">6) phi[1] = Atan2 (-[a*x^2 + c]/b], x)</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;">where</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-style-span" style="background-color: transparent;">7) x = +/- sqrt (-4*a*c - 2*b^2 +/- 2*z) / (2*a)</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;">and</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-style-span" style="background-color: transparent;">8) z = sqrt (4*a*b^2*c + b^4 + 4*a^2*b^2)</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;">The sign for (1) is chosen as the opposite of the average of the signs of the northern and southern bounding parallels. Using all combinations of signs in (7) yields four solutions. The two that are between phiS and phiN are the two of interest. (3) becomes superfluous in this scenario, since it yields the same as one of the combinations. I have supplied a few examples below. rn is the inset of the northern standard parallel as a ratio of the latitudinal span of the region of interest; rs is the southern.</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;">Regards,</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;">— daan Strebe</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><br></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">phi[S] = 20<span class="Apple-tab-span" style="white-space:pre"> </span>phi[2] = 46.34188<span class="Apple-tab-span" style="white-space:pre"> </span>rn = 0.12192</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">phi[N] = 50<span class="Apple-tab-span" style="white-space:pre"> </span>phi[1] = 25.06720<span class="Apple-tab-span" style="white-space:pre"> </span>rs = 0.16890</p><div><font class="Apple-style-span" size="1"><span class="Apple-style-span" style="font-size: 9px;"><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">phi[S] = 25<span class="Apple-tab-span" style="white-space:pre"> </span>phi[2] = 77.03289<span class="Apple-tab-span" style="white-space:pre"> </span>rn = 0.05393</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">phi[N] = 80<span class="Apple-tab-span" style="white-space:pre"> </span>phi[1] = 37.74930<span class="Apple-tab-span" style="white-space:pre"> </span>rs = 0.23181</p><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">phi[S] = 30<span class="Apple-tab-span" style="white-space:pre"> </span>phi[2] = 38.61324<span class="Apple-tab-span" style="white-space:pre"> </span>rn = 0.13860</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">phi[N] = 40<span class="Apple-tab-span" style="white-space:pre"> </span>phi[1] = 31.53993<span class="Apple-tab-span" style="white-space:pre"> </span>rs = 0.15390</p><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">phi[S] = 50<span class="Apple-tab-span" style="white-space:pre"> </span>phi[2] = 58.69310<span class="Apple-tab-span" style="white-space:pre"> </span>rn = 0.13068</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco">phi[N] = 60<span class="Apple-tab-span" style="white-space:pre"> </span>phi[1] = 51.61978<span class="Apple-tab-span" style="white-space:pre"> </span>rs = 0.16200</p><div><br></div></div></div></span></font></div></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><br></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium; ">On Feb 15, 2010, at 7:55:38 PM, strebe <strebe@aol.com> wrote:<br><blockquote style="padding-left: 5px; margin-left: 5px; border-left-width: 2px; border-left-style: solid; border-left-color: blue; color: blue; "><span class="Apple-style-span" style="color: rgb(0, 0, 0); "><div><br class="Apple-interchange-newline">Jan & colleagues:</div><div><br></div><div>Regarding the question of optimal standard parallels for Albers, I found my notes from 8 years ago. To summarize, there is no good rule, so perhaps the exact calculation I describe below has more importance than just academic.</div><div><br></div><div>Regards,</div><div>— daan Strebe</div><div><br></div><div><div><font class="Apple-style-span" face="monospace">________________________</font></div><div><font class="Apple-style-span" face="monospace"><br></font></div><div><font class="Apple-style-span" face="monospace"><br></font></div></div><div><span class="Apple-style-span" style="font-family: monospace; ">The problem: given two latitudinal extents phi[N] and phi[S], find the optimal standard parallels for the Albers projection. Optimal is defined to mean that the maximum angular deformation between the two standard parallels equals the maximum angular deformation at the two latitudinal extents. In this way one is assured that the maximum deviation from true remains minimal throughout the region of interest.<br><br>In a breathtakingly brief treatment, Melluish touches on the issue by describing how to select standard parallels such that the "error" on the extreme parallels is equal in magnitude and opposite in sign to the error of the central parallel. The distortion measurement is equivalent to mine, but the central parallel (the average of the north and south extreme parallels) generally does not carry the greatest distortion, so his method does not yield an optimal map. Hinks discusses the problem precisely, even noting that the central parallel is not the parallel of greatest distortion... but his treatment applies to the equidistant conic, not the equal-area, contrary to Snyder's comment in USGS P.P 1395.<br><br>We define a family of Albers projections to be all Albers projections characterized by a common 'central' latitude at which angular deformation reaches a peak between the two standard parallels, or sinks to zero in the case of one standard parallel. I have placed 'central' between quote marks because it is not any simple average of the standard parallels. We can demonstrate that the ratio of the angular deformation of any two points on the map remains constant for every member of the family. This is the beautiful and useful characteristic of the family. The property arises out of a happy mathematical coincidence.<br><br>First I declare the member of the family with only one standard parallel to be the canonical form. Because of the family's property of invariant scale ratios, we can first reduce the problem of choosing an optimal Albers projection to the single standard parallel case, which is much more tractable than trying to deal with two free parameters. This gives us a projection with zero distortion along the canonical parallel and identical distortion at the northern and southern extremities. Once we have found the canonical projection, we can choose the member of its family that produces the same magnitude of distortion at the canonical parallel as at the extreme parallels. We are guaranteed that the projection that fulfills this condition is one from the family of the canonical projection.<br><br>Let phi[S] denote the southern parallel of interest; phi[N] the northern parallel of interest; phi[0] the canonical parallel; phi[1] a standard parallel; and phi[2] the other standard parallel.<br><br>phi[S] and phi[N] are given. From them we must determine phi[0], phi[1], and phi[2], such that the magnitude of the angular deformation at phi[0] is the same as the magnitude of the angular deformation at phi[N] and phi[S]. Furthermore, there must be no greater angular deformation registered anywhere between the phi[S] and phi[N]. Given those conditions:<br><br>1) sin (phi[0]) = A +/- sqrt (A^2 - 1)<br><br>where<br><br>2) A = (sin (phi[N]) * cos^2 (phi[S]) - sin (phi[S]) * cos^2 (phi[N])) / (cos^2 (phi[S] - cos^2 (phi[N]))<br><br>That establishes the canonical parallel of the canonical form, and therefore the family, wherein lies the solution.<br><br>If we arbitrarily select some phi[1], one may ask how to arrive at the correct phi[2] within the family, given phi[0].<br><br>3) sin (phi[2]) = [sin (phi[1]) - 2 sin (phi[N]) + sin (phi[1]) sin^2 (phi[N])] / [2 sin (phi[N]) * sin (phi[1]) - sin^2 (phi[N]) - 1]<br><br>However, we do not yet know the proper phi[1]. With much manipulation, we discover the iterative equation:<br><br>4) cos^2 (phi[1]) * sqrt (1 + sin^2 (phi[0]) - 2 sin (phi[0]) * sin (phi[S])) - cos (phi[S]) (1 + sin^2 (phi[0] - 2 sin (phi[0]) sin (phi[1]) = 0<br><br>We solve for phi[1] with (4) and then use (3) to compute phi[2]. Now have the optimal Albers for any circumstance.<br><br>The literature fixates quite a bit on rules of thumb for choosing the standard parallels, with some texts recommending inward 1/5th the meridional separation of the extreme parallels. Other texts recommend 1/7th, and yet others recommend 1/6th. My own calculations based on the above criteria show that the correct values range from 5% to 25% for reasonable conics, and the symmetry between north and south is not necessarily very good. Hence, no rule of thumb is very good. The higher the latitude of the northern parallel, the greater the asymmetry. The asymmetry remains remarkable even if both latitudes are high. For instance, extreme latitudes at 50° and 70° result in standard parallels placed optimally at roughly 10% below phi[N] and 18% above phi[S].<br><br>Deetz's and Adams's recommendation of 29°30' and 45°30' for the US are pretty good, of course. Given maximum extents of 24°34' and 49°25', the optimal standard parallels are 28°42' and 46°19'. If we just can't bring ourselves to treat Lake of the Woods equitably then the upper standard parallel drops to 45°56'. The lower parallel only drops by 5'. The former map yield a maximum east-west scale distortion of 1.19%; the latter yields 1.15% (excluding Lake of the Woods, of course). Deetz's and Adams's recommendation yields 0.98% in the heartland; 1.25% at the northern border; 1.45% at the northern tip of the Lake of the Woods boundary; and 1.37% at Key West.</span></div></span></blockquote></span></font></p></div></div></span></font></div></div></div><div class="aol_ad_footer" id="u4DCCF2B04C6A44E19AACC6847DEA9CFA"></div></body></html>