[Git][debian-gis-team/python-geographiclib][master] 7 commits: New upstream version 2.1
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sun Aug 24 08:12:38 BST 2025
Antonio Valentino pushed to branch master at Debian GIS Project / python-geographiclib
Commits:
fe869d38 by Antonio Valentino at 2025-08-24T06:54:23+00:00
New upstream version 2.1
- - - - -
67f58784 by Antonio Valentino at 2025-08-24T06:54:23+00:00
Update upstream source from tag 'upstream/2.1'
Update to upstream version '2.1'
with Debian dir 7d22a15a69203616d55a0445c1ea68e39fc49cca
- - - - -
3dbcc221 by Antonio Valentino at 2025-08-24T06:55:06+00:00
New upstream release
- - - - -
550ffa4c by Antonio Valentino at 2025-08-24T07:02:59+00:00
Update dates in d/copyright
- - - - -
292135f3 by Antonio Valentino at 2025-08-24T07:08:06+00:00
Add dependency on pybuild-plugin-pyproject
- - - - -
8ceb28ff by Antonio Valentino at 2025-08-24T07:09:30+00:00
Set upstream metadata fields: Documentation.
Changes-By: lintian-brush
- - - - -
1f4687f9 by Antonio Valentino at 2025-08-24T07:09:59+00:00
Set distribution to unstable
- - - - -
21 changed files:
- LICENSE
- − MANIFEST.in
- PKG-INFO
- debian/changelog
- debian/control
- debian/copyright
- debian/upstream/metadata
- geographiclib.egg-info/PKG-INFO
- geographiclib.egg-info/SOURCES.txt
- geographiclib/__init__.py
- geographiclib/accumulator.py
- geographiclib/constants.py
- geographiclib/geodesic.py
- geographiclib/geodesiccapability.py
- geographiclib/geodesicline.py
- geographiclib/geomath.py
- geographiclib/polygonarea.py
- geographiclib/test/test_geodesic.py
- + pyproject.toml
- setup.cfg
- − setup.py
Changes:
=====================================
LICENSE
=====================================
@@ -1,6 +1,6 @@
The MIT License (MIT).
-Copyright (c) 2012-2022, Charles Karney
+Copyright (c) 2012-2025, Charles Karney
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
=====================================
MANIFEST.in deleted
=====================================
@@ -1,2 +0,0 @@
-include README.md
-include LICENSE
=====================================
PKG-INFO
=====================================
@@ -1,17 +1,18 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
Name: geographiclib
-Version: 2.0
+Version: 2.1
Summary: The geodesic routines from GeographicLib
-Home-page: https://geographiclib.sourceforge.io/Python/2.0
+Home-page: https://geographiclib.sourceforge.io/Python/
Author: Charles Karney
-Author-email: charles at karney.com
+Author-email: karney at alum.mit.edu
License: MIT
-Keywords: gis geographical earth distance geodesic
-Platform: UNKNOWN
+Project-URL: Source Code, https://github.com/geographiclib/geographiclib-python
+Project-URL: Documentation, https://geographiclib.sourceforge.io/Python/doc/
+Project-URL: Download, https://pypi.org/project/geographiclib/
+Keywords: gis,geographical,earth,distance,geodesic
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
-Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Scientific/Engineering :: GIS
@@ -19,6 +20,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
+Dynamic: license-file
# Python implementation of the geodesic routines in GeographicLib
@@ -37,5 +39,3 @@ The algorithms are documented in
The documentation for this package is in
https://geographiclib.sourceforge.io/Python/doc
-
-
=====================================
debian/changelog
=====================================
@@ -1,9 +1,16 @@
-python-geographiclib (2.0-4) UNRELEASED; urgency=medium
+python-geographiclib (2.1-1) unstable; urgency=medium
- * Team upload.
+ [ Bas Couwenberg ]
* Bump Standards-Version to 4.7.2, no changes.
- -- Bas Couwenberg <sebastic at debian.org> Sun, 28 Jul 2024 19:57:54 +0200
+ [ Antonio Valentino ]
+ * New upstream release.
+ * Update dates in d/copyright.
+ * debian/control:
+ - Add dependency on pybuild-plugin-pyproject.
+ * Set upstream metadata fields: Documentation.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sun, 24 Aug 2025 07:09:40 +0000
python-geographiclib (2.0-3) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -8,6 +8,7 @@ Testsuite: autopkgtest-pkg-pybuild
Build-Depends: debhelper-compat (= 13),
dh-python,
dh-sequence-python3,
+ pybuild-plugin-pyproject,
python3-all,
python3-pytest <!nocheck>,
python3-setuptools
=====================================
debian/copyright
=====================================
@@ -4,11 +4,11 @@ Upstream-Contact: Charles Karney <charles at karney.com>
Source: https://github.com/geographiclib/geographiclib-python
Files: *
-Copyright: 2011-2022, Charles Karney
+Copyright: 2011-2025, Charles Karney <karney at alum.mit.edu>
License: Expat
Files: debian/*
-Copyright: 2022, Antonio Valentino <antonio.valentino at tiscali.it>
+Copyright: 2022-2025, Antonio Valentino <antonio.valentino at tiscali.it>
License: Expat
License: Expat
=====================================
debian/upstream/metadata
=====================================
@@ -1,5 +1,6 @@
---
Bug-Database: https://github.com/geographiclib/geographiclib-python/issues
Bug-Submit: https://github.com/geographiclib/geographiclib-python/issues/new
+Documentation: https://geographiclib.sourceforge.io/Python/doc/
Repository: https://github.com/geographiclib/geographiclib-python.git
Repository-Browse: https://github.com/geographiclib/geographiclib-python
=====================================
geographiclib.egg-info/PKG-INFO
=====================================
@@ -1,17 +1,18 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.4
Name: geographiclib
-Version: 2.0
+Version: 2.1
Summary: The geodesic routines from GeographicLib
-Home-page: https://geographiclib.sourceforge.io/Python/2.0
+Home-page: https://geographiclib.sourceforge.io/Python/
Author: Charles Karney
-Author-email: charles at karney.com
+Author-email: karney at alum.mit.edu
License: MIT
-Keywords: gis geographical earth distance geodesic
-Platform: UNKNOWN
+Project-URL: Source Code, https://github.com/geographiclib/geographiclib-python
+Project-URL: Documentation, https://geographiclib.sourceforge.io/Python/doc/
+Project-URL: Download, https://pypi.org/project/geographiclib/
+Keywords: gis,geographical,earth,distance,geodesic
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
-Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Scientific/Engineering :: GIS
@@ -19,6 +20,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
+Dynamic: license-file
# Python implementation of the geodesic routines in GeographicLib
@@ -37,5 +39,3 @@ The algorithms are documented in
The documentation for this package is in
https://geographiclib.sourceforge.io/Python/doc
-
-
=====================================
geographiclib.egg-info/SOURCES.txt
=====================================
@@ -1,7 +1,7 @@
LICENSE
-MANIFEST.in
README.md
-setup.py
+pyproject.toml
+setup.cfg
geographiclib/__init__.py
geographiclib/accumulator.py
geographiclib/constants.py
=====================================
geographiclib/__init__.py
=====================================
@@ -1,12 +1,12 @@
"""geographiclib: geodesic routines from GeographicLib"""
__version_info__ = (2,
- 0,
+ 1,
0)
"""GeographicLib version as a tuple"""
-__version__ = "2.0"
+__version__ = "2.1"
"""GeographicLib version as a string"""
-__release_date__ = "2022-04-23"
+__release_date__ = "2025-08-21"
"""GeographicLib release date"""
=====================================
geographiclib/accumulator.py
=====================================
@@ -5,9 +5,9 @@
# from to python. See the documentation for the C++ class for more information
# at
#
-# https://geographiclib.sourceforge.io/html/annotated.html
+# https://geographiclib.sourceforge.io/C++/doc/annotated.html
#
-# Copyright (c) Charles Karney (2011-2019) <charles at karney.com> and
+# Copyright (c) Charles Karney (2011-2022) <karney at alum.mit.edu> and
# licensed under the MIT/X11 License. For more information, see
# https://geographiclib.sourceforge.io/
######################################################################
=====================================
geographiclib/constants.py
=====================================
@@ -4,9 +4,9 @@
# This is a translation of the GeographicLib::Constants class to python. See
# the documentation for the C++ class for more information at
#
-# https://geographiclib.sourceforge.io/html/annotated.html
+# https://geographiclib.sourceforge.io/C++/doc/annotated.html
#
-# Copyright (c) Charles Karney (2011-2016) <charles at karney.com> and
+# Copyright (c) Charles Karney (2011-2022) <karney at alum.mit.edu> and
# licensed under the MIT/X11 License. For more information, see
# https://geographiclib.sourceforge.io/
######################################################################
=====================================
geographiclib/geodesic.py
=====================================
@@ -63,7 +63,7 @@ The public attributes for this class are
# This is a rather literal translation of the GeographicLib::Geodesic class to
# python. See the documentation for the C++ class for more information at
#
-# https://geographiclib.sourceforge.io/html/annotated.html
+# https://geographiclib.sourceforge.io/C++/doc/annotated.html
#
# The algorithms are derived in
#
@@ -72,7 +72,7 @@ The public attributes for this class are
# https://doi.org/10.1007/s00190-012-0578-z
# Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
#
-# Copyright (c) Charles Karney (2011-2022) <charles at karney.com> and licensed
+# Copyright (c) Charles Karney (2011-2022) <karney at alum.mit.edu> and licensed
# under the MIT/X11 License. For more information, see
# https://geographiclib.sourceforge.io/
######################################################################
@@ -86,6 +86,7 @@ from geographiclib.geodesiccapability import GeodesicCapability
class Geodesic:
"""Solve geodesic problems"""
+ WGS84: "Geodesic"
GEOGRAPHICLIB_GEODESIC_ORDER = 6
nA1_ = GEOGRAPHICLIB_GEODESIC_ORDER
nC1_ = GEOGRAPHICLIB_GEODESIC_ORDER
@@ -105,7 +106,7 @@ class Geodesic:
tol0_ = sys.float_info.epsilon
tol1_ = 200 * tol0_
tol2_ = math.sqrt(tol0_)
- tolb_ = tol0_ * tol2_
+ tolb_ = tol0_
xthresh_ = 1000 * tol2_
CAP_NONE = GeodesicCapability.CAP_NONE
@@ -440,7 +441,7 @@ class Geodesic:
# outmask & REDUCEDLENGTH: set m12b & m0
# outmask & GEODESICSCALE: set M12 & M21
- s12b = m12b = m0 = M12 = M21 = math.nan
+ s12b = m12b = m0 = m0x = J12 = M12 = M21 = math.nan
if outmask & (Geodesic.DISTANCE | Geodesic.REDUCEDLENGTH |
Geodesic.GEODESICSCALE):
A1 = Geodesic._A1m1f(eps)
@@ -803,7 +804,7 @@ class Geodesic:
#
# In fact, we will have sig12 > pi/2 for meridional geodesic which is
# not a shortest path.
- if sig12 < 1 or m12x >= 0:
+ if sig12 < Geodesic.tol2_ or m12x >= 0:
if (sig12 < 3 * Geodesic.tiny_ or
# Prevent negative s12 or m12 for short lines
(sig12 < Geodesic.tol0_ and (s12x < 0 or m12x < 0))):
@@ -869,7 +870,7 @@ class Geodesic:
salp1a = Geodesic.tiny_; calp1a = 1.0
salp1b = Geodesic.tiny_; calp1b = -1.0
- while numit < Geodesic.maxit2_:
+ while True:
# the WGS84 test set: mean = 1.47, sd = 1.25, max = 16
# WGS84 and random input: mean = 2.85, sd = 0.60
(v, salp2, calp2, sig12, ssig1, csig1, ssig2, csig2,
@@ -878,7 +879,8 @@ class Geodesic:
salp1, calp1, slam12, clam12, numit < Geodesic.maxit1_,
C1a, C2a, C3a)
# Reversed test to allow escape with NaNs
- if tripb or not (abs(v) >= (8 if tripn else 1) * Geodesic.tol0_):
+ if (tripb or not (abs(v) >= (8 if tripn else 1) * Geodesic.tol0_) or
+ numit == Geodesic.maxit2_):
break
# Update bracketing values
if v > 0 and (numit > Geodesic.maxit1_ or
@@ -891,17 +893,18 @@ class Geodesic:
numit += 1
if numit < Geodesic.maxit1_ and dv > 0:
dalp1 = -v/dv
- sdalp1 = math.sin(dalp1); cdalp1 = math.cos(dalp1)
- nsalp1 = salp1 * cdalp1 + calp1 * sdalp1
- if nsalp1 > 0 and abs(dalp1) < math.pi:
- calp1 = calp1 * cdalp1 - salp1 * sdalp1
- salp1 = nsalp1
- salp1, calp1 = Math.norm(salp1, calp1)
- # In some regimes we don't get quadratic convergence because
- # slope -> 0. So use convergence conditions based on epsilon
- # instead of sqrt(epsilon).
- tripn = abs(v) <= 16 * Geodesic.tol0_
- continue
+ if abs(dalp1) < math.pi:
+ sdalp1 = math.sin(dalp1); cdalp1 = math.cos(dalp1)
+ nsalp1 = salp1 * cdalp1 + calp1 * sdalp1
+ if nsalp1 > 0:
+ calp1 = calp1 * cdalp1 - salp1 * sdalp1
+ salp1 = nsalp1
+ salp1, calp1 = Math.norm(salp1, calp1)
+ # In some regimes we don't get quadratic convergence because
+ # slope -> 0. So use convergence conditions based on epsilon
+ # instead of sqrt(epsilon).
+ tripn = abs(v) <= 16 * Geodesic.tol0_
+ continue
# Either dv was not positive or updated value was outside
# legal range. Use the midpoint of the bracket as the next
# estimate. This mechanism is not needed for the WGS84
=====================================
geographiclib/geodesiccapability.py
=====================================
@@ -5,9 +5,9 @@
# geodesicline.py. See the documentation for the GeographicLib::Geodesic class
# for more information at
#
-# https://geographiclib.sourceforge.io/html/annotated.html
+# https://geographiclib.sourceforge.io/C++/doc/annotated.html
#
-# Copyright (c) Charles Karney (2011-2014) <charles at karney.com> and licensed
+# Copyright (c) Charles Karney (2011-2022) <karney at alum.mit.edu> and licensed
# under the MIT/X11 License. For more information, see
# https://geographiclib.sourceforge.io/
######################################################################
=====================================
geographiclib/geodesicline.py
=====================================
@@ -42,7 +42,7 @@ The public attributes for this class are
# This is a rather literal translation of the GeographicLib::GeodesicLine class
# to python. See the documentation for the C++ class for more information at
#
-# https://geographiclib.sourceforge.io/html/annotated.html
+# https://geographiclib.sourceforge.io/C++/doc/annotated.html
#
# The algorithms are derived in
#
@@ -51,7 +51,7 @@ The public attributes for this class are
# https://doi.org/10.1007/s00190-012-0578-z
# Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
#
-# Copyright (c) Charles Karney (2011-2022) <charles at karney.com> and licensed
+# Copyright (c) Charles Karney (2011-2022) <karney at alum.mit.edu> and licensed
# under the MIT/X11 License. For more information, see
# https://geographiclib.sourceforge.io/
######################################################################
=====================================
geographiclib/geomath.py
=====================================
@@ -4,9 +4,9 @@
# This is a rather literal translation of the GeographicLib::Math class to
# python. See the documentation for the C++ class for more information at
#
-# https://geographiclib.sourceforge.io/html/annotated.html
+# https://geographiclib.sourceforge.io/C++/doc/annotated.html
#
-# Copyright (c) Charles Karney (2011-2021) <charles at karney.com> and
+# Copyright (c) Charles Karney (2011-2022) <karney at alum.mit.edu> and
# licensed under the MIT/X11 License. For more information, see
# https://geographiclib.sourceforge.io/
######################################################################
=====================================
geographiclib/polygonarea.py
=====================================
@@ -30,7 +30,7 @@ The public attributes for this class are
# This is a rather literal translation of the GeographicLib::PolygonArea class
# to python. See the documentation for the C++ class for more information at
#
-# https://geographiclib.sourceforge.io/html/annotated.html
+# https://geographiclib.sourceforge.io/C++/doc/annotated.html
#
# The algorithms are derived in
#
@@ -39,7 +39,7 @@ The public attributes for this class are
# https://doi.org/10.1007/s00190-012-0578-z
# Addenda: https://geographiclib.sourceforge.io/geod-addenda.html
#
-# Copyright (c) Charles Karney (2011-2022) <charles at karney.com> and licensed
+# Copyright (c) Charles Karney (2011-2022) <karney at alum.mit.edu> and licensed
# under the MIT/X11 License. For more information, see
# https://geographiclib.sourceforge.io/
######################################################################
@@ -226,7 +226,7 @@ class PolygonArea:
More points can be added to the polygon after this call.
"""
- if self.polyline: area = math.nan
+ area = math.nan
if self.num < 2:
perimeter = 0.0
if not self.polyline: area = 0.0
@@ -260,7 +260,7 @@ class PolygonArea:
:return: a tuple of number, perimeter (meters), area (meters^2)
"""
- if self.polyline: area = math.nan
+ area = math.nan
if self.num == 0:
perimeter = 0.0
if not self.polyline: area = 0.0
=====================================
geographiclib/test/test_geodesic.py
=====================================
@@ -572,6 +572,29 @@ class GeodSolveTest(unittest.TestCase):
inv = geod.Inverse(0, 0, 60.0832522871723, 89.8492185074635, Geodesic.AREA)
self.assertAlmostEqual(inv["S12"], 42426932221845, delta = 0.5)
+ def test_GeodSolve99(self):
+ """Test case
+ https://github.com/geographiclib/geographiclib-js/issues/3
+ Problem was that output of sincosd(+/-45) was inconsistent because
+ of directed rounding by Javascript's Math.round. Python
+ implementation was OK."""
+ inv = Geodesic.WGS84.Inverse(45.0, 0.0, -45.0, 179.572719)
+ self.assertAlmostEqual(inv["azi1"], 90.00000028, delta = 1e-8 )
+ self.assertAlmostEqual(inv["azi2"], 90.00000028, delta = 1e-8 )
+ self.assertAlmostEqual(inv["s12"], 19987083.007, delta = 0.5e-3)
+
+ def test_GeodSolve100(self):
+ """Check fix for meridional failure for a strongly prolate ellipsoid.
+ This was caused by assuming that sig12 < 1 guarantees the meridional
+ geodesic is shortest (even though m12 < 0). Counter example is tested
+ here. Bug is not present for f >= -2, b < 3*a. For f = -2.1 the
+ inverse calculation for 30.61 0 30.61 180 exhibits the bug."""
+ geod = Geodesic(1e6, -3)
+ inv = geod.Inverse(30, 0, 30, 180)
+ self.assertAlmostEqual(inv["azi1"], 22.368806, delta = 1.0)
+ self.assertAlmostEqual(inv["azi2"], 157.631194, delta = 1.0)
+ self.assertAlmostEqual(inv["s12"], 1074081.6, delta = 1e3)
+
class PlanimeterTest(unittest.TestCase):
"""Planimeter tests"""
=====================================
pyproject.toml
=====================================
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools>=42"]
+build-backend = "setuptools.build_meta"
=====================================
setup.cfg
=====================================
@@ -1,3 +1,32 @@
+[metadata]
+name = geographiclib
+version = attr: geographiclib.__version__
+author = Charles Karney
+author_email = karney at alum.mit.edu
+description = The geodesic routines from GeographicLib
+long_description = file: README.md
+long_description_content_type = text/markdown
+keywords = gis, geographical, earth, distance, geodesic
+license = MIT
+license_files = LICENSE
+url = https://geographiclib.sourceforge.io/Python/
+project_urls =
+ Source Code = https://github.com/geographiclib/geographiclib-python
+ Documentation = https://geographiclib.sourceforge.io/Python/doc/
+ Download = https://pypi.org/project/geographiclib/
+classifiers =
+ Development Status :: 5 - Production/Stable
+ Intended Audience :: Developers
+ Intended Audience :: Science/Research
+ Operating System :: OS Independent
+ Programming Language :: Python
+ Topic :: Scientific/Engineering :: GIS
+ Topic :: Software Development :: Libraries :: Python Modules
+
+[options]
+packages = find:
+python_requires = >= 3.7
+
[egg_info]
tag_build =
tag_date = 0
=====================================
setup.py deleted
=====================================
@@ -1,55 +0,0 @@
-# setup.py, config file for distutils
-#
-# To install this package, execute
-#
-# python setup.py install
-#
-# in this directory. To run the unit tests, execute
-#
-# python setup.py test
-#
-# To update the HTML page for this version, run
-#
-# python setup.py register
-#
-# To upload the latest version to the python repository, run
-#
-# python setup.py sdist --formats gztar,zip upload
-#
-# The initial version of this file was provided by
-# Andrew MacIntyre <Andrew.MacIntyre at acma.gov.au>.
-
-import setuptools
-
-name = "geographiclib"
-version = "2.0"
-
-with open("README.md", "r") as fh:
- long_description = fh.read()
-
-setuptools.setup(
- name = name,
- version = version,
- author = "Charles Karney",
- author_email = "charles at karney.com",
- description = "The geodesic routines from GeographicLib",
- long_description = long_description,
- long_description_content_type = "text/markdown",
- url = "https://geographiclib.sourceforge.io/Python/2.0" ,
- include_package_data = True,
- packages = setuptools.find_packages(),
- license = "MIT",
- keywords = "gis geographical earth distance geodesic",
- classifiers = [
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Developers",
- "Intended Audience :: Science/Research",
- "License :: OSI Approved :: MIT License",
- "Operating System :: OS Independent",
- "Programming Language :: Python",
- "Topic :: Scientific/Engineering :: GIS",
- "Topic :: Software Development :: Libraries :: Python Modules",
- ],
- test_suite = "geographiclib.test.test_geodesic",
- python_requires = ">=3.7",
-)
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-geographiclib/-/compare/9751ae56857bdccbba6f2f8911f6c276bd124703...1f4687f9a294d50ec7c2953830567ab38b62ad83
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-geographiclib/-/compare/9751ae56857bdccbba6f2f8911f6c276bd124703...1f4687f9a294d50ec7c2953830567ab38b62ad83
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20250824/ae0d318f/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list