Skip to main content

mgrs: Converting to and from MGRS and Decimal Degrees

GeoTrans provides C code for converting to and from MGRS, but well, it’s C code :). This is a simple ctypes wrapper around two of the MGRS-related functions in GeoTrans.

This library has an internal copy of some of the files from GeoTrans 2.4.2.

Usage

In a nutshell:

>>> import mgrs

>>> latitude = 42.0
>>> longitude = -93.0

>>> m = mgrs.MGRS()
>>> c = m.toMGRS(latitude, longitude)
>>> c
'15TWG0000049776'

>>> d = m.toLatLon(c)
>>> d
(41.999997975127997, -93.000000000000014)

You can also control the precision of the MGRS grid with the MGRSPrecision arguments in .toMGRS(). Other than that, there isn’t too much to it.

Metadata

Release files for mgrs 1.0.1

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

Source distribution (sdist)

Source distribution for mgrs 1.0.1
File Size Uploaded Provenance Actions
mgrs-1.0.1.tar.gz 25.6 kB Without provenance Details for mgrs-1.0.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for mgrs 1.0.1
File Actions
mgrs-1.0.1.win32-py2.7.exe Details for mgrs-1.0.1.win32-py2.7.exe
mgrs-1.0.1.win32-py2.6.exe Details for mgrs-1.0.1.win32-py2.6.exe
mgrs-1.0.1.win32-py2.5.exe Details for mgrs-1.0.1.win32-py2.5.exe
mgrs-1.0.1.win32-py2.4.exe Details for mgrs-1.0.1.win32-py2.4.exe
mgrs-1.0.1-py2.7-win32.egg Legacy Egg format - - Details for mgrs-1.0.1-py2.7-win32.egg
mgrs-1.0.1-py2.6-win32.egg Legacy Egg format - - Details for mgrs-1.0.1-py2.6-win32.egg
mgrs-1.0.1-py2.5-win32.egg Legacy Egg format - - Details for mgrs-1.0.1-py2.5-win32.egg
mgrs-1.0.1-py2.4-win32.egg Legacy Egg format - - Details for mgrs-1.0.1-py2.4-win32.egg

Total release size: 553.1 kB

Release files / mgrs-1.0.1.tar.gz

Download URL mgrs-1.0.1.tar.gz
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b9370514bdb9fdbebf4256e49b68db0862edf33dedbfa8643fd2af84ebaf577c
BLAKE2b-256 checksum
How to use checksums
da998f9cc59221ba7995f9369b48b25f23147217d0ea127492dd5b3c3d439abb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.0.1.win32-py2.7.exe

Download URL mgrs-1.0.1.win32-py2.7.exe
Size 214.8 kB
Tags Source
SHA-256 checksum
How to use checksums
311cd95fe96b41ff9e4b6ac8044b7112b9eb6cc7e585921aefbe1dd5e4568e38
BLAKE2b-256 checksum
How to use checksums
58d0f30b319ffca043ff0bcb415430eab055b564ba45626ca64c08db022d2947
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.0.1.win32-py2.6.exe

Download URL mgrs-1.0.1.win32-py2.6.exe
Size 84.9 kB
Tags Source
SHA-256 checksum
How to use checksums
25e6581c8e30f4feb4660b8746e1877827b7b149bfd05c705c1f040558aac1bb
BLAKE2b-256 checksum
How to use checksums
9e20d71a21f8fbdfce7c3d821d87bfcd2d11dec9132cb1b135121235f8925bfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.0.1.win32-py2.5.exe

Download URL mgrs-1.0.1.win32-py2.5.exe
Size 77.8 kB
Tags Source
SHA-256 checksum
How to use checksums
43aef6eb9c86ad9d53053b9efec37a08883145a2ff3760e1bfdaf4bc40e47304
BLAKE2b-256 checksum
How to use checksums
8902ad160be1a0c8206c47fac8c1e889e78c4418262d6e7c02b2a16b4608495a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.0.1.win32-py2.4.exe

Download URL mgrs-1.0.1.win32-py2.4.exe
Size 77.8 kB
Tags Source
SHA-256 checksum
How to use checksums
74dc1e87d56fd0e1144b37841b71addde966de50bdfa5eb71cecd2d1fa2f0199
BLAKE2b-256 checksum
How to use checksums
a6c447bbb94d9a3af2e5ecf9a8969c2b54353b808c09b30552ac72b10b260ae3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.0.1-py2.7-win32.egg

Download URL mgrs-1.0.1-py2.7-win32.egg
Size 19.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
5be68a89f818eace91cb6f663a885b4c02d915e29e06102b68c02ab8ff8afa51
BLAKE2b-256 checksum
How to use checksums
4b938e755f3a7dfea335979606baf9e0a4372c4580938a52901cd315d555e58c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.0.1-py2.6-win32.egg

Download URL mgrs-1.0.1-py2.6-win32.egg
Size 19.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
73ad208f3ef7bd0b001bfdd94bcc260c09317729af48a64dc9d2b7715ea129a5
BLAKE2b-256 checksum
How to use checksums
ba8ddccab6fe0c2366744111416289626ed4b8afa04805bfeb5b90ee56066ca5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.0.1-py2.5-win32.egg

Download URL mgrs-1.0.1-py2.5-win32.egg
Size 16.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
44c4f8861f3c290a46c0a76965351585bfbcc57c9876e3c4e952ce5655c91c7f
BLAKE2b-256 checksum
How to use checksums
a37268e38e2a28bff515704622e5e95773a22c2046fb85c446b17ea2cd383be2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.0.1-py2.4-win32.egg

Download URL mgrs-1.0.1-py2.4-win32.egg
Size 16.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
3e7c25ac209d6cf6c83df21db99ee8df8f9185d3db918fc695da6de3ad6534ee
BLAKE2b-256 checksum
How to use checksums
d989fc449e5c188323662ab787d424ea1f14ad0a235295027e9f949800585077
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for mgrs 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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