Package pygeodesy :: Module named |
[frames] | no frames]

# Module named

(INTERNAL) Classes `_Named`, `_NamedDict` and `_NamedTuple`, all with nameable instances and several subclasses thereof.

In addition, the items in a `_NamedDict` are accessable as attributes and the items in a `_NamedTuple` can be named to be accessable as attributes, similar to standard Python `namedtuple`s.

Results previously returned as tuples by `pygeodesy` functions and class methods are now instances of some `...Tuple` class, all sub-classes of `_NamedTuple` defined here.

Version: 20.08.12

Classes
| _Named (INTERNAL) Root class for named objects.
| _NamedBase (INTERNAL) Base class with name.
| _NamedEnum (INTERNAL) Enum-like `_NamedDict` with attribute access restricted to valid keys.
| _NamedEnumItem (INTERNAL) Base class for items in a `_NamedEnum` registery.
| Bearing2Tuple 2-Tuple `(initial, final)` bearings, both in compass `degrees360`.
| Bounds2Tuple 2-Tuple `(latlonSW, latlonNE)` with the bounds' lower-left and upper-right corner as `LatLon` instance.
| Bounds4Tuple 4-Tuple `(latS, lonW, latN, lonE)` with the bounds' lower-left `(LatS, LowW)` and upper-right `(latN, lonE)` corner lat- and longitudes.
| Destination2Tuple 2-Tuple `(destination, final)`, `destination` in `LatLon` and `final` bearing in compass `degrees360`.
| Destination3Tuple 3-Tuple `(lat, lon, final)`, destination `lat`, `lon` in and `final` bearing in `degrees`.
| Distance2Tuple 2-Tuple `(distance, initial)`, `distance` in `meter` and `initial` bearing in compass `degrees360`.
| Distance3Tuple 3-Tuple `(distance, initial, final)`, `distance` in `meter` and `initial` and `final` bearing, both in compass `degrees360`.
| Distance4Tuple 4-Tuple `(distance2, delta_lat, delta_lon, unroll_lon2)` with the distance in `degrees squared`, the latitudinal `delta_lat` = `lat2`-`lat1`, the wrapped, unrolled and adjusted longitudinal `delta_lon` = `lon2`-`lon1` and the `unroll_lon2` unrollment for `lon2`.
| EasNor2Tuple 2-Tuple `(easting, northing)`, both in `meter`.
| EasNor3Tuple 3-Tuple `(easting, northing, height)`, all in `meter`.
| LatLon2Tuple 2-Tuple `(lat, lon)` in `degrees90` and `degrees180`.
| LatLon3Tuple 3-Tuple `(lat, lon, height)` in `degrees90`, `degrees180` and `meter`.
| LatLon4Tuple 4-Tuple `(lat, lon, height, datum)` in `degrees90`, `degrees180`, `meter` and Datum.
| LatLonDatum3Tuple 3-Tuple `(lat, lon, datum)` in `degrees90`, `degrees180` and Datum.
| LatLonPrec3Tuple 3-Tuple `(lat, lon, precision)` in `degrees`, `degrees` and `int`.
| LatLonPrec5Tuple 5-Tuple `(lat, lon, precision, height, radius)` in `degrees`, `degrees`, `int` and `height` or `radius` in `meter` (or `None` if missing).
| NearestOn3Tuple 3-Tuple `(closest, distance, angle)` of the `closest` point on the polygon, either a `LatLon` instance or a LatLon3Tuple`(lat, lon, height)` and the `distance` and `angle` to the `closest` point are in `meter` respectively compass `degrees360`.
| PhiLam2Tuple 2-Tuple `(phi, lam)` with latitude `phi` in `radians[PI_2]` and longitude `lam` in `radians[PI]`.
| PhiLam3Tuple 3-Tuple `(phi, lam, height)` with latitude `phi` in `radians[PI_2]`, longitude `lam` in `radians[PI]` and `height` in `meter`.
| PhiLam4Tuple 4-Tuple `(phi, lam, height, datum)` with latitude `phi` in `radians[PI_2]`, longitude `lam` in `radians[PI]`, `height` in `meter` and Datum.
| Points2Tuple 2-Tuple `(number, points)` with the `number` of points and -possible reduced- `list` or `tuple` of `points`.
| Vector3Tuple 3-Tuple `(x, y, z)` of (geocentric) components, all in `meter` or `units`.
| Vector4Tuple 4-Tuple `(x, y, z, h)` of (geocentric) components, all in `meter` or `units`.

Functions
callername(up=1, dflt=`'````'`, source=False) Get the name of the calling callable. |
classname(inst, prefixed=None) Return the instance' class name optionally prefixed with the module name. |
classnaming(prefixed=None) Get/set the default class naming for `[module.]class` names. |
modulename(clas, prefixed=None) Return the class name optionally prefixed with the module name. |
nameof(inst) Get the name of an instance. |
notImplemented(inst, name, *args, **kwds) Raise a `NotImplementedError` for a missing method or property. |
notOverloaded(inst, name, *args, **kwds) Raise an `AssertionError` for a method or property not overloaded. |

Variables
| __all__ = `_ALL_LAZY.named`

Function Details

### callername (up=1, dflt=`'````'`, source=False) |
Get the name of the calling callable. Arguments: `up` - Number of call stack frames up (`int`). `dflt` - Default return value (`any`). `source` - Include source file name and line number (`bool`). Returns: Name of the non-internal callable (`str`) or `dflt` if none found.

### classname (inst, prefixed=None) |
Return the instance' class name optionally prefixed with the module name. Arguments: `inst` - The object (any `type`). `prefixed` - Include the module name (`bool`), see function `classnaming`. Returns: The `inst`'s `[module.]class` name (`str`).

### classnaming (prefixed=None) |
Get/set the default class naming for `[module.]class` names. Arguments: `prefixed` - Include the module name (`bool`). Returns: Previous class naming setting (`bool`).

### modulename (clas, prefixed=None) |
Return the class name optionally prefixed with the module name. Arguments: `clas` - The class (any `class`). `prefixed` - Include the module name (`bool`), see function `classnaming`. Returns: The `class`'s `[module.]class` name (`str`).

### nameof (inst) |
Get the name of an instance. Arguments: `inst` - The object (any `type`). Returns: The instance' name (`str`) or `""`.

### notImplemented (inst, name, *args, **kwds) |
Raise a `NotImplementedError` for a missing method or property. Arguments: `inst` - Instance (`any`). `name` - Method, property or name (`str` or `callable`). `args` - Method or property positional arguments (any `type`s). `kwds` - Method or property keyword arguments (any `type`s).

### notOverloaded (inst, name, *args, **kwds) |
Raise an `AssertionError` for a method or property not overloaded. Arguments: `inst` - Instance (`any`). `name` - Method, property or name (`str` or `callable`). `args` - Method or property positional arguments (any `type`s). `kwds` - Method or property keyword arguments (any `type`s).