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

Class Ups

   object --+            
            |            
 named._Named --+        
                |        
 named._NamedBase --+    
                    |    
utmupsBase.UtmUpsBase --+
                        |
                       Ups
Known Subclasses:

Universal Polar Stereographic (UPS) coordinate.

Instance Methods
 
__init__(self, zone=0, pole='N', easting=2000000.0, northing=2000000.0, band='', datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., falsed=True, gamma=None, scale=None, **name_convergence)
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.
 
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, toMgrs

Inherited from named._NamedBase: others

Inherited from named._Named: __imatmul__, __matmul__, __rmatmul__, attrs, classof, copy, dup, methodname, rename, renamed, toStr2

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties
  band
Class property with a .name attribute.
  falsed2
  pole
  zone

Inherited from utmupsBase.UtmUpsBase: convergence, datum, easting, eastingnorthing, falsed, gamma, hemisphere, northing, scale, scale0

Inherited from named._Named: classname, classnaming, iteration, name, named, named2, named3, named4, sizeof

Inherited from object: __class__

Method Details

__init__ (self, zone=0, pole='N', easting=2000000.0, northing=2000000.0, band='', datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran..., falsed=True, gamma=None, scale=None, **name_convergence)
(Constructor)

 

New Ups UPS coordinate.

Arguments:
  • zone - UPS zone (int, zero) or zone with/-out polar 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 - If True, both easting and northing are falsed (bool).
  • gamma - Optional meridian convergence, bearing off grid North, clockwise from true North to save (degrees) or None.
  • scale - Optional grid scale factor to save (scalar) or None.
  • name_convergence - Optional name=NN (str) and DEPRECATED keyword argument convergence=None, use gamma.
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 name=NN (str), overriding this name.
Returns:
The similar instance (Ups).
Raises:

See Also: Functions parseUTM5 and pygeodesy.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:

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 is None.
Returns:
This UPS coordinate (LatLon) or if LatLon is None, a LatLonDatum5Tuple(lat, lon, datum, gamma, scale).
Raises:
  • TypeError - If LatLon is not ellipsoidal.
  • UPSError - Invalid meridional radius or H-value.

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 - Number of (decimal) digits, unstripped (int).
  • fmt - 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 - Number of (decimal) digits, unstripped (int).
  • sep - Optional separator to join (str) or None to return an unjoined tuple of strs.
  • 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

Class property with a .name attribute.

Get method:
band(self) - Get the polar band ('A'|'B'|'Y'|'Z').
Set method:
band(self, band) - Set or reset the polar band letter ('A'|'B'|'Y'|'Z') or None or "" to reset.

falsed2

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

pole

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.

zone

Get method:
_fget(inst) - Get and cache/memoize the property value.
Set method:
_fset_error(inst, val) - Throws an AttributeError, always.
Delete Method:
_fdel(inst) - Zap the cached/memoized property value.