{"id":24620,"library":"spherical-geometry","title":"spherical-geometry","description":"Python tools for spherical geometry, providing vectorized operations on the sphere using NumPy. Current version 1.4.0, released approximately monthly.","status":"active","version":"1.4.0","language":"python","source_language":"en","source_url":"https://github.com/spacetelescope/spherical_geometry","tags":["spherical geometry","astronomy","great circle","arc"],"install":[{"cmd":"pip install spherical-geometry","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"Required for vectorized operations on arrays of points.","package":"numpy","optional":false}],"imports":[{"wrong":"from spherical_geometry import Arc","symbol":"Arc","correct":"from spherical_geometry import Arc"}],"quickstart":{"code":"from spherical_geometry import Arc, GreatCircle\n\n# Define two points on the sphere (longitude, latitude in radians)\npoint_a = (0.0, 0.0)\npoint_b = (1.0, 0.5)\n\n# Create a great circle arc\narc = Arc(point_a, point_b)\nprint(f\"Arc length: {arc.length()}\")\n\n# Compute intersection of two great circles\ngc1 = GreatCircle(point_a, point_b)\ngc2 = GreatCircle((0.5, 0.2), (1.2, 0.8))\nintersections = gc1.intersections(gc2)\nprint(f\"Intersection points: {intersections}\")","lang":"python","description":"Basic usage of Arc and GreatCircle for spherical geometry calculations."},"warnings":[{"fix":"Use `from spherical_geometry import Arc, GreatCircle` instead of `from spherical_geometry.polygon import Arc` or `from spherical_geometry.great_circle import GreatCircle`.","message":"In version 1.4.0, the import paths for Arc and GreatCircle changed. Previously they were in submodules; now they are exported at the top-level package. Code using old imports will fail.","severity":"breaking","affected_versions":">=1.4.0"},{"fix":"Convert degrees to radians using `math.radians()` or `numpy.radians()` before passing to functions.","message":"All angular coordinates (longitude, latitude) must be in radians, not degrees. The library does not perform conversion, and passing degrees will give incorrect results.","severity":"gotcha","affected_versions":"all"},{"fix":"Use top-level imports as shown in the quickstart.","message":"The `spherical_geometry.polygon` module is deprecated as of 1.4.0. Its contents have been moved to the top-level package.","severity":"deprecated","affected_versions":"1.4.0"}],"env_vars":null,"search_vec":"'1.4.0':19 'approxim':21 'arc':28 'astronomi':25 'circl':27 'current':17 'geometri':3,8,24 'great':26 'month':22 'numpi':16 'oper':11 'provid':9 'python':4 'releas':20 'sphere':14 'spheric':2,7,23 'spherical-geometri':1 'tool':5 'use':15 'vector':10 'version':18","created_at":"2026-05-01T08:14:02.885234+00:00","updated_at":"2026-05-01T08:14:02.885234+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'Arc' from 'spherical_geometry' (/tmp/tmpuhz3wg3q/venv/lib/python3.12/site-packages/spherical_geometry/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.4.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/spacetelescope/spherical_geometry","docs":"http://spherical-geometry.readthedocs.io/","changelog":null,"pypi":"https://pypi.org/project/spherical-geometry/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}