Package pygeodesy :: Module ups :: Class Ups |
[frames] | no frames]

# Class Ups

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

Known Subclasses:
  - _Ups_K1

Universal Polar Stereographic (UPS) coordinate.

Instance Methods
__init__(self, zone, pole, easting, northing, band='', datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, falsed=True, convergence=None, scale=None, name='') New Ups UPS coordinate. |
__eq__(self, other) |
parse(self, strUPS, name='') Parse a string to a similar Ups instance. |
parseUPS(self, strUPS) DEPRECATED, use method parse. |
rescale0(self, lat, scale0=0.994) Set the central scale factor for this UPS projection. |
toLatLon(self, LatLon=None, unfalse=True, **LatLon_kwds) Convert this UPS coordinate to an (ellipsoidal) geodetic point. |
toMgrs(self) Convert this UPS coordinate to an MGRS grid reference. |
toRepr(self, prec=0, fmt='[%s]', sep=', ', B=False, cs=False, **unused) Return a string representation of this UPS coordinate. |
toStr(self, prec=0, sep=' ', B=False, cs=False) Return a string representation of this UPS coordinate. |
toUps(self, pole='', **unused) Duplicate this UPS coordinate. |
toUtm(self, zone, falsed=True, **unused) Convert this UPS coordinate to a UTM coordinate. |
Inherited from `utmupsBase.UtmUpsBase`: `__repr__`, `__str__`, `eastingnorthing2`, `to2en`, `toEpsg` Inherited from `named._NamedBase`: `others` Inherited from `named._Named`: `_DOT_`, `attrs`, `classof`, `copy`, `rename`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| band Get the polar band letter (`'A'|'B'|'Y'|'Z'`).
| falsed2 Get the easting and northing falsing (EasNor2Tuple`(easting, northing)`).
| hemisphere Get the hemisphere (`'N'|'S'`).
| pole Get the top/center of (stereographic) projection (`'N'|'S'` or `""`).
| zone Get the polar pseudo zone (`0`), like Karney's zone UPS.
Inherited from `utmupsBase.UtmUpsBase`: `convergence`, `datum`, `easting`, `eastingnorthing`, `falsed`, `northing`, `scale`, `scale0` Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4` Inherited from `object`: `__class__`

Method Details

### __init__ (self, zone, pole, easting, northing, band='', datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, falsed=True, convergence=None, scale=None, name='') (Constructor) |
New Ups UPS coordinate. Arguments: `zone` - UPS zone (`int`, zero) or zone with/-out Band letter (`str`, '00', '00A', '00B', '00Y' or '00Z'). `pole` - Top/center of (stereographic) projection (`str`, `'N[orth]'` or `'S[outh]'`). `easting` - Easting, see `falsed` (`meter`). `northing` - Northing, see `falsed` (`meter`). `band` - Optional, polar Band (`str`, 'A'|'B'|'Y'|'Z'). `datum` - Optional, this coordinate's datum (Datum, Ellipsoid, Ellipsoid2 or a_f2Tuple). `falsed` - Both `easting` and `northing` are falsed (`bool`). `convergence` - Optional, meridian convergence gamma to save (`degrees`). `scale` - Optional, computed scale factor k to save (`scalar`). `name` - Optional name (`str`). Raises: `TypeError` - Invalid `datum`. `UPSError` - Invalid `zone`, `pole`, `easting`, `northing`, `band`, `convergence` or `scale`. Overrides: object.__init__

### parse (self, strUPS, name='') |
Parse a string to a similar Ups instance. Arguments: `strUPS` - The UPS coordinate (`str`), see function parseUPS5. `name` - Optional instance name (`str`), overriding this name. Returns: The similar instance (Ups). Raises: `UTMError` - Invalid `strUPS`. See Also: Function parseUTM5 and parseUTMUPS5.

### parseUPS (self, strUPS) |
DEPRECATED, use method parse. Decorators: `@deprecated_method`

### rescale0 (self, lat, scale0=0.994) |
Set the central scale factor for this UPS projection. Arguments: `lat` - Northern latitude (`degrees`). `scale0` - UPS k0 scale at `lat` latitude (`scalar`). Raises: `RangeError` - If `lat` outside the valid range and rangerrors set to `True`. `UPSError` - Invalid `scale`.

### toLatLon (self, LatLon=None, unfalse=True, **LatLon_kwds) |
Convert this UPS coordinate to an (ellipsoidal) geodetic point. Arguments: `LatLon` - Optional, ellipsoidal class to return the geodetic point (`LatLon`) or `None`. `unfalse` - Unfalse `easting` and `northing` if falsed (`bool`). `LatLon_kwds` - Optional, additional `LatLon` keyword arguments, ignored if `LatLon=None`. Returns: This UPS coordinate (`LatLon`) or if `LatLon` is `None`, a LatLonDatum5Tuple`(lat, lon, datum, convergence, scale)`. Raises: `TypeError` - If `LatLon` is not ellipsoidal. `UPSError` - Invalid meridional radius or H-value.

### toMgrs (self) |
Convert this UPS coordinate to an MGRS grid reference. Returns: The MGRS grid reference (Mgrs). See Also: Methods Ups.toUtm and Utm.toMgrs.

### toRepr (self, prec=0, fmt='[%s]', sep=', ', B=False, cs=False, **unused) |
Return a string representation of this UPS coordinate. Note that UPS coordinates are rounded, not truncated (unlike MGRS grid references). Arguments: `prec` - Optional number of decimals, unstripped (`int`). `fmt` - Optional, enclosing backets format (`str`). `sep` - Optional separator between name:value pairs (`str`). `B` - Optionally, include polar band letter (`bool`). `cs` - Optionally, include gamma meridian convergence and point scale factor (`bool` or non-zero `int` to specify the precison like `prec`). Returns: This UPS as a string with `00[Band] pole, easting, northing, [convergence, scale]` as `"[Z:00[Band], P:N|S, E:meter, N:meter]"` plus `", C:DMS, S:float"` if `cs` is `True`, where `[Band]` is present and `'A'|'B'|'Y'|'Z'` only if `B` is `True` and convergence `DMS` is in either degrees, minutes or seconds (`str`). Overrides: named._Named.toRepr Note: Pseudo zone zero (`"00"`) for UPS follows Karney's zone UPS.

### toStr (self, prec=0, sep=' ', B=False, cs=False) |
Return a string representation of this UPS coordinate. Note that UPS coordinates are rounded, not truncated (unlike MGRS grid references). Arguments: `prec` - Optional number of decimals, unstripped (`int`). `sep` - Optional separator to join (`str`) or `None` to return an unjoined `tuple` of `str`s. `B` - Optionally, include and polar band letter (`bool`). `cs` - Optionally, include gamma meridian convergence and point scale factor (`bool` or non-zero `int` to specify the precison like `prec`). Returns: This UPS as a string with `00[Band] pole, easting, northing, [convergence, scale]` as `"00[B] N|S meter meter"` plus `" DMS float"` if `cs` is `True`, where `[Band]` is present and `'A'|'B'|'Y'|'Z'` only if `B` is `True` and convergence `DMS` is in either degrees, minutes or seconds (`str`). Overrides: named._Named.toStr Note: Zone zero (`"00"`) for UPS follows Karney's zone UPS.

### toUps (self, pole='', **unused) |
Duplicate this UPS coordinate. Arguments: `pole` - Optional top/center of the UPS projection, (`str`, 'N[orth]'|'S[outh]'). Returns: A copy of this UPS coordinate (Ups). Raises: `UPSError` - Invalid `pole` or attempt to transfer the projection top/center.

### toUtm (self, zone, falsed=True, **unused) |
Convert this UPS coordinate to a UTM coordinate. Arguments: `zone` - The UTM zone (`int`). `falsed` - False both easting and northing (`bool`). Returns: The UTM coordinate (Utm).

Property Details

### band Get the polar band letter (`'A'|'B'|'Y'|'Z'`). Get method: _fget(inst) Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst)

### falsed2 Get the easting and northing falsing (EasNor2Tuple`(easting, northing)`). Get method: _fget(inst) Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst)

### hemisphere Get the hemisphere (`'N'|'S'`). Get method: _fget(inst) Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst)

### pole Get the top/center of (stereographic) projection (`'N'|'S'` or `""`). Get method: _fget(inst) Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst)

### zone Get the polar pseudo zone (`0`), like Karney's zone UPS. Get method: _fget(inst) Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst)