Package pygeodesy :: Module utm :: Class Utm |
[frames] | no frames]

# Class Utm

       object --+
                |
     named._Named --+
                    |
     named._NamedBase --+
                        |
    utmupsBase.UtmUpsBase --+
                            |
                           Utm

Known Subclasses:
  - etm.Etm

Universal Transverse Mercator (UTM) coordinate.

Instance Methods
__eq__(self, other) |
__init__(self, zone, hemisphere, easting, northing, band=`'````'`, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, falsed=True, convergence=None, scale=None, name=`'````'`) New Utm UTM coordinate. |
__repr__(self) Default `repr(self)`. |
__str__(self) Default `str(self)`. |
parseUTM(self, strUTM) Parse a string to a UTM coordinate. |
toEtm(self) Copy this UTM to an ETM coordinate. |
toLatLon(self, LatLon=None, eps=2.22044604925e-16, unfalse=True, **LatLon_kwds) Convert this UTM coordinate to an (ellipsoidal) geodetic point. |
toMgrs(self) Convert this UTM coordinate to an MGRS grid reference. |
toStr(self, prec=0, sep=`'``` `'`, B=False, cs=False) Return a string representation of this UTM coordinate. |
toStr2(self, prec=0, fmt=`'``[%s]``'`, sep=`'``,` `'`, B=False, cs=False) Return a string representation of this UTM coordinate. |
toUps(self, pole=`'````'`, eps=2.22044604925e-16, falsed=True, **unused) Convert this UTM coordinate to a UPS coordinate. |
toUtm(self, zone, eps=2.22044604925e-16, falsed=True, **unused) Convert this UTM coordinate to a different zone. |
Inherited from `utmupsBase.UtmUpsBase`: `eastingnorthing2`, `to2en`, `toEpsg` Inherited from `named._NamedBase`: `others` Inherited from `named._Named`: `_dot_`, `attrs`, `classof`, `copy` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| band
| falsed2
| pole
| zone
Inherited from `utmupsBase.UtmUpsBase`: `convergence`, `datum`, `easting`, `eastingnorthing`, `falsed`, `hemisphere`, `northing`, `scale`, `scale0` Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2` Inherited from `object`: `__class__`

Method Details

### __init__(self, zone, hemisphere, easting, northing, band=`'````'`, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, falsed=True, convergence=None, scale=None, name=`'````'`) (Constructor) |
New Utm UTM coordinate. Parameters: `zone` - Longitudinal UTM zone (`int`, 1..60) or zone with/-out (latitudinal) Band letter (`str`, '01C'..'60X'). `hemisphere` - Northern or southern hemisphere (`str`, `'N[orth]'` or `'S[outh]'`). `easting` - Easting, see `falsed` (`meter`). `northing` - Northing, see `falsed` (`meter`). `band` - Optional, (latitudinal) band (`str`, 'C'..'X'). `datum` - Optional, this coordinate's datum (Datum). `falsed` - Both `easting` and `northing` are falsed (`bool`). `convergence` - Optional meridian convergence, bearing off grid North, clockwise from true North (`degrees`) or `None`. `scale` - Optional grid scale factor (`scalar`) or `None`. `name` - Optional name (`str`). Raises: `UTMError` - Invalid `zone`, `hemishere` or `band`. Overrides: object.__init__ Example:
    >>> import pygeodesy
    >>> u = pygeodesy.Utm(31, 'N', 448251, 5411932)

### __repr__(self) (Representation operator) |
Default `repr(self)`. Overrides: object.__repr__ (inherited documentation)

### __str__(self) (Informal representation operator) |
Default `str(self)`. Overrides: object.__str__ (inherited documentation)

### parseUTM(self, strUTM) |
Parse a string to a UTM coordinate. Returns: The coordinate (Utm). See Also: Function parseUTM5 in this module utm.

### toEtm(self) |
Copy this UTM to an ETM coordinate. Returns: The ETM coordinate (Etm).

### toLatLon(self, LatLon=None, eps=2.22044604925e-16, unfalse=True, **LatLon_kwds) |
Convert this UTM coordinate to an (ellipsoidal) geodetic point. Parameters: `LatLon` - Optional, ellipsoidal class to return the geodetic point (`LatLon`) or `None`. `eps` - Optional convergence limit, EPS or above (`float`). `unfalse` - Unfalse `easting` and `northing` if falsed (`bool`). `LatLon_kwds` - Optional, additional `LatLon` keyword arguments, ignored if `LatLon=None`. Returns: This UTM coordinate (`LatLon`) or if `LatLon` is `None`, a LatLonDatum5Tuple`(lat, lon, datum, convergence, scale)`. Raises: `TypeError` - If `LatLon` is not ellipsoidal. `UTMError` - Invalid meridional radius or H-value. Example:
    >>> u = Utm(31, 'N', 448251.795, 5411932.678)
    >>> from pygeodesy import ellipsoidalVincenty as eV
    >>> ll = u.toLatLon(eV.LatLon)  # 48°51′29.52″N, 002°17′40.20″E

### toMgrs(self) |
Convert this UTM coordinate to an MGRS grid reference. See function toMgrs in module mgrs for more details. Returns: The MGRS grid reference (Mgrs).

### toStr(self, prec=0, sep=`'``` `'`, B=False, cs=False) |
Return a string representation of this UTM coordinate. To distinguish from MGRS grid zone designators, a space is left between the zone and the hemisphere. Note that UTM coordinates are rounded, not truncated (unlike MGRS grid references). Parameters: `prec` - Optional number of decimals, unstripped (`int`). `sep` - Optional separator to join (`str`). `B` - Optionally, include latitudinal band (`bool`). `cs` - Optionally, include meridian convergence and grid scale factor (`bool`). Returns: This UTM as a string with `zone[band], hemisphere, easting, northing, [convergence, scale]` in `"00 N|S meter meter"` plus `" degrees float"` if `cs` is `True` (`str`). Raises: `AssertionError` - Always, see function notOverloaded. Overrides: named._Named.toStr Example:
    >>> u = Utm(3, 'N', 448251, 5411932.0001)
    >>> u.toStr(4)  # 03 N 448251.0 5411932.0001
    >>> u.toStr(sep=', ')  # 03 N, 448251, 5411932

### toStr2(self, prec=0, fmt=`'``[%s]``'`, sep=`'``,` `'`, B=False, cs=False) |
Return a string representation of this UTM coordinate. Note that UTM coordinates are rounded, not truncated (unlike MGRS grid references). Parameters: `prec` - Optional number of decimals, unstripped (`int`). `fmt` - Optional, enclosing backets format (`str`). `sep` - Optional separator between name:value pairs (`str`). `B` - Optionally, include latitudinal band (`bool`). `cs` - Optionally, include meridian convergence and grid scale factor (`bool`). Returns: This UTM as a string `"[Z:09[band], H:N|S, E:meter, N:meter]"` plus `", C:degrees, S:float"` if `cs` is `True` (`str`). Overrides: named._Named.toStr2

### toUps(self, pole=`'````'`, eps=2.22044604925e-16, falsed=True, **unused) |
Convert this UTM coordinate to a UPS coordinate. Parameters: `pole` - Optional top/center of the UPS projection, (`str`, 'N[orth]'|'S[outh]'). `eps` - Optional convergence limit, EPS or above (`float`), see method Utm.toLatLon. `falsed` - False both easting and northing (`bool`). Returns: The UPS coordinate (Ups).

### toUtm(self, zone, eps=2.22044604925e-16, falsed=True, **unused) |
Convert this UTM coordinate to a different zone. Parameters: `zone` - New UTM zone (`int`). `eps` - Optional convergence limit, EPS or above (`float`), see method Utm.toLatLon. `falsed` - False both easting and northing (`bool`). Returns: The UTM coordinate (Utm).

Property Details

### band Get method: band(self) - Get the (latitudinal) band (`str`, 'C'..'X' or ''). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### falsed2 Get method: falsed2(self) - Get the easting and northing falsing (EasNor2Tuple`(easting, northing)`). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### pole Get method: pole(self) - Get the top center of (stereographic) projection, `""` always. Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### zone Get method: zone(self) - Get the (longitudinal) zone (`int`, 1..60). Set method: immutable(inst, value) - Throws an `AttributeError`, always.