Package pygeodesy :: Module sphericalBase :: Class LatLonSphericalBase |
[frames] | no frames]

# Class LatLonSphericalBase

        object --+
                 |
       bases.Named --+
                     |
           bases.Based --+
                         |
    bases.LatLonHeightBase --+
                             |
                            LatLonSphericalBase

Known Subclasses:
  - sphericalNvector.LatLon
  - , sphericalTrigonometry.LatLon

(INTERNAL) Base class for spherical Latlons.

Instance Methods
finalBearingTo(self, other, wrap=False) Return the final bearing (reverse azimuth) from this to an other point. |
maxLat(self, bearing) Return the maximum latitude reached when travelling on a great circle on given bearing from this point (based on 'Clairaut's formula'). |
minLat(self, bearing) Return the minimum latitude reached when travelling on a great circle on given bearing from this point. |
parse(self, strll, height=0, sep=`'``,``'`) Parse a string representing lat-/longitude point and return a LatLon. |
rhumbBearingTo(self, other) Return the initial bearing (forward azimuth) from this to an other point along a rhumb (loxodrome) line. |
rhumbDestination(self, distance, bearing, radius=6371008.77141, height=None) Return the destination point having travelled along a rhumb (loxodrome) line from this point the given distance on the given bearing. |
rhumbDistanceTo(self, other, radius=6371008.77141) Return the distance from this to an other point along a rhumb (loxodrome) line. |
rhumbMidpointTo(self, other, height=None) Return the (loxodromic) midpoint between this and an other point. |
toWm(self, radius=6378137.0) Convert this LatLon point to a WM coordinate. |
Inherited from `bases.LatLonHeightBase`: `__eq__`, `__init__`, `__ne__`, `__str__`, `antipode`, `bounds`, `copy`, `equals`, `equals3`, `isantipode`, `points`, `to2ab`, `to3llh`, `to3xyz`, `toStr` Inherited from `bases.Based`: `__repr__`, `classof`, `others`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| datum Get this point's datum (Datum).
| isEllipsoidal Check whether this LatLon is ellipsoidal (bool).
| isSpherical Check whether this LatLon is spherical (bool).
Inherited from `bases.LatLonHeightBase`: `height`, `lat`, `latlon`, `lon` Inherited from `bases.Named`: `classname`, `classnaming`, `name` Inherited from `object`: `__class__`

Method Details

### finalBearingTo(self, other, wrap=False) |
Return the final bearing (reverse azimuth) from this to an other point. Parameters: `other` - The other point (spherical LatLon). `wrap` - Optionally, unroll the longitudinal delta within the -180..+180 range (bool). Returns: Final bearing (compass degrees). Raises: `TypeError` - The other point is not spherical. Example:
    >>> p = LatLon(52.205, 0.119)
    >>> q = LatLon(48.857, 2.351)
    >>> b = p.finalBearingTo(q)  # 157.9

### maxLat(self, bearing) |
Return the maximum latitude reached when travelling on a great circle on given bearing from this point (based on 'Clairaut's formula'). The maximum latitude is independent of longitude, it is the same for all points on a given latitude. Negate the result for the minimum latitude (on the Southern hemisphere). Parameters: `bearing` - Initial bearing (compass degrees). Returns: Maximum latitude (degrees90). JS name: maxLatitude.

### minLat(self, bearing) |
Return the minimum latitude reached when travelling on a great circle on given bearing from this point. See method maxLat for more details. Parameters: `bearing` - Initial bearing (compass degrees). Returns: Minimum latitude (degrees90). JS name: minLatitude.

### parse(self, strll, height=0, sep=`'``,``'`) |
Parse a string representing lat-/longitude point and return a LatLon. The lat- and longitude must be separated by a sep[arator] character. If height is present it must follow and be separated by another sep[arator]. Lat- and longitude may be swapped, provided at least one ends with the proper compass direction. For more details, see functions parse3llh and parseDMS in module dms. Parameters: `strll` - Lat, lon [, height] (string). `height` - Optional , default height (meter). `sep` - Optional separator (string). Returns: The point (spherical LatLon). Raises: `ValueError` - Invalid strll.

### rhumbBearingTo(self, other) |
Return the initial bearing (forward azimuth) from this to an other point along a rhumb (loxodrome) line. Parameters: `other` - The other point (spherical LatLon). Returns: Initial bearing (compass degrees). Raises: `TypeError` - The other point is not spherical. Example:
    >>> p = LatLon(51.127, 1.338)
    >>> q = LatLon(50.964, 1.853)
    >>> b = p.rhumbBearingTo(q)  # 116.7

### rhumbDestination(self, distance, bearing, radius=6371008.77141, height=None) |
Return the destination point having travelled along a rhumb (loxodrome) line from this point the given distance on the given bearing. Parameters: `distance` - Distance travelled (same units as radius). `bearing` - Bearing from this point (compass degrees). `radius` - Optional, mean earth radius (meter). `height` - Optional height, overriding the default height (meter or same unit as radius). Returns: The destination point (spherical LatLon). Example:
    >>> p = LatLon(51.127, 1.338)
    >>> q = p.rhumbDestination(40300, 116.7)  # 50.9642°N, 001.8530°E
JS name: rhumbDestinationPoint

### rhumbDistanceTo(self, other, radius=6371008.77141) |
Return the distance from this to an other point along a rhumb (loxodrome) line. Parameters: `other` - The other point (spherical LatLon). `radius` - Optional mean radius of earth (scalar, default meter). Returns: Distance (in the same units as radius). Raises: `TypeError` - The other point is not spherical. Example:
    >>> p = LatLon(51.127, 1.338)
    >>> q = LatLon(50.964, 1.853)
    >>> d = p.rhumbDistanceTo(q)  # 403100

### rhumbMidpointTo(self, other, height=None) |
Return the (loxodromic) midpoint between this and an other point. Parameters: `other` - The other point (spherical LatLon). `height` - Optional height, overriding the mean height (meter or same unit as radius). Returns: The midpoint (spherical LatLon). Raises: `TypeError` - The other point is not spherical. Example:
    >>> p = LatLon(51.127, 1.338)
    >>> q = LatLon(50.964, 1.853)
    >>> m = p.rhumb_midpointTo(q)
    >>> m.toStr()  # '51.0455°N, 001.5957°E'

### toWm(self, radius=6378137.0) |
Convert this LatLon point to a WM coordinate. See function toWm in module webmercator for details. Parameters: `radius` - Optional earth radius (meter). Returns: The WM coordinate (Wm).

Property Details

### datum Get this point's datum (Datum). Get Method: datum(self) - Get this point's datum (Datum). Set Method: datum(self, datum) - Set this point's datum without conversion.

### isEllipsoidal Check whether this LatLon is ellipsoidal (bool). Get Method: isEllipsoidal(self) - Check whether this LatLon is ellipsoidal (bool). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.

### isSpherical Check whether this LatLon is spherical (bool). Get Method: isSpherical(self) - Check whether this LatLon is spherical (bool). Set Method: Read_Only(self, ignored) - Throws an `AttributeError`, always.