Skip to main content

lgrs

Lunar Grid Reference System library

https://img.shields.io/pypi/v/lgrs.svg https://codecov.io/gh/rbeyer/lgrs/graph/badge.svg?token=EDQUQE6S9I

The lgrs package is software to support the Lunar Grid Reference System and also provides utility functions for coordinate projections until the Lunar Transverse Mercator (LTM) and Lunar Polar Stereographic (LPS) projections are made available in the PROJ library.

At the moment, this repo is under significant development and change as we attempt to craft various pieces of code. It is very messy and a work-in-process. Nothing is guaranteed about structure until we pass the 1.0 version.

Reference document that this library follows is McClernan, M.T., Dennis, M.L., Theriot, I.H., Hare, T.M., Archinal, B.A., Ostrach, L.R., Hunter, M.A., Miller, M.J., Beyer, R.A., Annex, A.M., and Lawrence, S.J., 2025, Lunar grid systems, coordinate systems, and map projections for the Artemis missions and lunar surface navigation: U.S. Geological Survey Techniques and Methods, book 11, chap. E1, 308 p., DOI: 10.3133/tm11E1.

The code in the lgrs.reference modules are from Dr. McClernan’s “mark 7.2” version.

The report is also available here: https://www.usgs.gov/publications/lunar-grid-systems-coordinate-systems-and-map-projections-artemis-missions-and-lunar

Installation

The lgrs library is available on PyPI, and can be pip-installed:

$> pip install lgrs

Alternately, you can clone or download this repository.

It is highly suggested to install this into a virtual Python environment.

Change directory to where you have downloaded this repository after you have set up your virtual environment, just do this:

$> pip install .

or:

$> make install

If you use conda for your virtual environment and install dependencies via conda, you can do this:

$> conda create -n lgrs
$> conda activate lgrs
$> conda env update --file environment.yml
$> pip install --no-deps .

Usage

Examples and how to get started with the lgrs library can be found in our usage guide.

To use lgrs in a web browser (via Pyodide), see the JavaScript usage guide. The examples folder has two complete web pages that do so: convert_coordinate.html converts a coordinate, and package_grid.html generates and downloads a grid. To try one, download the file and open it in a web browser.

Contributing

Feedback, issues, and contributions are always gratefully welcomed. See the contributing guide for details on how to help and setup a development environment.

Credits

The lgrs library was developed in the open at the SETI Institute, based on open code originally developed by the United States Geological Survey.

See the AUTHORS file for a complete list of developers.

License

The lgrs software is licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Metadata

Release files for lgrs 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lgrs 0.4.0
File Size Uploaded
lgrs-0.4.0.tar.gz 190.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lgrs 0.4.0
File Interpreter ABI Platform
lgrs-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 367.6 kB

Release files / lgrs-0.4.0.tar.gz

Download URL lgrs-0.4.0.tar.gz
Size 190.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fb350bf4c7f9e88307b0579804ce2ffea2f4c7cb4ed24b2a4da8bb5d7083204e
BLAKE2b-256 checksum
How to use checksums
a23689b9ee9206f4ad755e50017c92e170ea9363d14ba115e7bde24f00ba7500
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / lgrs-0.4.0-py3-none-any.whl

Download URL lgrs-0.4.0-py3-none-any.whl
Size 176.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db4f263b1cd75fe7f98716ab53dc05b0e3a7f458dd023cba9234725970c27754
BLAKE2b-256 checksum
How to use checksums
04f22f56ee3e7b72f1d25dc7b0c57cc66b0a37d3c3357e3a43500518985f78c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page