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

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
File Size Uploaded Provenance Actions
mgrs-1.0.tar.gz 23.5 kB Without provenance Details for mgrs-1.0.tar.gz

Built distributions (wheels)

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

Total release size: 491.2 kB

Release files / mgrs-1.0.tar.gz

Download URL mgrs-1.0.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c28c28fd4c7d46c474c8cc56bd52ded63b56e4dbe540119f5e8cd3388d770873
BLAKE2b-256 checksum
How to use checksums
49831f1b64c19f57cb79b02c3056fd5c3b82c1bd50953a8ab044c24b3232cd84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL mgrs-1.0.win32-py2.7.exe
Size 214.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cc0e6d10221743ac792fddc0c9d55f8ac01dff5a034c90c48444c0a93a99db2a
BLAKE2b-256 checksum
How to use checksums
78377b8521a686e23ed5d2de84310f5ac767006b5805883753111b83b6a5fe35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL mgrs-1.0.win32-py2.6.exe
Size 84.8 kB
Tags Source
SHA-256 checksum
How to use checksums
862701142c95f6ca754562b1201560a8bfcc8b953b0a0392e3f93fe482973264
BLAKE2b-256 checksum
How to use checksums
1bd54f12510d3926c2d9fb8e33c8ddef9aebe99ab5a248d1cc770a7c63e67583
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL mgrs-1.0.win32-py2.5.exe
Size 77.7 kB
Tags Source
SHA-256 checksum
How to use checksums
31a0e46aac2fe4aa6d41ebc732625386946f97d976ef0711740a0d4f1bd5cb7a
BLAKE2b-256 checksum
How to use checksums
91e9d1730374a594b4b7ab8e1533fd82a28d07e6792bc1ff47d21108f04e23a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL mgrs-1.0-py2.7-win32.egg
Size 19.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
f7276296983b6e1882e00a39866b894c997d7d02078ed5b96c4360e1d711a17a
BLAKE2b-256 checksum
How to use checksums
84d4a64dc2983bf8fd37f061f7034f47ab81524fb90fc5969cc298c7f222c78b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL mgrs-1.0-py2.6-win32.egg
Size 19.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
0fe4251ab09ecde194401e6d0f08dff08a25828f422728f22ccf04b1ad1268a0
BLAKE2b-256 checksum
How to use checksums
4d1f73f4d219a65c348143974bee860e88b2201e15b13c5c8acb55e2d6be1d16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.0-py2.6-macosx-10.6-universal.egg

Download URL mgrs-1.0-py2.6-macosx-10.6-universal.egg
Size 35.0 kB
Tags Egg
SHA-256 checksum
How to use checksums
9a57b5120132abbe8b24b85df3a0bcf858fc8cf84aac7247c999f1ae183623c6
BLAKE2b-256 checksum
How to use checksums
8069539b3beb4b69fc71156982bdf0d8febb4d32027cf6ce3825aa267ee5a322
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

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

Security for mgrs 1.0

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