Skip to main content

MGRS coordinate conversion for Python

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mgrs-1.0.1.tar.gz (25.6 kB view details)

Uploaded Source

Built Distributions

mgrs-1.0.1.win32-py2.7.exe (214.8 kB view details)

Uploaded Source

mgrs-1.0.1.win32-py2.6.exe (84.9 kB view details)

Uploaded Source

mgrs-1.0.1.win32-py2.5.exe (77.8 kB view details)

Uploaded Source

mgrs-1.0.1.win32-py2.4.exe (77.8 kB view details)

Uploaded Source

mgrs-1.0.1-py2.7-win32.egg (19.2 kB view details)

Uploaded Source

mgrs-1.0.1-py2.6-win32.egg (19.3 kB view details)

Uploaded Source

mgrs-1.0.1-py2.5-win32.egg (16.9 kB view details)

Uploaded Source

mgrs-1.0.1-py2.4-win32.egg (16.9 kB view details)

Uploaded Source

File details

Details for the file mgrs-1.0.1.tar.gz.

File metadata

  • Download URL: mgrs-1.0.1.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mgrs-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b9370514bdb9fdbebf4256e49b68db0862edf33dedbfa8643fd2af84ebaf577c
MD5 802277c98a2f0772c838c372165700bd
BLAKE2b-256 da998f9cc59221ba7995f9369b48b25f23147217d0ea127492dd5b3c3d439abb

See more details on using hashes here.

File details

Details for the file mgrs-1.0.1.win32-py2.7.exe.

File metadata

File hashes

Hashes for mgrs-1.0.1.win32-py2.7.exe
Algorithm Hash digest
SHA256 311cd95fe96b41ff9e4b6ac8044b7112b9eb6cc7e585921aefbe1dd5e4568e38
MD5 81fb033572c7d925c2255034641d06a9
BLAKE2b-256 58d0f30b319ffca043ff0bcb415430eab055b564ba45626ca64c08db022d2947

See more details on using hashes here.

File details

Details for the file mgrs-1.0.1.win32-py2.6.exe.

File metadata

File hashes

Hashes for mgrs-1.0.1.win32-py2.6.exe
Algorithm Hash digest
SHA256 25e6581c8e30f4feb4660b8746e1877827b7b149bfd05c705c1f040558aac1bb
MD5 02c6a487063f16f5ffeb23bc3a6e851b
BLAKE2b-256 9e20d71a21f8fbdfce7c3d821d87bfcd2d11dec9132cb1b135121235f8925bfd

See more details on using hashes here.

File details

Details for the file mgrs-1.0.1.win32-py2.5.exe.

File metadata

File hashes

Hashes for mgrs-1.0.1.win32-py2.5.exe
Algorithm Hash digest
SHA256 43aef6eb9c86ad9d53053b9efec37a08883145a2ff3760e1bfdaf4bc40e47304
MD5 b566d5b4883f00a1864b60bc6304abb0
BLAKE2b-256 8902ad160be1a0c8206c47fac8c1e889e78c4418262d6e7c02b2a16b4608495a

See more details on using hashes here.

File details

Details for the file mgrs-1.0.1.win32-py2.4.exe.

File metadata

File hashes

Hashes for mgrs-1.0.1.win32-py2.4.exe
Algorithm Hash digest
SHA256 74dc1e87d56fd0e1144b37841b71addde966de50bdfa5eb71cecd2d1fa2f0199
MD5 b95e8fbd5ed77ed33b860023130e8191
BLAKE2b-256 a6c447bbb94d9a3af2e5ecf9a8969c2b54353b808c09b30552ac72b10b260ae3

See more details on using hashes here.

File details

Details for the file mgrs-1.0.1-py2.7-win32.egg.

File metadata

File hashes

Hashes for mgrs-1.0.1-py2.7-win32.egg
Algorithm Hash digest
SHA256 5be68a89f818eace91cb6f663a885b4c02d915e29e06102b68c02ab8ff8afa51
MD5 6e9467c003c87bd7dd5d61f1c603fa4f
BLAKE2b-256 4b938e755f3a7dfea335979606baf9e0a4372c4580938a52901cd315d555e58c

See more details on using hashes here.

File details

Details for the file mgrs-1.0.1-py2.6-win32.egg.

File metadata

File hashes

Hashes for mgrs-1.0.1-py2.6-win32.egg
Algorithm Hash digest
SHA256 73ad208f3ef7bd0b001bfdd94bcc260c09317729af48a64dc9d2b7715ea129a5
MD5 1e92340df893b2767d0b7519eb322197
BLAKE2b-256 ba8ddccab6fe0c2366744111416289626ed4b8afa04805bfeb5b90ee56066ca5

See more details on using hashes here.

File details

Details for the file mgrs-1.0.1-py2.5-win32.egg.

File metadata

File hashes

Hashes for mgrs-1.0.1-py2.5-win32.egg
Algorithm Hash digest
SHA256 44c4f8861f3c290a46c0a76965351585bfbcc57c9876e3c4e952ce5655c91c7f
MD5 f76dece045b0a9fe09645eefac0a2bfe
BLAKE2b-256 a37268e38e2a28bff515704622e5e95773a22c2046fb85c446b17ea2cd383be2

See more details on using hashes here.

File details

Details for the file mgrs-1.0.1-py2.4-win32.egg.

File metadata

File hashes

Hashes for mgrs-1.0.1-py2.4-win32.egg
Algorithm Hash digest
SHA256 3e7c25ac209d6cf6c83df21db99ee8df8f9185d3db918fc695da6de3ad6534ee
MD5 324ab3d18229bcb6f976630b2352c182
BLAKE2b-256 d989fc449e5c188323662ab787d424ea1f14ad0a235295027e9f949800585077

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page