[Proj] invgeod results for small distances

Charles Karney charles.karney at sri.com
Thu Feb 23 04:57:43 PST 2012


I recommend using the Geod program provided with GeographicLib

   http://geographiclib.sf.net

Thus:

Geod -i -b -d -p 6 <<EOF
0 0 0 .000001
0 0 0 .0000001
-30 0 29.9 179.9
EOF
=>
090d00'00.0000000" 270d00'00.0000000" 0.111319
090d00'00.0000000" 270d00'00.0000000" 0.011132
170d59'40.4518759" 188d59'46.8569451" 19992090.302327

The last example is another case where invgeod gets the wrong answer.
(Disclaimer: I'm the author of GeographicLib.)

   --Charles

On 02/22/12 23:59, Hermann Peifer wrote:
> # This looks reasonable for a difference in the 6th decimal
> [peifer at whitefish:~]>  echo 0 0 0 .000001 | invgeod +ellps=WGS84
> 90d     -90d    0.134
>
>
> # This should then be 0.013 for the 7th decimal, but it isn't:-(
> [peifer at whitefish:~]>  echo 0 0 0 .0000001 | invgeod +ellps=WGS84
> -2147483648d-2147483648'-nan"   -2147483648d-2147483648'-nan"   -nan
>
>
> # This isn't true in real life, but at least better than Not-A-Number
> [peifer at whitefish:~]>  echo 0 0 0 .0000001 | invgeod +ellps=sphere
> 90d     -90d    0.000



More information about the Proj mailing list