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

# Class Utm

      object --+
               |
    bases._Named --+
                   |
        bases._Based --+
                       |
                      Utm

Universal Transverse Mercator (UTM) coordinate.

Instance Methods
__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 coordinate. |
__repr__(self) repr(x) |
__str__(self) str(x) |
copy(self) Copy this UTM coordinate. |
parseUTM(self, strUTM) Parse a string to a UTM coordinate. |
toLatLon(self, LatLon=None, eps=2.22044604925e-16, unfalse=True) 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, **unused) Convert this UTM coordinate to a UPS coordinate. |
toUtm(self, zone, eps=2.22044604925e-16, **unused) Convert this UTM coordinate to a different one. |
Inherited from `bases._Based`: `classof`, `others` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| band Get the (latitudinal) band (`str`, 'C'..'X' or '').
| convergence Get the meridian convergence (`degrees`) or `None`.
| datum Get the datum (Datum).
| easting Get the easting (`meter`).
| falsed Get the easting and northing falsing (`bool`).
| hemisphere Get the hemisphere (`str`, 'N'|'S').
| northing Get the northing (`meter`).
| scale Get the grid scale (`scalar`) or `None`.
| zone Get the (longitudinal) zone (`int`, 1..60).
Inherited from `bases._Named`: `classname`, `classnaming`, `name` 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 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 from false easting (`meter`, -500km from central meridian). `northing` - Northing from equator (`meter`, N or from false northing -10,000km S). `band` - Optional, (latitudinal) band (`str`, 'C'..'X'). `datum` - Optional, this coordinate's datum (Datum). `falsed` - Both easting and northing are falsed (`str`). `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: `RangeError` - If easting or northing outside the valid UTM range. `UTMError` - Invalid zone, hemishere or band. Overrides: object.__init__ Example:
    >>> import pygeodesy
    >>> u = pygeodesy.Utm(31, 'N', 448251, 5411932)

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

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

### copy(self) |
Copy this UTM coordinate. Returns: The copy (Utm or subclass thereof). Overrides: bases._Named.copy

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

### toLatLon(self, LatLon=None, eps=2.22044604925e-16, unfalse=True) |
Convert this UTM coordinate to an (ellipsoidal) geodetic point. Parameters: `LatLon` - Optional, ellipsoidal (sub-)class to return the point (`LatLon`) or `None`. `eps` - Optional convergence limit, EPS or above (`float`). `unfalse` - Unfalse easting and northing if falsed (`bool`). Returns: This UTM coordinate as (LatLon) or 5-tuple (lat, lon, datum, convergence, scale) if LatLon is `None`. 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`). Overrides: bases._Based.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: bases._Based.toStr2

### toUps(self, pole=`'````'`, eps=2.22044604925e-16, **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. Returns: The UPS coordinate (Ups).

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

Property Details

### band Get the (latitudinal) band (`str`, 'C'..'X' or ''). Get Method: band(self) - Get the (latitudinal) band (`str`, 'C'..'X' or ''). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### convergence Get the meridian convergence (`degrees`) or `None`. Get Method: convergence(self) - Get the meridian convergence (`degrees`) or `None`. Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### datum Get the datum (Datum). Get Method: datum(self) - Get the datum (Datum). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### easting Get the easting (`meter`). Get Method: easting(self) - Get the easting (`meter`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### falsed Get the easting and northing falsing (`bool`). Get Method: falsed(self) - Get the easting and northing falsing (`bool`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### hemisphere Get the hemisphere (`str`, 'N'|'S'). Get Method: hemisphere(self) - Get the hemisphere (`str`, 'N'|'S'). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### northing Get the northing (`meter`). Get Method: northing(self) - Get the northing (`meter`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### scale Get the grid scale (`scalar`) or `None`. Get Method: scale(self) - Get the grid scale (`scalar`) or `None`. Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### zone Get the (longitudinal) zone (`int`, 1..60). Get Method: zone(self) - Get the (longitudinal) zone (`int`, 1..60). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.