geographiclib¶
Author: Charles F. F. Karney (charles@karney.com)
Version: 1.49
The documentation for other versions is available at
https://geographiclib.sourceforge.io/m.nn/python/
for versions numbers
m.nn
≥ 1.46.
Licensed under the MIT/X11 License; see LICENSE.txt.
Introduction¶
This is a python implementation of the geodesic routines in GeographicLib.
Although it is maintained in conjunction with the larger C++ library, this python package can be used independently.
Installation¶
The full Geographic package can be downloaded from sourceforge. However the python implementation is available as a stand-alone package. To install this, run
pip install geographiclib
Alternatively downloaded the package directly from Python Package Index and install it with
tar xpfz geographiclib-1.49.tar.gz
cd geographiclib-1.49
python setup.py install
It’s a good idea to run the unit tests to verify that the installation worked OK by running
python -m unittest geographiclib.test.test_geodesic
GeographicLib in various languages¶
- C++ (complete library): documentation, download
- C (geodesic routines): documentation, also included with recent versions of proj.4
- Fortran (geodesic routines): documentation
- Java (geodesic routines): Maven Central package, documentation
- JavaScript (geodesic routines): npm package, documentation
- Python (geodesic routines): PyPI package, documentation
- Matlab/Octave (geodesic and some other routines): Matlab Central package, documentation
- C# (.NET wrapper for complete C++ library): documentation
Change log¶
- Version 1.49 (released 2017-10-05)
- Fix code formatting; add tests.
- Version 1.48 (released 2017-04-09)
- Change default range for longitude and azimuth to (−180°, 180°] (instead of [−180°, 180°)).
- Version 1.47 (released 2017-02-15)
- Fix the packaging, incorporating the patches in version 1.46.3.
- Improve accuracy of area calculation (fixing a flaw introduced in version 1.46)
- Version 1.46 (released 2016-02-15)
- Add Geodesic.DirectLine, Geodesic.ArcDirectLine, Geodesic.InverseLine, GeodesicLine.SetDistance, GeodesicLine.SetArc, GeodesicLine.s13, GeodesicLine.a13.
- More accurate inverse solution when longitude difference is close to 180°.
- Remove unnecessary functions, CheckPosition, CheckAzimuth, CheckDistance.