Package pygeodesy :: Module css :: Class CassiniSoldner |
[frames] | no frames]

# Class CassiniSoldner

      object --+
               |
    named._Named --+
                   |
    named._NamedBase --+
                       |
                      CassiniSoldner

Cassini-Soldner projection, a Python version of Karney's C++ class CassiniSoldner.

Instance Methods
__init__(self, lat0, lon0, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, name=`'````'`) New CassiniSoldner projection. |
forward(self, lat, lon) Convert an (ellipsoidal) geodetic location to Cassini-Soldner easting and northing. |
forward4(self, lat, lon) Convert an (ellipsoidal) geodetic location to Cassini-Soldner easting and northing. |
reset(self, lat0, lon0) Set or reset the center point of this Cassini-Soldner projection. |
reverse(self, easting, northing, LatLon=None, **LatLon_kwds) Convert a Cassini-Soldner location to (ellipsoidal) geodetic lat- and longitude. |
toLatLon(self, easting, northing, LatLon=None, **LatLon_kwds) Convert a Cassini-Soldner location to (ellipsoidal) geodetic lat- and longitude. |
reverse4(self, easting, northing) Convert a Cassini-Soldner location to (ellipsoidal) geodetic lat- and longitude. |
toRepr(self, prec=6, **unused) Return a string representation of this projection. |
toStr(self, prec=6, sep=`'``` `'`, **unused) Return a string representation of this projection. |
Inherited from `named._NamedBase`: `__repr__`, `__str__`, `others` Inherited from `named._Named`: `_dot_`, `attrs`, `classof`, `copy`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| datum Get the datum (Datum).
| flattening Get the geodesic's flattening (`float`).
| geodesic Get this projection's wrapped Karney Geodesic, provided package geographiclib is installed.
| lat0 Get the center latitude (`degrees90`).
| latlon0 Get the center lat- and longitude (LatLon2Tuple`(lat, lon)`) in (`degrees90`, (`degrees180`).
| lon0 Get the center longitude (`degrees180`).
| majoradius Get the geodesic's major (equatorial) radius (`float`).
Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2` Inherited from `object`: `__class__`

Method Details

### __init__ (self, lat0, lon0, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, name=`'````'`) (Constructor) |
New CassiniSoldner projection. Arguments: `lat0` - Latitude of center point (`degrees90`). `lon0` - Longitude of center point (`degrees180`). `datum` - Optional, the geodesic datum (Datum). `name` - Optional name (`str`). Raises: `ImportError` - Package GeographicLib missing. Overrides: object.__init__ Example:
    >>> p = CassiniSoldner(48 + 50/60.0, 2 + 20/60.0)  # Paris
    >>> p.forward(50.9, 1.8)  # Calais
    (-37518.854545, 230003.561828)
    >>> p.reverse4(-38e3, 230e3)
    (50.899937, 1.793161, 89.580797, 0.999982)

### forward (self, lat, lon) |
Convert an (ellipsoidal) geodetic location to Cassini-Soldner easting and northing. Arguments: `lat` - Latitude of the location (`degrees90`). `lon` - Longitude of the location (`degrees180`). Returns: An EasNor2Tuple`(easting, northing)`. See Also: Methods CassiniSoldner.forward4, CassiniSoldner.reverse and CassiniSoldner.reverse4.

### forward4 (self, lat, lon) |
Convert an (ellipsoidal) geodetic location to Cassini-Soldner easting and northing. Arguments: `lat` - Latitude of the location (`degrees90`). `lon` - Longitude of the location (`degrees180`). Returns: An EasNorAziRk4Tuple`(easting, northing, azimuth, reciprocal)`. See Also: Method CassiniSoldner.forward, CassiniSoldner.reverse and CassiniSoldner.reverse4.

### reset (self, lat0, lon0) |
Set or reset the center point of this Cassini-Soldner projection. Arguments: `lat0` - Center point latitude (`degrees90`). `lon0` - Center point longitude (`degrees180`).

### reverse (self, easting, northing, LatLon=None, **LatLon_kwds) |
Convert a Cassini-Soldner location to (ellipsoidal) geodetic lat- and longitude. Arguments: `easting` - Easting of the location (`meter`). `northing` - Northing of the location (`meter`). `LatLon` - Optional, ellipsoidal class to return the geodetic location as (`LatLon`) or `None`. `LatLon_kwds` - Optional (`LatLon`) keyword arguments, ignored if `LatLon=None`. Returns: Geodetic location `LatLon` or if `LatLon` is `None`, a LatLon2Tuple`(lat, lon)`. Raises: `CSSError` - Ellipsoidal mismatch of `LatLon` and this projection. `TypeError` - Invalid `LatLon` or `LatLon_kwds`. See Also: Method CassiniSoldner.reverse4, CassiniSoldner.forward and CassiniSoldner.forward4.

### toLatLon (self, easting, northing, LatLon=None, **LatLon_kwds) |
Convert a Cassini-Soldner location to (ellipsoidal) geodetic lat- and longitude. Arguments: `easting` - Easting of the location (`meter`). `northing` - Northing of the location (`meter`). `LatLon` - Optional, ellipsoidal class to return the geodetic location as (`LatLon`) or `None`. `LatLon_kwds` - Optional (`LatLon`) keyword arguments, ignored if `LatLon=None`. Returns: Geodetic location `LatLon` or if `LatLon` is `None`, a LatLon2Tuple`(lat, lon)`. Raises: `CSSError` - Ellipsoidal mismatch of `LatLon` and this projection. `TypeError` - Invalid `LatLon` or `LatLon_kwds`. See Also: Method CassiniSoldner.reverse4, CassiniSoldner.forward and CassiniSoldner.forward4.

### reverse4 (self, easting, northing) |
Convert a Cassini-Soldner location to (ellipsoidal) geodetic lat- and longitude. Arguments: `easting` - Easting of the location (`meter`). `northing` - Northing of the location (`meter`). Returns: A LatLonAziRk4Tuple`(lat, lon, azimuth, reciprocal)`. See Also: Method CassiniSoldner.reverse, CassiniSoldner.forward and CassiniSoldner.forward4.

### toRepr (self, prec=6, **unused) |
Return a string representation of this projection. Arguments: `prec` - Optional number of decimals, unstripped (`int`). Returns: This projection as `"<classname>(lat0, lon0, ...)"` (`str`). Overrides: named._Named.toRepr

### toStr (self, prec=6, sep=`'``` `'`, **unused) |
Return a string representation of this projection. Arguments: `prec` - Optional number of decimal, unstripped (`int`). `sep` - Optional separator to join (`str`). Returns: This projection as `"lat0 lon0"` (`str`). Raises: `_AssertionError` - Always, see function notOverloaded. Overrides: named._Named.toStr

Property Details

### datum Get the datum (Datum). Get method: datum(self) - Get the datum (Datum). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### flattening Get the geodesic's flattening (`float`). Get method: flattening(self) - Get the geodesic's flattening (`float`). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### geodesic Get this projection's wrapped Karney Geodesic, provided package geographiclib is installed. Get method: geodesic(self) - Get this projection's wrapped Karney Geodesic, provided package geographiclib is installed. Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### lat0 Get the center latitude (`degrees90`). Get method: lat0(self) - Get the center latitude (`degrees90`). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### latlon0 Get the center lat- and longitude (LatLon2Tuple`(lat, lon)`) in (`degrees90`, (`degrees180`). Get method: latlon0(self) - Get the center lat- and longitude (LatLon2Tuple`(lat, lon)`) in (`degrees90`, (`degrees180`). Set method: latlon0(self, latlon0) - Set the center lat- and longitude (LatLon2Tuple, ellipsoidal `LatLon` or LatLon4Tuple).

### lon0 Get the center longitude (`degrees180`). Get method: lon0(self) - Get the center longitude (`degrees180`). Set method: immutable(inst, value) - Throws an `AttributeError`, always.

### majoradius Get the geodesic's major (equatorial) radius (`float`). Get method: majoradius(self) - Get the geodesic's major (equatorial) radius (`float`). Set method: immutable(inst, value) - Throws an `AttributeError`, always.