[Proj] Re: Distance measured in Mercator projection

Clifford J Mugnier cjmce at lsu.edu
Wed Jul 16 11:44:02 PDT 2008


I'd suggest something other than zero for the eccentricity of the WGS84 ellipsoid.  Say, e squared being 0.00669437999013, more or less ...
 
Cliff Mugnier
LOUISIANA STATE UNIVERSITY

________________________________

From: proj-bounces at lists.maptools.org on behalf of strebe
Sent: Wed 16-Jul-08 13:39
To: PROJ.4 and general Projections Discussions
Subject: [Proj] Re: Distance measured in Mercator projection



Shannon,

The scale factor in any direction at a given point on the ellipsoidal equatorial Mercator is:

h = ?(1 - e^2 x sin^2 (phi)) / cos (phi)

where ? 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.


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.

Don't hesitate to ask for clarification if you need it. Good luck.

Regards,
-- daan Strebe


On Jul 16, 2008, at 3:53:25 AM, "Shannon Scott" <sscott at locationinc.com> wrote:


	
From:	 "Shannon Scott" <sscott at locationinc.com>	
Subject:	 [Proj] Re: Distance measured in Mercator projection	
Date:	 July 16, 2008 3:53:25 AM PDT	
To:	 "PROJ.4 and general Projections Discussions" <proj at lists.maptools.org>	
	Daan,
	What I have now seems to be working, but I would like to see the more 
	complicated formula. 
	I will use it if I can get it into the code I have.
	Thank you.
	Shannon
	
	strebe at aol.com wrote:
	>
	> Glad this works for you. Don't hesitate to ask for the more 
	> complicated formula if you need greater accuracy - the calculation you 
	> have will be off by a percent or two because it assumes a spherical earth.
	>
	> Regards,
	> -- daan Strebe
	>
	>
	> -----Original Message-----
	> From: Shannon Scott <sscott at locationinc.com>
	> To: PROJ.4 and general Projections Discussions <proj at lists.maptools.org>
	> Sent: Thu, 10 Jul 2008 4:02 am
	> Subject: Re: [Proj] Re: Distance measured in Mercator projection
	>
	> Thank you all for your comments. 
	> 1m / cos (phi) was the formula I was looking for. 
	> 
	> We have an application that maps data based on a search radius ( ie 5 
	> miles around Chicago ). 
	> The maps show the search radius. We had been using UTM for the maps, 
	> so I was able to plot the search radius with this piece of code: 
	> <snip> 
	> // convert miles to meters 
	> bufdist = (miles * 1609.344); 
	> 
	> // create circle 
	> for (double i=0;i<360;i+=5) { 
	> deltax = (Math.cos(i) * bufdist); 
	> deltay = (Math.sin(i) * bufdist); 
	> pntx = (centerPntx + deltax); 
	> pnty = (centerPnty + deltay); < br> // plot point 
	> } 
	> </snip> 
	> 
	> The maps have been converted to work as a google map overlay, so we 
	> need to use the Mercator projection. 
	> I have modified the way the search radius is calculated: 
	> <snip> 
	> // convert miles to meters 
	> bufdist = (miles * (Math.abs(1609.344 * (1/Math.cos(latrad))))); 
	> </snip> 
	> 
	> and everything looks good. 
	> Thanks again. 
	> Shannon 
	> 
	> Ed McNierney wrote: 
	> > Shannon - 
	> > 
	> > First, let me apologize for trying to respond (twice) when I was too 
	> > rushed to do so properly. 
	> > 
	> > Since you say you're not very familiar with map projections, it 
	> might > be helpful for you to describe a little bit more about what 
	> you're > trying to do. Daan's and Chris's comments are both correct 
	> but could > be confusing to a novice; the scale factor at a single 
	> point is the > same in all directions for a Mercator projection, but 
	> strictly > speaking only at that point. If you have another point in a 
	> different > place, the scale factor at that point will be different 
	> from the first > unless they're at exactly the same latitude. So if 
	> you're measuring > the distance between two points at a non-trivial 
	> distance apart, a > 500-mile line will, for example, change length on 
	> a Mercator map > depending on=2 0its angle with the Equator. What I 
	> was trying to say in > my first, poorly-worded reply, is that the set 
	> of points that are all > 500 miles from a center point on a Mercator 
	> map will NOT form a circle > on that map. 
	> > 
	> > If your question really is, "How can I measure the great circle > 
	> distance between two points given their Mercator coordinates" then > 
	> that's rather tricky. And it will depend on how far apart those two > 
	> points are, and how accurate you need your answer to be. 
	> > 
	> > You will find incredibly talented professional expertise on this 
	> list, > but it's hard for people to answer the question you didn't 
	> ask. If you > can describe - in general terms, rather than specific 
	> ones - what > you're trying to do and what questions you're trying to 
	> answer, that > will make it easier. If there are constraints on your 
	> solution (e.g. > "I have to use Mercator so please don't suggest an 
	> alternative > projection that would make the math easier") let us know 
	> as well. Thanks. 
	> > 
	> > - Ed 
	> > 
	> > Ed McNierney 
	> > 205 Indian Hill Road 
	> > Groton, MA 01450 
	> > ed at mcnierney.com <mailto:ed at mcnierney.com> 
	> > +1 (978) 761-0049 
	> > 
	> ------------------------------------------------------------------------ 
	> > 
	> >=2 0_______________________________________________ 
	> > Proj mailing list 
	> > Proj at lists.maptools.org <mailto:Proj at lists.maptools.org> 
	> > http://lists.maptools.org/mailman/listinfo/proj 
	> 
	> _______________________________________________ 
	> Proj mailing list 
	> Proj at lists.maptools.org <mailto:Proj at lists.maptools.org> 
	> http://lists.maptools.org/mailman/listinfo/proj 
	> ------------------------------------------------------------------------
	> The Famous, the Infamous, the Lame - in your browser. Get the TMZ 
	> Toolbar Now 
	> <http://toolbar.aol.com/tmz/download.html?NCID=aolcmp00050000000014>!
	> ------------------------------------------------------------------------
	>
	> _______________________________________________
	> Proj mailing list
	> Proj at lists.maptools.org
	> http://lists.maptools.org/mailman/listinfo/proj
	
	_______________________________________________
	Proj mailing list
	Proj at lists.maptools.org
	http://lists.maptools.org/mailman/listinfo/proj
	
	



________________________________

The Famous, the Infamous, the Lame - in your browser. Get the TMZ Toolbar Now <http://toolbar.aol.com/tmz/download.html?NCID=aolcmp00050000000014> !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20080716/93f0c49f/attachment.html>


More information about the Proj mailing list