Package pygeodesy :: Module mgrs :: Class Mgrs4Tuple |
[frames] | no frames]

# Class Mgrs4Tuple

       object --+
                |
            tuple --+
                    |
       object --+   |
                |   |
     named._Named --+
                    |
    named._NamedTuple --+
                        |
                       Mgrs4Tuple

4-Tuple `(zone, digraph, easting, northing)`, `zone` and `digraph` as `str`, `easting` and `northing` in `meter`.

Instance Methods
to6Tuple(self, band, datum) Extend this Mgrs4Tuple to a Mgrs6Tuple. |
Inherited from `named._NamedTuple`: `__delattr__`, `__getattr__`, `__getitem__`, `__repr__`, `__setattr__`, `__str__`, `items`, `iteritems`, `iterunits`, `toRepr`, `toStr`, `toUnits`, `units` Inherited from `tuple`: `__add__`, `__contains__`, `__eq__`, `__ge__`, `__getattribute__`, `__getnewargs__`, `__getslice__`, `__gt__`, `__hash__`, `__iter__`, `__le__`, `__len__`, `__lt__`, `__mul__`, `__ne__`, `__rmul__`, `count`, `index` Inherited from `named._Named`: `_DOT_`, `attrs`, `classof`, `copy`, `rename`, `toStr2` Inherited from `object`: `__format__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__sizeof__`, `__subclasshook__`

Static Methods
a new object with type S, a subtype of T |
__new__(cls, z, di, e, n, Error=<class 'pygeodesy.mgrs.MGRSError'>) New _NamedTuple initialized with `positional` arguments. |

Class Variables
| _Names_ = ``(``'``zone``'``,` `'``digraph``'``,` `'``easting``'``,` `'``northing``'``)`` Tuple specifying the `name` of each `Named-Tuple` item.
| _Units_ = ``(`<class 'pygeodesy.units.Str'>`,` <class 'pygeodesy.un`...`` Tuple defining the `units` of the value of each `Named-Tuple` item.

Properties
Inherited from `named._NamedTuple`: `iteration` Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4` Inherited from `object`: `__class__`

Method Details

### __new__ (cls, z, di, e, n, Error=<class 'pygeodesy.mgrs.MGRSError'>) Static Method |
New _NamedTuple initialized with `positional` arguments. Arguments: `args` - Tuple items (`any`), all positional arguments. `name_only` - Only `name='name'` is used, all other keyword arguments are silently ignored. Returns: a new object with type S, a subtype of T Raises: `LenError` - Unequal number of positional arguments and number of item `_Names_` or `_Units_`. `TypeError` - The `_Names_` or `_Units_` attribute is not a `tuple` of at least 2 items. `ValueError` - Item name is not a `str` or valid `identifier` or starts with `underscore`. Overrides: object.__new__ (inherited documentation)

### to6Tuple (self, band, datum) |
Extend this Mgrs4Tuple to a Mgrs6Tuple. Arguments: `band` - The band to add (`str` or `None`). `datum` - The datum to add (Datum or `None`). Returns: An Mgrs6Tuple`(zone, digraph, easting, northing, band, datum)`.

Class Variable Details

  ### _Names_ Tuple specifying the `name` of each `Named-Tuple` item. Note: Specify at least 2 item names. Value:
      ('zone', 'digraph', 'easting', 'northing')

  ### _Units_ Tuple defining the `units` of the value of each `Named-Tuple` item. Note: The `len(_Units_)` must match `len(_Names_)`. Value:
      (<class 'pygeodesy.units.Str'>,
       <class 'pygeodesy.units.Str'>,
       <class 'pygeodesy.units.Easting'>,
       <class 'pygeodesy.units.Northing'>)