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

# Class Ups

      object --+
               |
    bases._Named --+
                   |
        bases._Based --+
                       |
                      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 coordinate. |
__repr__(self) repr(x) |
__str__(self) str(x) |
copy(self) Copy this UPS coordinate. |
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, **unused) Convert this UPS coordinate to a UTM coordinate. |
Inherited from `bases._Based`: `classof`, `others` 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').
| convergence Get the gamma meridian convergence (`degrees`) or `None`).
| datum Get the datum (Datum).
| easting Get the (falsed) easting (`meter`).
| falsed Get the easting and northing falsing (`meter`) or `0`.
| hemisphere Get the hemisphere (`str`, 'N'|'S').
| northing Get the (falsed) northing (`meter`).
| pole Get the center of (stereographic) projection (N|S).
| scale Get the point scale factor (`scalar` or `None`).
| scale0 Get the central scale factor (`scalar` or `None`).
| zone Get the polar zone (c{int}), like Karney's zone UPS.
Inherited from `bases._Named`: `classname`, `classnaming`, `name` 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 coordinate. Parameters: `zone` - UPS zone (`int`, zero) or zone with/-out Band letter (`str`, '00'|'00A'|'00B'|'00Y'|'00Z'). `pole` - Top/center of (stereographic) projection (`str`, `'N[orth]'` or `'S[outh]'`). `easting` - Easting (`meter`). `northing` - Northing (`meter`). `band` - Optional, polar band (`str`, 'A'|'B'|'Y'|'Z'). `datum` - Optional, this coordinate's datum (Datum). `falsed` - Both easting and northing are falsed (`str`). `convergence` - Optionally, save gamma meridian convergence (`degrees`). `scale` - Optionally, save computed k scale (`scalar`). `name` - Optional name (`str`). Raises: `UPSError` - Invalid zone, pole or band. Overrides: object.__init__

### __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 UPS coordinate. Returns: The copy (Ups or subclass thereof). Overrides: bases._Named.copy

### 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 rangerrrors 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 5-tuple (`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: Function toMgrs in module mgrs.

### 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`). Overrides: bases._Based.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: bases._Based.toStr2 Note: 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, **unused) |
Convert this UPS coordinate to a UTM coordinate. Parameters: `zone` - The UTM zone (`int`). 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: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### convergence Get the gamma meridian convergence (`degrees`) or `None`). Get Method: convergence(self) - Get the gamma 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 (falsed) easting (`meter`). Get Method: easting(self) - Get the (falsed) easting (`meter`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### falsed Get the easting and northing falsing (`meter`) or `0`. Get Method: falsed(self) - Get the easting and northing falsing (`meter`) or `0`. 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 (falsed) northing (`meter`). Get Method: northing(self) - Get the (falsed) northing (`meter`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### pole Get the center of (stereographic) projection (N|S). Get Method: pole(self) - Get the center of (stereographic) projection (N|S). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

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

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

### zone Get the polar zone (c{int}), like Karney's zone UPS. Get Method: zone(self) - Get the polar zone (c{int}), like Karney's zone UPS. Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.