Whole file
geographiclib/geographiclib-python
The author described this change as “* Create and install geographiclib.js and geographiclib.min.js. * Complete the unit tests for Java and JavaScript packages. * Introduce GeodesicMask.STANDARD into Java package. * Fix bug in normalizat”. It counts as a record because the check below fails on the code as it stood at c07596c0c and passes on 28b2419d9, with nothing else changed between the two runs.
Fix saved2015-09-17
Sharing licenceMIT · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a save note
* Create and install geographiclib.js and geographiclib.min.js. * Complete the unit tests for Java and JavaScript packages. * Introduce GeodesicMask.STANDARD into Java package. * Fix bug in normalizat
The change
| 119 | 119 | tempsum.Add(S12) | |
| 120 | 120 | crossings = self._crossings + PolygonArea.transit(self._lon1, self._lon0) | |
| 121 | 121 | if crossings & 1: | |
| 122 | - | tempsum.Add( (1 if tempsum < 0 else -1) * self._area0/2 ) | |
| 122 | + | tempsum.Add( (1 if tempsum.Sum() < 0 else -1) * self._area0/2 ) | |
| 123 | 123 | # area is with the clockwise sense. If !reverse convert to | |
| 124 | 124 | # counter-clockwise convention. | |
| 125 | 125 | if not reverse: tempsum.Negate() |
The check that tells the two apart
fail→pass·python/test/test_geodesic.py::PlanimeterTest::test_Planimeter0
Check file python/test/test_geodesic.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before itc07596c0c058bd69d367ab601346d3aab8316b58
Broken version dated2015-09-16
Modulepython.geographiclib.polygonarea
Units changedPolygonArea
Fingerprint7d9476e3126c39ee
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in geographiclib/geographiclib-python
- 2025-08-21Fix bug in geodesic inverse solution for very prolate ellipsoids.
- 2022-03-08Add planimeter reverse arctic test to catch transit bug and fix.
- 2021-07-28Fix bug where a geodesic with lat1 = 0 and lat2 = nan was treated as equatorial (bug found 2021-07-26).
- 2019-09-10Implement fix to AddEdge/transitdirect bug in Java, JS, + Python libraries + add test case. (Already done for C++ + C; not necessary for MATLAB + Fortran.)
- 2015-09-23* Fix geodesic inversion so that nan + point on equator or pole returns all nans. Update tests to check this. * Fix bug in gedistance.m in handling equatorial lines.