{"id":21375345,"url":"https://github.com/lsst/sphgeom","last_synced_at":"2025-04-06T13:09:22.725Z","repository":{"id":26856752,"uuid":"30316723","full_name":"lsst/sphgeom","owner":"lsst","description":"C++ spherical geometry primitives for LSST Data Management","archived":false,"fork":false,"pushed_at":"2025-03-28T00:03:01.000Z","size":1012,"stargazers_count":18,"open_issues_count":3,"forks_count":14,"subscribers_count":57,"default_branch":"main","last_synced_at":"2025-03-30T12:06:57.154Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://dm.lsst.org/","language":"C++","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lsst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-04T19:27:06.000Z","updated_at":"2025-02-18T16:17:10.000Z","dependencies_parsed_at":"2024-04-30T07:28:49.850Z","dependency_job_id":"0628ec74-43dc-418b-bde9-78b9399ec2c3","html_url":"https://github.com/lsst/sphgeom","commit_stats":null,"previous_names":[],"tags_count":558,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst%2Fsphgeom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst%2Fsphgeom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst%2Fsphgeom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsst%2Fsphgeom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lsst","download_url":"https://codeload.github.com/lsst/sphgeom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485287,"owners_count":20946398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T09:09:53.239Z","updated_at":"2025-04-06T13:09:22.707Z","avatar_url":"https://github.com/lsst.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"sphgeom: spherical geometry primitives\n======================================\n\nOverview\n--------\n\nThis low-level C++ library provides primitives for representing points and\nregions on the unit sphere, as well as support for partitioning the sphere.\nIt can be used to answer the following sorts of questions:\n\n  - *Is point X inside region Y?*\n  - *Do two regions A and B intersect?*\n  - *Which pieces of the sphere does region C overlap?*\n\nRegions can be serialized to binary strings, so that they may be stored\nefficiently in files or VARBINARY database columns. They can also be\napproximated with simpler regions - for example, one can ask for the\nbounding circle of a convex polygon.\n\nPython bindings that expose most of the C++ API are also provided via\n[pybind11](https://pybind11.readthedocs.io/).\n\nPoints\n------\n\nThere are 3 different classes for points\n\n  - *LonLat* for spherical coordinates,\n  - *Vector3d* for Cartesian vectors in ℝ³ (not constrained to lie on the unit sphere)\n  - *UnitVector3d* for vectors in ℝ³ with unit ℓ² norm.\n\nRegions\n-------\n\nFour basic spherical *Region* types are\nprovided:\n\n  - *Box*, a longitude/latitude angle box\n  - *Circle*, a small circle defined by a center and opening angle/chord length\n  - *Ellipse*, the intersection of an elliptical cone with the unit sphere\n  - *ConvexPolygon*, a convex spherical polygon with unit vector vertices and great circle edges\n\nIn addition to the spherical regions, there is a type for 3-D axis aligned\nboxes, *Box3d*. All spherical regions know how\nto compute their 3-D bounding boxes, which makes it possible to insert them\ninto a 3-D [R-tree](https://en.wikipedia.org/wiki/R-tree). This is used by the\nexposure indexing task in the [daf_ingest](https://github.com/lsst/daf_ingest)\npackage to spatially index exposure bounding polygons using the\n[SQLite](https://sqlite.org) 3\n[R*tree module](https://www.sqlite.org/rtree.html).\n\nA region can also determine its spatial\nrelationship to another region, and\ntest whether or not it contains a given unit vector.\n\nPixelizations\n-------------\n\nThis library also provides support for assigning points to pixels (a.k.a.\ncells or partitions) in a *Pixelization*\n(a.k.a. partitioning) of the sphere, and for determining which pixels\nintersect a region.\n\nCurrently, the *Chunker*  class implements\nthe partitioning scheme employed by [Qserv](https://github.com/lsst/qserv).\nThe *HtmPixelization*  class implements\nthe HTM (Hierarchical Triangular Mesh) pixelization. The\n*Q3cPixelization* and *Mq3cPixelization* classes implement\nthe original Quad Tree Cube indexing scheme and a modified version with\nreduced pixel area variation.\n\nInstalling with pip\n-------------------\n\nA simple pip-compatible installer is available.  This only installs the\nPython bindings and the resulting installation is not usable for linking\nfrom C++.  Some metadata (in particular the version number) are not set\nproperly for the distribution.  The main purpose for now is to allow\nother packages to pip install from the GitHub URL in their CI systems\nwhere sphgeom is a dependency.\n\nSee Also\n--------\n\n#### Contributing\n\nFor instructions on how to contribute, see http://dm.lsst.org/#contributing\n(or just send us a pull request).\n\n#### Support\n\nFor help, see http://dm.lsst.org/#support.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsst%2Fsphgeom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsst%2Fsphgeom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsst%2Fsphgeom/lists"}