Home | Trees | Indices | Help |
|
---|
|
Military Grid Reference System (MGRS/NATO) references.
Military Grid Reference System (MGRS/NATO) classes Mgrs and MGRSError and functions parseMGRS and toMgrs.
Pure Python implementation of MGRS / UTM conversion functions using an ellipsoidal earth model, transcoded from JavaScript originals by (C) Chris Veness 2014-2016 published under the same MIT Licence**, see MGRS and Module mgrs.
The MGRS/NATO grid references provides geocoordinate references covering the entire globe, based on UTM projections.
MGRS references comprise a grid zone designation, a 100 km square identification, and an easting and northing (in metres).
Depending on requirements, some parts of the reference may be omitted (implied), and easting/northing may be given to varying resolution.
See also United States National Grid and Military Grid Reference System.
Version: 22.04.22
Classes | |
MGRSError Military Grid Reference System (MGRS) parse or other Mgrs issue. |
|
Mgrs Military Grid Reference System (MGRS/NATO) references, with method to convert to UTM coordinates. |
|
Mgrs4Tuple 4-Tuple (zone, digraph, easting, northing) ,
zone and digraph as str ,
easting and northing in
meter .
|
|
Mgrs6Tuple 6-Tuple (zone, digraph, easting, northing, band,
datum) , zone , digraph and
band as str , easting and
northing in meter and datum
a Datum.
|
Functions | |||
|
|||
|
Variables | |
__all__ = _ALL_LAZY.mgrs
|
Function Details |
Parse a string representing a MGRS grid reference, consisting of
Example: >>> m = parseMGRS('31U DQ 48251 11932') >>> str(m) # 31U DQ 48251 11932 >>> m = parseMGRS('31UDQ4825111932') >>> repr(m) # [Z:31U, G:DQ, E:48251, N:11932] >>> m = mgrs.parseMGRS('42SXD0970538646') >>> str(m) # 42S XD 09705 38646 >>> m = mgrs.parseMGRS('42SXD9738') # Km >>> str(m) # 42S XD 97000 38000 |
Convert a UTM coordinate to an MGRS grid reference.
Example: >>> u = Utm(31, 'N', 448251, 5411932) >>> m = u.toMgrs() # 31U DQ 48251 11932 |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed May 4 16:33:50 2022 | http://epydoc.sourceforge.net |