On 07/21/11 20:39, Brian Beck wrote:
> My only comment from a glance: I would catch ImportError on
> GeographicLib, log it (warn or info level), and continue to use
> VincentyDistance by default if the library isn't installed.
Checking for GeographicLib is prudent, of course. A question for the
python experts: where should GeographicLib.py get installed? At
present, I put it in
/usr/local/share/GeographicLib/python/GeographicLib.py
But perhaps
/usr/lib/python/site-packages/GeographicLib.py
is a more canonical location.
An alternative would be to distribute GeographicLib.py as part of geopy.
This would give you a stable set of software to distribute and to test
against (at the cost of periodically keeping synchronized with the base
distribution of GeographicLib).
A couple of additional points:
(1) Change the test for failure for for antipodal points to a test for
success! (There *is* a shortest path in this case -- over the pole --
and it is returned.)
(2) This is my first serious foray into python. I would welcome any
advice for how best to structure a package like GeographicLib. I had
wanted to separate the C++ classes into separate files such as
GeographicLib/Geodesic.py
But that seemed to introduce the need to deal with repeating naming,
e.g.,
GeographicLib.Geodesic.Geodesic.WGS84
What's the "right" way of handling this?
--Charles