Package pygeodesy :: Module ltp :: Class ChLV
[frames] | no frames]

Class ChLV

              object --+    
                       |    
                   _ChLV --+
                           |
  object --+               |
           |               |
named._Named --+           |
               |           |
named._NamedBase --+       |
                   |       |
      LocalCartesian --+   |
                       |   |
                     Ltp --+
                           |
                          ChLV

Conversion between WGS84 geodetic and Swiss projection coordinates using pygeodesy.EcefKarney's Earth-Centered, Earth-Fixed (ECEF) methods.


See Also: Swiss projection formulas<, pp 7-9.

Instance Methods
 
__init__(self, latlonh0=Bern(lat=46.952406, lon=7.439583, height=49.55, datum=Datum(na..., **Ltp_kwds)
New ChLV pygeodesy.EcefKarney WGS84-Swiss converter, centered at Bern, Ch.
 
forward(self, latlonh, lon=None, height=0, M=None, name='')
Convert WGS84 geodetic to Swiss projection coordinates.
 
reverse(self, enh_, n=None, h_=0, M=None, name='')
Convert I{Swiss} projection to WGS84 geodetic coordinates.

Inherited from LocalCartesian: __eq__, reset, toStr

Inherited from named._NamedBase: __repr__, __str__, others, toRepr

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

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

Static Methods
 
false2(Y, X, LV95=True)
Add the LV95 or LV03 falsing.
 
isLV95(e, n, raiser=True)
Determine the falsing as LV95, LV03 or neither.
 
unfalse2(e, n, LV95=None)
Remove the LV95 or LV03 falsing.
Class Variables
  Bern = Bern(lat=46.952406, lon=7.439583, height=49.55, datum=D...
Properties

Inherited from Ltp: ecef

Inherited from LocalCartesian: M, datum, height0, lat0, latlonheight0, lon0

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

Inherited from object: __class__

Method Details

__init__ (self, latlonh0=Bern(lat=46.952406, lon=7.439583, height=49.55, datum=Datum(na..., **Ltp_kwds)
(Constructor)

 

New ChLV pygeodesy.EcefKarney WGS84-Swiss converter, centered at Bern, Ch.

Arguments:
  • latlonh0 - Either a LatLon, Ltp, Ecef9Tuple or scalar latitude of the (goedetic) origin (degrees).
  • lon0 - Optional scalar longitude of the (goedetic) origin for scalar latlonh0 (degrees).
  • height0 - Optional origin height (meter), vertically above (or below) the surface of the ellipsoid.
  • ecef - Optional ECEF converter (EcefKarney, l{EcefFarrell21}, EcefFarrell22, EcefSudano, EcefVeness or EcefYou instance), overriding default EcefKarney(datum=Datums.WGS84).
  • name - Optional name (str).
Returns:
New instance (Ltp).
Raises:
  • LocalError - If latlonh0 not LatLon, Ecef9Tuple, scalar or invalid or if lon0 not scalar for scalar latlonh0 or invalid or if height0 invalid.
  • TypeError - Invalid ecef.
Overrides: object.__init__

See Also: Ltp.__init__ for more information.

forward (self, latlonh, lon=None, height=0, M=None, name='')

 

Convert WGS84 geodetic to Swiss projection coordinates.

Arguments:
  • latlonh - Either a LatLon, Ltp or scalar (geodetic) latitude (degrees).
  • lon - Optional, scalar (geodetic) longitude for scalar latlonh (degrees).
  • height - Optional, height, vertically above (or below) the surface of the ellipsoid (meter) for scalar latlonh.
  • M - Optionally, return the concatenated rotation EcefMatrix, iff avaialble (bool).
  • name - Optional name (str).
Returns:
A ChLV9Tuple(Y, X, h_, lat, lon, height, ltp, ecef, M) with unfalsed Swiss Y, X, h_ coordinates and height, the given geodetic (lat, lon, height, this ChLV* and ecef (Ecef9Tuple) at Bern, Ch and rotation matrix M.
Raises:
  • LocalError - If latlonh not scalar, LatLon or Ltp, invalid or if lon not scalar for scalar latlonh or invalid or if height invalid.
Overrides: LocalCartesian.forward
(inherited documentation)

reverse (self, enh_, n=None, h_=0, M=None, name='')

 
Convert I{Swiss} projection to WGS84 geodetic coordinates.

@arg enh_: A Swiss projection (L{ChLV9Tuple}) or the C{scalar}, I{falsed Swiss
           E_LV95} or I{y_LV03} coordinate (C{meter}).
@kwarg n: I{Falsed Swiss N_LV85} or I{x_LV03} coordinate for C{scalar}
          B{C{enh_}} and B{C{h_}} (C{meter}).
@kwarg h_: I{Swiss h'} height for C{scalar} B{C{enh_}} and B{C{n}} (C{meter}).
@kwarg M: Optionally, return the I{concatenated} rotation L{EcefMatrix}, I{iff
          avaialble} (C{bool}).
@kwarg name: Optional name (C{str}).

@return: A L{ChLV9Tuple}C{(Y, X, h_, lat, lon, height, ltp, ecef, M)} with
         the I{unfalsed Swiss (Y, X, h_)} coordinates and height, I{geodetic}
         C{(lat, lon, height)}, this C{ChLV*} and C{ecef} (L{Ecef9Tuple})
         I{at Bern, Ch} and with rotation matrix C{B{M}=None}.

@note: The returned C{ltp} is this C{ChLV}, C{ChLVa} or C{ChLVe} instance.

@raise LocalError: Invalid B{C{enh_}} or B{C{n}} or B{C{h_}} not C{scalar}
                   for C{scalar} B{C{enh_}.

Arguments:
  • xyz - A local (XyzLocal, Enu, Ned, Aer, Local9Tuple) or local x coordinate (scalar).
  • y - Local y coordinate for scalar xyz and z (meter).
  • z - Local z coordinate for scalar xyz and y (meter).
  • M - Optionally, return the concatenated rotation EcefMatrix, iff avaialble (bool).
  • name - Optional name (str).
Returns:
An Local9Tuple(x, y, z, lat, lon, height, ltp, ecef, M) with local x, y, z, geodetic lat, lon, height, this ltp, an ecef (Ecef9Tuple) with the geocentric x, y, z (and geodetic lat, lon, height) and the concatenated rotation matrix M (EcefMatrix) if requested.
Raises:
  • LocalError - Invalid xyz or scalar x or y and/or z not scalar for scalar xyz.
Overrides: LocalCartesian.reverse
(inherited documentation)

false2 (Y, X, LV95=True)
Static Method

 

Add the LV95 or LV03 falsing.

Arguments:
  • Y - Unfalsed Swiss Y coordinate, easting (meter).
  • X - Unfalsed Swiss X coordinate, northing (meter).
  • LV95 - Add LV95 or LV03 if True respectively False, otherwise don't false.
Returns:
2-Tuple (e, n) with falsed Y respectively X.

isLV95 (e, n, raiser=True)
Static Method

 

Determine the falsing as LV95, LV03 or neither.

Arguments:
  • e - Falsed Swiss E_LV95 or y_LV03 coordinate (meter).
  • n - Falsed Swiss N_LV95 or x_LV03 coordinate (meter).
  • raiser - If True, throw a LocalError if e and n are invalid LV95 and LLV03.
Returns:
True or False if e and n are valid LV95 respectively LV03 coordinates, None otherwise.

unfalse2 (e, n, LV95=None)
Static Method

 

Remove the LV95 or LV03 falsing.

Arguments:
  • e - Falsed Swiss E_LV95 or y_LV03 coordinate (meter).
  • n - Falsed Swiss N_LV95 or x_LV03 coordinate (meter).
  • LV95 - Remove the LV95 falsing if True, remove the LV03 falsing if False, otherwise use method isLV95(e, n).
Returns:
2-Tuple (Y, X), unfalsed e, respectively n.

Class Variable Details

Bern

Value:
Bern(lat=46.952406, lon=7.439583, height=49.55, datum=Datum(name='WGS8\
4', ellipsoid=Ellipsoids.WGS84, transform=Transforms.WGS84))