Skip to main content
Release file added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

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.

travisstatus

ChangeLog

1.3.4

1.3.3

1.3.2

  • Better Windows support

  • Bug fix for 3 digit longitudes

1.3.1

  • Python 3.x support

  • Allow user to override precision in UTMToMGRS

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)

>>> y = '321942.29N'
>>> yd = m.dmstodd(y)
32.328414

>>> d, m, s = m.ddtodms(32.328414)
>>> d, m, s
(32.0, 19.0, 42.290400)

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.3.5

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

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for mgrs 1.3.5
File Size Uploaded Provenance Actions
mgrs-1.3.5.zip 43.6 kB Without provenance Details for mgrs-1.3.5.zip

Built distributions (wheels)

Table of built distributions (wheels) for mgrs 1.3.5
File Actions
mgrs-1.3.5-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for mgrs-1.3.5-cp37-cp37m-win_amd64.whl
mgrs-1.3.5-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details for mgrs-1.3.5-cp36-cp36m-win_amd64.whl
mgrs-1.3.5-cp35-cp35m-win_amd64.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-64 Details for mgrs-1.3.5-cp35-cp35m-win_amd64.whl
mgrs-1.3.5-cp27-cp27m-win32.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-32 Details for mgrs-1.3.5-cp27-cp27m-win32.whl

Total release size: 128.9 kB

Release files / mgrs-1.3.5.zip

Download URL mgrs-1.3.5.zip
Size 43.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b8e4eaab7a4057910dd18fce9047ab2487a9d43a5c205510465709f62156d02c
BLAKE2b-256 checksum
How to use checksums
1d497abb4403bd44971fa5b75e9deb904ada7c545660dc0704ea79c776d59c49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.3.5-cp37-cp37m-win_amd64.whl

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL mgrs-1.3.5-cp37-cp37m-win_amd64.whl
Size 22.0 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
b97039da9efa7c2e71e59a6063d083627b089496571e3f335580e83da6324c38
BLAKE2b-256 checksum
How to use checksums
3472dbbd718dd311d1398786a32955e225b60ea65260f4af19807dee4ca94655
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release files / mgrs-1.3.5-cp36-cp36m-win_amd64.whl

Download URL mgrs-1.3.5-cp36-cp36m-win_amd64.whl
Size 21.9 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
5565c150ccba0c01dc36ca7ed419b8cbbe974d5167a11f04d31241082f6d596f
BLAKE2b-256 checksum
How to use checksums
3823d518958de5e2087c1bb37ec7d23957a5f77d39571da1a1f766ac8fa77187
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.3.5-cp35-cp35m-win_amd64.whl

Download URL mgrs-1.3.5-cp35-cp35m-win_amd64.whl
Size 21.9 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
113020ae5e6fb974856888f8798ff0da8710bb17b3ff177bfb12ca20c81bce88
BLAKE2b-256 checksum
How to use checksums
6030a6daa50f2d16d16a44d6e358476d06819aa6032b541d2418143e7b54f4ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mgrs-1.3.5-cp27-cp27m-win32.whl

Download URL mgrs-1.3.5-cp27-cp27m-win32.whl
Size 19.4 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
e544c7706033e666ea0922e2c2cba6fdd8feeaeb6f8bfa52e0023066f05d44c1
BLAKE2b-256 checksum
How to use checksums
dafa16601f27f92bc98ba976b1174fb2a53d77ac538be4cd5b8fdceee204af12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for mgrs 1.3.5

Upload timing

Release file added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.


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