sphersgeo is an object-oriented spherical geometry package written in Rust with Python accessor classes and methods.
Important
sphersgeo is still in development
and does not currently implement all the robust functionality provided by
planar geometry packages such as geo or Shapely.
Note
Intersections between geometries are NOT rigorous; the .intersection() function will ONLY return the lower order of geometry being compared, and does NOT handle degenerate cases / touching geometries.
pip install sphersgeoPlanar geometry packages typically classify geometries into points, linestrings (also called polylines), and polygons (along with multi-geometry collections: multi-points, multi-linestrings / multi-polylines, and multi-polygons). The spherical geometry analogues to these are spherical points, arcstrings, and spherical polygons.
| Planar | Spherical | Planar Collection | Spherical Collection |
|---|---|---|---|
| Point | SphericalPoint |
MultiPoint | MultiSphericalPoint |
| LineString | ArcString |
MultiLineString | MultiArcString |
| Polygon | SphericalPolygon |
MultiPolygon | MultiSphericalPolygon |
- Toddhunter, I. (1886). Article 99. In Spherical Trigonometry: For the Use of Colleges and Schools (pp. 73–74). print.
- Miller, Robert D. Computing the area of a spherical polygon. Graphics Gems IV. p132. 1994. Academic Press. doi:10.5555/180895.180907. print.
- Spinielli, Enrico. 2014. “Understanding Great Circle Arcs Intersection Algorithm.” October 19, 2014. https://enrico.spinielli.net/posts/2014-10-19-understanding-great-circle-arcs.
- M.A, Jayaram & Fleyeh, Hasan. (2016). Convex Hulls in Image Processing: A Scoping Review. American Journal of Intelligent Systems. 2016. 48-58. 10.5923/j.ajis.20160602.03. pdf.
- Klain, D. A. (2019). A probabilistic proof of the spherical excess formula (No. arXiv:1909.04505). arXiv. https://doi.org/10.48550/arXiv.1909.04505
spherical_geometrys2geometry