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.tar.gz (23.5 kB view details)

Uploaded Source

Built Distributions

mgrs-1.0.win32-py2.7.exe (214.7 kB view details)

Uploaded Source

mgrs-1.0.win32-py2.6.exe (84.8 kB view details)

Uploaded Source

mgrs-1.0.win32-py2.5.exe (77.7 kB view details)

Uploaded Source

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

Uploaded Source

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

Uploaded Source

mgrs-1.0-py2.6-macosx-10.6-universal.egg (35.0 kB view details)

Uploaded Source

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for mgrs-1.0.tar.gz
Algorithm Hash digest
SHA256 c28c28fd4c7d46c474c8cc56bd52ded63b56e4dbe540119f5e8cd3388d770873
MD5 563025d934228df38b496978fbf0eb39
BLAKE2b-256 49831f1b64c19f57cb79b02c3056fd5c3b82c1bd50953a8ab044c24b3232cd84

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mgrs-1.0.win32-py2.7.exe
  • Upload date:
  • Size: 214.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mgrs-1.0.win32-py2.7.exe
Algorithm Hash digest
SHA256 cc0e6d10221743ac792fddc0c9d55f8ac01dff5a034c90c48444c0a93a99db2a
MD5 d19b84025ee334aab1324abe9b036836
BLAKE2b-256 78377b8521a686e23ed5d2de84310f5ac767006b5805883753111b83b6a5fe35

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mgrs-1.0.win32-py2.6.exe
  • Upload date:
  • Size: 84.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mgrs-1.0.win32-py2.6.exe
Algorithm Hash digest
SHA256 862701142c95f6ca754562b1201560a8bfcc8b953b0a0392e3f93fe482973264
MD5 358d4cd31811555ea938942494838f3d
BLAKE2b-256 1bd54f12510d3926c2d9fb8e33c8ddef9aebe99ab5a248d1cc770a7c63e67583

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mgrs-1.0.win32-py2.5.exe
  • Upload date:
  • Size: 77.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mgrs-1.0.win32-py2.5.exe
Algorithm Hash digest
SHA256 31a0e46aac2fe4aa6d41ebc732625386946f97d976ef0711740a0d4f1bd5cb7a
MD5 ca9ee96a63e60333ad85e895a363bdc0
BLAKE2b-256 91e9d1730374a594b4b7ab8e1533fd82a28d07e6792bc1ff47d21108f04e23a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mgrs-1.0-py2.7-win32.egg
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mgrs-1.0-py2.7-win32.egg
Algorithm Hash digest
SHA256 f7276296983b6e1882e00a39866b894c997d7d02078ed5b96c4360e1d711a17a
MD5 04b582f3a3fa3f22525065dcf668690c
BLAKE2b-256 84d4a64dc2983bf8fd37f061f7034f47ab81524fb90fc5969cc298c7f222c78b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mgrs-1.0-py2.6-win32.egg
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mgrs-1.0-py2.6-win32.egg
Algorithm Hash digest
SHA256 0fe4251ab09ecde194401e6d0f08dff08a25828f422728f22ccf04b1ad1268a0
MD5 cac299e3601478668a0a8db67eec40cb
BLAKE2b-256 4d1f73f4d219a65c348143974bee860e88b2201e15b13c5c8acb55e2d6be1d16

See more details on using hashes here.

File details

Details for the file mgrs-1.0-py2.6-macosx-10.6-universal.egg.

File metadata

File hashes

Hashes for mgrs-1.0-py2.6-macosx-10.6-universal.egg
Algorithm Hash digest
SHA256 9a57b5120132abbe8b24b85df3a0bcf858fc8cf84aac7247c999f1ae183623c6
MD5 db22d3536ede1ae07edb167b1884b0d2
BLAKE2b-256 8069539b3beb4b69fc71156982bdf0d8febb4d32027cf6ce3825aa267ee5a322

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mgrs-1.0-py2.5-win32.egg
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mgrs-1.0-py2.5-win32.egg
Algorithm Hash digest
SHA256 ec0b542b37985461c096e72f301175a52f9e67c957af51cf920c08f67081caca
MD5 0231aab666f6c6c649dc6fe2588459cc
BLAKE2b-256 5fc919b454ef6255f41db3c2e984f579c558ce9edeb575f3dec19d382e3e0d55

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