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) Convert this UPS coordinate to an (ellipsoidal) geodetic point. |
toMgrs(self) Convert this UPS coordinate to an MGRS grid reference. |
toStr(self, prec=0, sep=`'``` `'`, B=False, cs=False) Return a string representation of this UPS coordinate. |
toStr2(self, prec=0, fmt=`'``[%s]``'`, 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__`, `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 An immutable property (`Read Only`).
| falsed2 An immutable property (`Read Only`).
| hemisphere An immutable property (`Read Only`).
| pole An immutable property (`Read Only`).
| zone An immutable property (`Read Only`).
Inherited from `utmupsBase.UtmUpsBase`: `convergence`, `datum`, `easting`, `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. Parameters: `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` or `band`. 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. Parameters: `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`. `ValueError` - Invalid `scale`.

### toLatLon(self, LatLon=None, unfalse=True) |
Convert this UPS coordinate to an (ellipsoidal) geodetic point. Parameters: `LatLon` - Optional, ellipsoidal (sub-)class to return the point (`LatLon`) or `None`. `unfalse` - Unfalse `easting` and `northing` if falsed (`bool`). Returns: This UPS coordinate as (`LatLon`) or A LatLonDatum5Tuple`(lat, lon, datum, convergence, scale)` if `LatLon` is `None`. 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.

### 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). Parameters: `prec` - Optional number of decimals, unstripped (`int`). `sep` - Optional separator to join (`str`). `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.

### toStr2(self, prec=0, fmt=`'``[%s]``'`, 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). 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 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.toStr2 Note: Pseudo zone zero (`"00"`) for UPS follows Karney's zone UPS.

### toUps(self, pole=`'````'`, **unused) |
Duplicate this UPS coordinate. Parameters: `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. Parameters: `zone` - The UTM zone (`int`). `falsed` - False both easting and northing (`bool`). Returns: The UTM coordinate (Utm).

Property Details

### band An immutable property (`Read Only`). Get Method: band(self) - Get the polar band letter ('A', 'B', 'Y' or 'Z'). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

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

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

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

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