Package pygeodesy :: Module points :: Class LatLon_ |
[frames] | no frames]

# Class LatLon_

    object --+
             |
            LatLon_

Known Subclasses:
  - clipy._LLi_

Low-overhead `LatLon` class for Numpy2LatLon and Tuple2LatLon.

Instance Methods
__init__(self, lat, lon, name=`'````'`, height=0) Creat a new, mininal, low-overhead LatLon_ instance, without heigth and datum. |
__eq__(self, other) |
__ne__(self, other) |
__repr__(self) repr(x) |
__str__(self) str(x) |
classof(self, *args, **kwds) Instantiate this very class. |
copy(self, deep=False) Make a shallow or deep copy of this instance. |
others(self, other, name=`'``other``'`) Check this and an other instance for type compatiblility. |
points(self, points, closed=False, base=None) DEPRECATED, use method `points2`. |
points2(self, points, closed=False, base=None) Check a path or polygon represented by points. |
to2ab(self) DEPRECATED, use property `philam`. |
toNvector(self, h=None, Nvector=<class 'pygeodesy.nvectorBase.NvectorBase'>, **kwds) Convert this point to `n-vector` (normal to the earth's surface) components, including height. |
toStr(self, form=`'``d``'`, prec=6, sep=`'``,` `'`, **kwds) This LatLon_ as a string "<degrees>, <degrees>". |
toStr2(self, **kwds) This LatLon_ as a string "class(<degrees>, ...)". |
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| latlon An immutable property (`Read Only`).
| latlonheight An immutable property (`Read Only`).
| philam An immutable property (`Read Only`).
| philamheight An immutable property (`Read Only`).
| height
| lat
| lon
| name
Inherited from `object`: `__class__`

Method Details

### __init__(self, lat, lon, name=`'````'`, height=0) (Constructor) |
Creat a new, mininal, low-overhead LatLon_ instance, without heigth and datum. Parameters: `lat` - Latitude (`degrees`). `lon` - Longitude (`degrees`). `name` - Optional name (`str`). Overrides: object.__init__ Note: The lat- and longitude are taken as-given, un-clipped and un-validated .

### __repr__(self) (Representation operator) |
repr(x) Overrides: object.__repr__ (inherited documentation)

### __str__(self) (Informal representation operator) |
str(x) Overrides: object.__str__ (inherited documentation)

### classof(self, *args, **kwds) |
Instantiate this very class. Parameters: `args` - Optional, positional arguments. `kwds` - Optional, keyword arguments. Returns: New instance (`self.__class__`).

### copy(self, deep=False) |
Make a shallow or deep copy of this instance. Parameters: `deep` - If `True` make a deep, otherwise a shallow copy (`bool`). Returns: The copy (`This class` or subclass thereof).

### others(self, other, name=`'``other``'`) |
Check this and an other instance for type compatiblility. Parameters: `other` - The other instance (any `type`). `name` - Optional, name for other (`str`). Returns: `None`. Raises: `TypeError` - Incompatible `other` `type`.

### points2(self, points, closed=False, base=None) |
Check a path or polygon represented by points. Parameters: `points` - The path or polygon points (`LatLon`[]) `closed` - Optionally, consider the polygon closed, ignoring any duplicate or closing final `points` (`bool`). `base` - Optionally, check all `points` against this base class, if `None` don't check. Returns: A Points2Tuple`(number, points)` with the number of points and the points `list` or `tuple`. Raises: `TypeError` - Some `points` are not `base`. `ValueError` - Insufficient number of `points`.

### to2ab(self) |
DEPRECATED, use property `philam`. Returns: A PhiLam2Tuple`(phi, lam)`.

### toNvector(self, h=None, Nvector=<class 'pygeodesy.nvectorBase.NvectorBase'>, **kwds) |
Convert this point to `n-vector` (normal to the earth's surface) components, including height. Parameters: `h` - Optional height, overriding this point's height (`meter`). `Nvector` - Optional (sub-)class to return the `n-vector` components (`Nvector`) or `None`. `kwds` - Optional, additional `Nvector` keyword arguments, ignored if `Nvector=None`. Returns: A `Nvector` or an Vector4Tuple`(x, y, z, h)` if `Nvector=None`. Raises: `TypeError` - Invalid `Nvector` or `kwds`.

### toStr(self, form=`'``d``'`, prec=6, sep=`'``,` `'`, **kwds) |
This LatLon_ as a string "<degrees>, <degrees>". Parameters: `form` - Optional format, F_D, F_DM, F_DMS for deg°, deg°min′, deg°min′sec″ (`str`). `prec` - Optional number of decimal digits (0..8 or `None`). `sep` - Optional separator to join (`str`). `kwds` - Optional, keyword arguments. Returns: Instance (`str`).

### toStr2(self, **kwds) |
This LatLon_ as a string "class(<degrees>, ...)". Parameters: `kwds` - Optional, keyword arguments. Returns: Class instance (`str`).

Property Details

### latlon An immutable property (`Read Only`). Get Method: latlon(self) - Get the lat- and longitude in `degrees` (LatLon2Tuple`(lat, lon)`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### latlonheight An immutable property (`Read Only`). Get Method: latlonheight(self) - Get the lat-, longitude and height (LatLon3Tuple`(lat, lon, height)`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### philam An immutable property (`Read Only`). Get Method: philam(self) - Get the lat- and longitude in `radians` (PhiLam2Tuple`(phi, lam)`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.

### philamheight An immutable property (`Read Only`). Get Method: philamheight(self) - Get the lat-, longitude in `radians` and height (PhiLam3Tuple`(phi, lam, height)`). Set Method: immutable(inst, value) - Throws an `AttributeError`, always.