<HTML dir=ltr><HEAD><TITLE>Re: [Proj] Any access to geodetic[sic] functions ??</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16735" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText33219 dir=ltr>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=2>In regard to terminology,</FONT></DIV>
<DIV dir=ltr><FONT size=2></FONT> </DIV>
<DIV dir=ltr><FONT size=2>The shortest distance on the surface of a solid is generally termed a geodesic, be it an ellipsoid of revolution, aposphere, <EM>etc. On a sphere, the geodesic is termed a Great Circle.</EM></FONT></DIV>
<DIV dir=ltr><FONT size=2></FONT> </DIV>
<DIV dir=ltr><FONT size=2>HOWEVER, when computing the distance between two points using a projected coordinate system, that is a conformal projection such as Transverse Mercator, Oblique Mercator, Normal Mercator, Stereographic, or Lambert Conformal Conic - that then is a GRID distance which can be converted to an equivalent GEODETIC distance using the function for "Scale Factor at a Point." The conversion is then termed "Grid Distance to Geodetic Distance," even though it will not be as exactly correct as a true ellipsoidal geodesic. Closer to the truth with a TM than with a Lambert or other conformal projection, but still not exactly "on."</FONT></DIV>
<DIV dir=ltr><FONT size=2></FONT> </DIV>
<DIV dir=ltr><FONT size=2>So, it can be termed "geodetic distance" or a "geodesic distance," depending on just how you got there ...</FONT></DIV>
<DIV dir=ltr><FONT size=2></FONT> </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 Gerald I. Evenden<BR><B>Sent:</B> Wed 12-Nov-08 10:44<BR><B>To:</B> PROJ.4 and general Projections Discussions<BR><B>Subject:</B> Re: [Proj] Any access to geodetic[sic] functions ??<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>I've tried to stay out of this thread, but ... .<BR><BR>Unfortunately it keeps coming up.<BR><BR>BTW: when referring to distance calculations it is "geodesic" not geodetic.<BR><BR>On Wednesday 12 November 2008 10:50:37 am Frank Warmerdam wrote:<BR>> Benoît Andrieu wrote:<BR>> > Thank you so much for your answer, Frank.<BR>> ><BR>> > So, this leads to some questions (that are somehow related...) :<BR>> > - how are computed distance calculation between two points by softwares<BR>> > like Postgis for example ?<BR>><BR>> Benoît,<BR>><BR>> I'm not sure.<BR>><BR>> > - is the best way to compute distance calculation to use UTM systems ? I<BR>> > have to compute distances that could be very long (hundreds of<BR>> > kilometers), strong accuracy is not required but I don't want to have<BR>> > more than 1% accuracy error.<BR>><BR>> Other have addressed this, but generally this is not a very good approach<BR>> except for fairly local areas.<BR><BR>Very true and even if short distances are computed this way then one needs to<BR>refer to the local scale factor and appropriately correct the pythagorean<BR>computation. If you are using lproj to determine the UTM (or tmerc)<BR>coordinates, turn the -V switch on to get the scale factor. Taking the mean<BR>value for the two points should be adequate.<BR><BR>If you want to be lazy *and* do it the right way then for a very good<BR>procedure to calculate inter point distances see:<BR><BR><A href="http://www.ngs.noaa.gov/PC_PROD/Inv_Fwd/">http://www.ngs.noaa.gov/PC_PROD/Inv_Fwd/</A><BR><BR>and algorithm details published in:<BR><BR>www.ngs.noaa.gov/PUBS_LIB/inverse.pdf<BR><BR>Note: the first reference will point you to an online procedure to compute<BR>geodesics.<BR><BR>We need to put the above in a standard location so that we can paste it into a<BR>response any query to this group related to the geodesic.<BR><BR>> > - in what way are those functions distinct from the proj4 ? Am I wrong<BR>> > to use them ? Are there others functions in proj4 that would allow me to<BR>> > do the same things that I can do with those functions (distance<BR>> > calculation between two points and point positionning given initial<BR>> > point, distance and azimuth) ?<BR>><BR>> The functions are not a core part of PROJ.4 as I understand it. They<BR>> aren't normally in the library - just linked with the geod command line<BR>> program.<BR><BR>At one time a program called 'geod' was distributed with my versions of proj4<BR>but it was based upon a poorer algorithm has has been dropped. I believe it<BR>my still be floating around in some distributions (and is probably good<BR>enough for most applications).<BR><BR>I made a C version of the Vincente procedures but have not distributed it.<BR><BR>> I'm not opposed to treating them as a core capability but I do think some<BR>> consideration should be given to the API before this would occur. Ideally<BR>> this would be something someone else than me might take on (possibly with<BR>> some advice from me).<BR>><BR>> Best regards,<BR><BR>--<BR>The whole religious complexion of the modern world is due<BR>to the absence from Jerusalem of a lunatic asylum.<BR>-- Havelock Ellis (1859-1939) British psychologist<BR><BR>_______________________________________________<BR>Proj mailing list<BR>Proj@lists.maptools.org<BR><A href="http://lists.maptools.org/mailman/listinfo/proj">http://lists.maptools.org/mailman/listinfo/proj</A><BR></FONT></P></DIV></BODY></HTML>