<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head>
<body bgcolor="#FFFFFF"><div><br>> ... how you arrived at the scaling factor?<br><br></div><div>You know how a Mercator map enlarges stuff at <span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">high latitudes. This enlargement is known as </span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">the local scale factor, k, and for Mercator, it depends only on the latitude, phi. An "ordinary" instance</span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">of Mercator has k = 1 on the equator by definition, and the k at latitude phi is then 1/cos(phi) if you use</span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">spherical formulas, or slightly different in your case since you use ellipsoid formulas for WGS84. </span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">Anyway, to make your Mercator instance with latitude of true scale at 41.5 degrees, I computed k</span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">at 41.5 degs for the corresponding ordinary instance, and then used k_0 = 1/k for your instance. </span></div><div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></div><div>With ellipsoid formulas for Mercator, the formula for k at latitude phi is</div><div><br></div><div> k = sqrt(1 - e2 * sin2(phi)) / cos(phi)</div><div><br></div><div>where e2 is the ellipsoid's first eccentricity squared, defined as 1 - (b/a)2 where a is the</div><div>equatorial radius <span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">and b is the polar radius, or as (2-f)*f where f is the flattening. </span></div><div><br></div><div>(Every 2 above - except the last - should really be a superscript.)</div><div><br></div><div>The formula for k can be found as Eq. (7-8) at page 44 of</div><div><br></div><div>John P. Snyder.</div><div>Map Projections: A Working Manual, 1987. </div><div><a href="http://pubs.er.usgs.gov/pubs/pp/pp1395">http://pubs.er.usgs.gov/pubs/pp/pp1395</a></div><div><br></div><div>And you can find e2 and other properties of WGS84 at</div><div><br></div><div><a href="http://home.online.no/~sigurdhu/WGS84_Eng.html">http://home.online.no/~sigurdhu/WGS84_Eng.html</a></div><div><br></div><div>Best regards,</div><div><br></div><div>Mikael Rittri</div><div>Carmenta</div><div>Sweden</div><div><a href="http://www.carmenta.com">http://www.carmenta.com</a></div><div><br>20 jul 2012 kl. 01:15 skrev "Geoff Shipton" <<a href="mailto:geoff@tritonimaginginc.com">geoff@tritonimaginginc.com</a>>:<br><br></div><div></div><blockquote type="cite"><div><div class="WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hello again Mikael,<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Many thanks!<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">That seems to have fixed the problem. As I said I am not a geodesist, can you give me a clue as to how you arrived at the scaling factor? I suppose its some function of the Latitude of true scale? <o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Geoff<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Mikael Rittri [mailto:Mikael.Rittri@carmenta.com] <br><b>Sent:</b> Thursday, July 19, 2012 10:41 AM<br><b>To:</b> <<a href="mailto:geoff@tritonimaginginc.com">geoff@tritonimaginginc.com</a>>; PROJ.4 and general ProjectionsDiscussions<br><b>Cc:</b> <a href="mailto:proj@lists.maptools.org">proj@lists.maptools.org</a>; Howard Unkeles<br><b>Subject:</b> Re: [Proj] Bad Mercator Projection string?<o:p></o:p></span></p></div></div><p class="MsoNormal"><o:p> </o:p></p><div><p class="MsoNormal"><br>I don't know what the trouble is, but maybe GeoTIFF doesn't support Mercator with<o:p></o:p></p></div><div><p class="MsoNormal">a lat_ts parameter (latitude of true scale). If so, you can try to use a scale factor instead. <o:p></o:p></p></div><div><p class="MsoNormal"><o:p> </o:p></p></div><div><p class="MsoNormal">That is, replace your<o:p></o:p></p></div><div><p class="MsoNormal"><o:p> </o:p></p></div><div><p class="MsoNormal"> +lat_ts=41.5<o:p></o:p></p></div><div><p class="MsoNormal"><o:p> </o:p></p></div><div><p class="MsoNormal">by<o:p></o:p></p></div><div><p class="MsoNormal"><o:p> </o:p></p></div><div><p class="MsoNormal"> +k_0=0.750058844766239<o:p></o:p></p></div><div><p class="MsoNormal"><o:p> </o:p></p></div><div><p class="MsoNormal">This will give you an equivalent definition, and maybe it will work better. <o:p></o:p></p></div><div><p class="MsoNormal"><o:p> </o:p></p></div><div><p class="MsoNormal">Best regards,<o:p></o:p></p></div><div><p class="MsoNormal"><o:p> </o:p></p></div><div><p class="MsoNormal">Mikael Rittri<o:p></o:p></p></div><div><p class="MsoNormal">Carmenta<o:p></o:p></p></div><div><p class="MsoNormal">Sweden<o:p></o:p></p></div><div><p class="MsoNormal"><a href="http://www.carmenta.com"><a href="http://www.carmenta.com">http://www.carmenta.com</a></a><o:p></o:p></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>18 jul 2012 kl. 19:16 skrev "Geoff Shipton" <<a href="mailto:geoff@tritonimaginginc.com"><a href="mailto:geoff@tritonimaginginc.com">geoff@tritonimaginginc.com</a></a>>:<o:p></o:p></p></div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hello everyone,<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">We “inherited” this Proj4 string from a previous product – it has always seemed to work but we are having problems using it with gdalwarp, the warped .tif image looks valid but has errors in the TIF tags. If anybody has any idea what’s wrong I would be grateful. Comparing it with other Mercator Proj4 strings it looks a bit simple…<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Here’s the string:<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">+proj=merc +datum=WGS84 +lon_0=0 +lat_ts=41.5 +x_0=0 +y_0=2000000<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I am not a geodesist, be gentle.<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Many thanks,<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Geoff Shipton,<br>Triton Imaging Inc.<br>Customer Support.<br>Capitola CA.<br><a href="mailto:geoff@tritonimaginginc.com"><a href="mailto:geoff@tritonimaginginc.com">geoff@tritonimaginginc.com</a></a><br><br><span style="font-size:8.0pt">The information contained in this message may be privileged or confidential information intended solely for the use of the addressee(s). Any views or opinions presented in this communication do not necessarily represent those of Triton Imaging, Inc. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify me and you are hereby instructed to delete all electronic copies and destroy all printed copies.</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p></div></div></blockquote><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><p class="MsoNormal">_______________________________________________<br>Proj mailing list<br><a href="mailto:Proj@lists.maptools.org"><a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a></a><br><a href="http://lists.maptools.org/mailman/listinfo/proj"><a href="http://lists.maptools.org/mailman/listinfo/proj">http://lists.maptools.org/mailman/listinfo/proj</a></a><o:p></o:p></p></div></blockquote></div></div></blockquote></body></html>