<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD>
<BODY name="Mail Message Editor">
<DIV id=idOWAReplyText71211 dir=ltr>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=2>I'd suggest something other than zero for the eccentricity of the WGS84 ellipsoid.&nbsp; Say, e squared being 0.00669437999013, more or less ...</FONT></DIV>
<DIV dir=ltr><FONT size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT size=2>Cliff Mugnier</FONT></DIV>
<DIV dir=ltr><FONT size=2>LOUISIANA STATE UNIVERSITY</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> proj-bounces@lists.maptools.org on behalf of strebe<BR><B>Sent:</B> Wed 16-Jul-08 13:39<BR><B>To:</B> PROJ.4 and general Projections Discussions<BR><B>Subject:</B> [Proj] Re: Distance measured in Mercator projection<BR></FONT><BR></DIV>
<DIV>
<DIV><BR></DIV>
<DIV>Shannon,</DIV>
<DIV><BR></DIV>
<DIV>The scale factor in any direction at a given point on the ellipsoidal equatorial Mercator is:</DIV>
<DIV><BR></DIV>
<DIV>h = &#8730;(1 - e^2 x sin^2 (phi)) / cos (phi)</DIV>
<DIV><BR></DIV>
<DIV>where &#8730; is the square root of the expression; e is the eccentricity of the ellipsoid (0.0 for WGS84); ^2 means the square of the expression; and other symbols and semantics as given before.<BR></DIV>
<DIV><BR></DIV>
<DIV>Therefore you would multiply 1m x h to find the map distance of one meter at full scale. As you can see, this is the same as the original expression but just multiplied by the factor that adjusts for the eccentricity.</DIV>
<DIV><BR></DIV>
<DIV>Don't hesitate to ask for clarification if you need it. Good luck.</DIV>
<DIV><BR></DIV>
<DIV>Regards,</DIV>
<DIV>-- daan Strebe</DIV>
<DIV><BR></DIV><BR>On Jul 16, 2008, at 3:53:25 AM, "Shannon Scott" &lt;sscott@locationinc.com&gt; wrote:<BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: blue 2px solid; COLOR: blue"><SPAN class=Apple-style-span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2">
<DIV style="WIDTH: 100%">
<DIV id=felix-mail-header-block style="MARGIN-BOTTOM: 1em; PADDING-BOTTOM: 1em; WIDTH: 100%; COLOR: black; BORDER-BOTTOM: silver 1px solid; BACKGROUND-COLOR: white">
<TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
<TBODY>
<TR>
<TD style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; VERTICAL-ALIGN: top; COLOR: gray; FONT-FAMILY: 'Lucida Grande'; TEXT-ALIGN: right" width=70><SPAN>From:</SPAN></TD>
<TD style="PADDING-LEFT: 5px; FONT-SIZE: 8pt; VERTICAL-ALIGN: top; COLOR: black; FONT-FAMILY: 'Lucida Grande'; TEXT-ALIGN: left"><SPAN title='"Shannon Scott" <sscott@locationinc.com>'>"Shannon Scott" &lt;sscott@locationinc.com&gt;</SPAN></TD></TR>
<TR>
<TD style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; VERTICAL-ALIGN: top; COLOR: gray; FONT-FAMILY: 'Lucida Grande'; TEXT-ALIGN: right" width=70><SPAN>Subject:</SPAN></TD>
<TD style="PADDING-LEFT: 5px; FONT-SIZE: 8pt; VERTICAL-ALIGN: top; COLOR: black; FONT-FAMILY: 'Lucida Grande'; TEXT-ALIGN: left"><SPAN style="FONT-WEIGHT: bold">[Proj] Re: Distance measured in Mercator projection</SPAN></TD></TR>
<TR>
<TD style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; VERTICAL-ALIGN: top; COLOR: gray; FONT-FAMILY: 'Lucida Grande'; TEXT-ALIGN: right" width=70><SPAN>Date:</SPAN></TD>
<TD style="PADDING-LEFT: 5px; FONT-SIZE: 8pt; VERTICAL-ALIGN: top; COLOR: black; FONT-FAMILY: 'Lucida Grande'; TEXT-ALIGN: left"><SPAN>July 16, 2008 3:53:25 AM PDT</SPAN></TD></TR>
<TR>
<TD style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; VERTICAL-ALIGN: top; COLOR: gray; FONT-FAMILY: 'Lucida Grande'; TEXT-ALIGN: right" width=70><SPAN>To:</SPAN></TD>
<TD style="PADDING-LEFT: 5px; FONT-SIZE: 8pt; VERTICAL-ALIGN: top; COLOR: black; FONT-FAMILY: 'Lucida Grande'; TEXT-ALIGN: left"><SPAN title='"PROJ.4 and general Projections Discussions" <proj@lists.maptools.org>'>"PROJ.4 and general Projections Discussions" &lt;proj@lists.maptools.org&gt;</SPAN></TD></TR></TBODY></TABLE></DIV>
<DIV id=felix-mail-content-block style="WIDTH: 100%; COLOR: black; BACKGROUND-COLOR: white">
<DIV style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: monospace; BACKGROUND-COLOR: white">Daan,<BR>What I have now seems to be working, but I would like to see the more<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>complicated formula.<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>I will use it if I can get it into the code I have.<BR>Thank you.<BR>Shannon<BR><BR>strebe@aol.com wrote:<BR>&gt;<BR>&gt; Glad this works for you. Don't hesitate to ask for the more<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; complicated formula if you need greater accuracy &#8212; the calculation you<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; have will be off by a percent or two because it assumes a spherical earth.<BR>&gt;<BR>&gt; Regards,<BR>&gt; -- daan Strebe<BR>&gt;<BR>&gt;<BR>&gt; -----Original Message-----<BR>&gt; From: Shannon Scott &lt;sscott@locationinc.com&gt;<BR>&gt; To: PROJ.4 and general Projections Discussions &lt;proj@lists.maptools.org&gt;<BR>&gt; Sent: Thu, 10 Jul 2008 4:02 am<BR>&gt; Subject: Re: [Proj] Re: Distance measured in Mercator projection<BR>&gt;<BR>&gt; Thank you all for your comments.<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; 1m / cos (phi) was the formula I was looking for.<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; We have an application that maps data based on a search radius ( ie 5<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; miles around Chicago ).<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; The maps show the search radius. We had been using UTM for the maps,<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; so I was able to plot the search radius with this piece of code:<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &lt;snip&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; // convert miles to meters<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; bufdist = (miles * 1609.344);<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; // create circle<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; for (double i=0;i&lt;360;i+=5) {<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; deltax = (Math.cos(i) * bufdist);<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; deltay = (Math.sin(i) * bufdist);<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; pntx = (centerPntx + deltax);<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; pnty = (centerPnty + deltay); &lt; br&gt; // plot point<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; }<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &lt;/snip&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; The maps have been converted to work as a google map overlay, so we<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; need to use the Mercator projection.<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; I have modified the way the search radius is calculated:<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &lt;snip&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; // convert miles to meters<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; bufdist = (miles * (Math.abs(1609.344 * (1/Math.cos(latrad)))));<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &lt;/snip&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; and everything looks good.<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; Thanks again.<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; Shannon<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; Ed McNierney wrote:<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; Shannon -<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; First, let me apologize for trying to respond (twice) when I was too<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; rushed to do so properly.<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; Since you say you&#8217;re not very familiar with map projections, it<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; might &gt; be helpful for you to describe a little bit more about what<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; you&#8217;re &gt; trying to do. Daan&#8217;s and Chris&#8217;s comments are both correct<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; but could &gt; be confusing to a novice; the scale factor at a single<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; point is the &gt; same in all directions for a Mercator projection, but<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; strictly &gt; speaking only at that point. If you have another point in a<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; different &gt; place, the scale factor at that point will be different<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; from the first &gt; unless they&#8217;re at exactly the same latitude. So if<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; you&#8217;re measuring &gt; the distance between two points at a non-trivial<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; distance apart, a &gt; 500-mile line will, for example, change length on<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; a Mercator map &gt; depending on=2 0its angle with the Equator. What I<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; was trying to say in &gt; my first, poorly-worded reply, is that the set<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; of points that are all &gt; 500 miles from a center point on a Mercator<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; map will NOT form a circle &gt; on that map.<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; If your question really is, &#8220;How can I measure the great circle &gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; distance between two points given their Mercator coordinates&#8221; then &gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; that&#8217;s rather tricky. And it will depend on how far apart those two &gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; points are, and how accurate you need your answer to be.<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; You will find incredibly talented professional expertise on this<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; list, &gt; but it&#8217;s hard for people to answer the question you didn&#8217;t<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; ask. If you &gt; can describe &#8211; in general terms, rather than specific<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; ones &#8211; what &gt; you&#8217;re trying to do and what questions you&#8217;re trying to<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; answer, that &gt; will make it easier. If there are constraints on your<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; solution (e.g. &gt; &#8220;I have to use Mercator so please don&#8217;t suggest an<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; alternative &gt; projection that would make the math easier&#8221;) let us know<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; as well. Thanks.<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; - Ed<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; Ed McNierney<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; 205 Indian Hill Road<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; Groton, MA 01450<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; ed@mcnierney.com &lt;mailto:ed@mcnierney.com&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; +1 (978) 761-0049<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; ------------------------------------------------------------------------<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt;=2 0_______________________________________________<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; Proj mailing list<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; Proj@lists.maptools.org &lt;mailto:Proj@lists.maptools.org&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &gt; http://lists.maptools.org/mailman/listinfo/proj<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; _______________________________________________<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; Proj mailing list<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; Proj@lists.maptools.org &lt;mailto:Proj@lists.maptools.org&gt;<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; http://lists.maptools.org/mailman/listinfo/proj<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; ------------------------------------------------------------------------<BR>&gt; The Famous, the Infamous, the Lame - in your browser. Get the TMZ<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; Toolbar Now<SPAN class=Apple-converted-space>&nbsp;</SPAN><BR>&gt; &lt;http://toolbar.aol.com/tmz/download.html?NCID=aolcmp00050000000014&gt;!<BR>&gt; ------------------------------------------------------------------------<BR>&gt;<BR>&gt; _______________________________________________<BR>&gt; Proj mailing list<BR>&gt; Proj@lists.maptools.org<BR>&gt; http://lists.maptools.org/mailman/listinfo/proj<BR><BR>_______________________________________________<BR>Proj mailing list<BR>Proj@lists.maptools.org<BR>http://lists.maptools.org/mailman/listinfo/proj<BR><BR></DIV></DIV></DIV></SPAN></BLOCKQUOTE><BR>
<DIV><BR></DIV>
<DIV class=aol_ad_footer id=u6B8A16ED65BF45F3A880FE1C6EFAB4F1><FONT style="FONT: 10pt ARIAL, SAN-SERIF; COLOR: black">
<HR style="MARGIN-TOP: 10px">
The Famous, the Infamous, the Lame - in your browser. <A title=http://toolbar.aol.com/tmz/download.html?NCID=aolcmp00050000000014 href="http://toolbar.aol.com/tmz/download.html?NCID=aolcmp00050000000014" target=_blank>Get the TMZ Toolbar Now</A>!</FONT></DIV></DIV></BODY></HTML>