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

# Class Ups

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

Known Subclasses:
  - _UpsK1

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) |
parseUPS(self, strUPS) Parse a string to a UPS coordinate. |
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. |
toStr2(self, prec=0, fmt=`'``[%s]``'`, sep=`'``,` `'`, B=False, cs=False, **unused) DEPRECATED, use method Ups.toRepr. |
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` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| band Get the polar band letter ('A', 'B', 'Y' or 'Z').
| falsed2 Get the easting and northing falsing (EasNor2Tuple`(easting, northing)`).
| hemisphere Get the hemisphere (`str`, '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` 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). `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: `UPSError` - Invalid `zone`, `pole`, `easting`, `northing`, `band`, `convergence` or `scale`. Overrides: object.__init__

### parseUPS (self, strUPS) |
Parse a string to a UPS coordinate. Returns: The coordinate (Ups). See Also: Function parseUPS5 in this module ups.

### 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`). 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.

### toStr2 (self, prec=0, fmt=`'``[%s]``'`, sep=`'``,` `'`, B=False, cs=False, **unused) |
DEPRECATED, use method Ups.toRepr. 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`). 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`). 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`). Raises: `_AssertionError` - Always, see function notOverloaded. 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 copt 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' or 'Z'). Get method: band(self) - Get the polar band letter ('A', 'B', 'Y' or 'Z'). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

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

### hemisphere Get the hemisphere (`str`, 'N'|'S'). Get method: hemisphere(self) - Get the hemisphere (`str`, 'N'|'S'). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

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

### zone Get the polar pseudo zone (`0`), like Karney's zone UPS. Get method: zone(self) - Get the polar pseudo zone (`0`), like Karney's zone UPS. Set method: immutable(inst, value) - Throws an `AttributeError`, always.