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

# Class CassiniSoldner

      object --+
               |
    bases._Named --+
                   |
        bases._Based --+
                       |
                      CassiniSoldner

A Python version of Charles Karney's CassiniSoldner C++ class.

Instance Methods
__init__(self, lat0, lon0, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, name=`'````'`) New CassiniSoldner projection. |
copy(self) Copy this Cassini-Soldner projection. |
forward(self, lat, lon) Convert an (ellipsoidal) geodetic location Cassini-Soldner easting and northing. |
forward4(self, lat, lon) Convert an (ellipsoidal) geodetic location Cassini-Soldner easting and northing. |
reset(self, lat0, lon0) Set the center point of this projection. |
reverse(self, easting, northing, LatLon=None) Convert a Cassini-Soldner location to (ellipsoidal) geodetic lat- and longitude. |
toLatLon(self, easting, northing, LatLon=None) 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. |
toStr(self, prec=6, sep=`'``` `'`) Return a string representation of this projection. |
toStr2(self, prec=6) Return a string representation of this projection. |
Inherited from `bases._Based`: `__repr__`, `__str__`, `classof`, `others` 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 Geodesic, provided package geographiclib is installed.
| lat0 Get the center latitude (`degrees90`).
| latlon0 Get the center lat- and longitude (`degrees90`, `degrees180`).
| lon0 Get the center longitude (`degrees180`).
| majoradius Get the geodesic's major (equatorial) radius (`float`).
Inherited from `bases._Named`: `classname`, `classnaming`, `name` Inherited from `object`: `__class__`

Method Details

### __init__(self, lat0, lon0, datum=Datum(name='WGS84', ellipsoid=Ellipsoids.WGS84, transform=Tran`...`, name=`'````'`) (Constructor) |
New CassiniSoldner projection. Parameters: `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)

### copy(self) |
Copy this Cassini-Soldner projection. Returns: The copy (Utm or subclass thereof). Overrides: bases._Named.copy

### forward(self, lat, lon) |
Convert an (ellipsoidal) geodetic location Cassini-Soldner easting and northing. Parameters: `lat` - Latitude of the location (`degrees90`). `lon` - Longitude of the location (`degrees180`). Returns: 2-Tuple (`easting, northing`) with `easting` and `northing` in `meters`.

### forward4(self, lat, lon) |
Convert an (ellipsoidal) geodetic location Cassini-Soldner easting and northing. Parameters: `lat` - Latitude of the location (`degrees90`). `lon` - Longitude of the location (`degrees180`). Returns: 4-Tuple (`easting, northing, azi, rk`) for the Cassini-Soldner location with `easting` and `northing` in `meters`, the azimuth of easting direction `azi` and the reciprocal of azimuthal northing scale `rk` in `degrees`.

### reset(self, lat0, lon0) |
Set the center point of this projection. Parameters: `lat0` - Latitude of center point (`degrees90`). `lon0` - Longitude of center point (`degrees180`).

### reverse(self, easting, northing, LatLon=None) |
Convert a Cassini-Soldner location to (ellipsoidal) geodetic lat- and longitude. Parameters: `easting` - Easting of the location (`meter`). `northing` - Northing of the location (`meter`). `LatLon` - Optional, ellipsoidal (sub-)class to return the location as (`LatLon`) or `None`. Returns: Geodetic location as LatLon or 2-tuple (`lat, lon`) if LatLon is `None`. Raises: `TypeError` - If LatLon is not ellipsoidal.

### toLatLon(self, easting, northing, LatLon=None) |
Convert a Cassini-Soldner location to (ellipsoidal) geodetic lat- and longitude. Parameters: `easting` - Easting of the location (`meter`). `northing` - Northing of the location (`meter`). `LatLon` - Optional, ellipsoidal (sub-)class to return the location as (`LatLon`) or `None`. Returns: Geodetic location as LatLon or 2-tuple (`lat, lon`) if LatLon is `None`. Raises: `TypeError` - If LatLon is not ellipsoidal.

### reverse4(self, easting, northing) |
Convert a Cassini-Soldner location to (ellipsoidal) geodetic lat- and longitude. Parameters: `easting` - Easting of the location (`meter`). `northing` - Northing of the location (`meter`). Returns: 4-Tuple (`lat, lon, azi, rk`), all in `degrees` where `azi` is the azimuth of easting direction and `rk` the reciprocal of azimuthal northing scale.

### toStr(self, prec=6, sep=`'``` `'`) |
Return a string representation of this projection. Parameters: `prec` - Optional number of decimal, unstripped (`int`). `sep` - Optional separator to join (`str`). Returns: This projection as `"lat0 lon0"` (`str`). Overrides: bases._Based.toStr

### toStr2(self, prec=6) |
Return a string representation of this projection. Parameters: `prec` - Optional number of decimals, unstripped (`int`). Returns: This projection as `"<classname>(lat0, lon0, ...)"` (`str`). Overrides: bases._Based.toStr2

Property Details

### datum Get the datum (Datum). Get Method: datum(self) - Get the datum (Datum). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### flattening Get the geodesic's flattening (`float`). Get Method: flattening(self) - Get the geodesic's flattening (`float`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### geodesic Get this projection's Geodesic, provided package geographiclib is installed. Get Method: geodesic(self) - Get this projection's Geodesic, provided package geographiclib is installed. Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### lat0 Get the center latitude (`degrees90`). Get Method: lat0(self) - Get the center latitude (`degrees90`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### latlon0 Get the center lat- and longitude (`degrees90`, `degrees180`). Get Method: latlon0(self) - Get the center lat- and longitude (`degrees90`, `degrees180`). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### lon0 Get the center longitude (`degrees180`). Get Method: lon0(self) - Get the center longitude (`degrees180`). Set Method: Read_Only(self, ignored) - 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: Read_Only(self, ignored) - Throws an `AttributeError`, always.