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

# Module named

(INTERNAL) Classes `_Named`, `_NamedDict`, `_NamedInt`, `_NamedStr` and `_NamedTuple` 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.02.22

Classes
| Neighbors8Dict 8-Dict `(N, NE, E, SE, S, SW, W, NW)` of Geohashes, providing key and attribute access to the items.
| 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.
| ClipCS3Tuple 3-Tuple `(start, end, index)` for each edge of a clipped path with the `start` and `end` points (`LatLon`) of the portion of the edge inside or on the clip box and the `index` (`int`) of the edge in the original path.
| ClipSH3Tuple 3-Tuple `(start, end, original)` for each edge of a clipped polygon, the `start` and `end` points (`LatLon`) of the portion of the edge inside or on the clip region and the `original` indicates whether the edge is part of the original polygon or part of the clip region (`bool`).
| Curvature2Tuple 2-Tuple `(meridional, prime_vertical)` of radii of curvature, both in `meter`.
| Destination2Tuple 2-Tuple `(destination, final)`, `destination` in `LatLon` and `final` bearing in compass `degrees360`.
| 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`.
| EasNorAziRk4Tuple 4-Tuple `(easting, northing, azimuth, reciprocal)` for the Cassini-Soldner location with `easting` and `northing` in `meters`, the `azimuth` of easting direction azimuth and `reciprocal` the reciprocal of azimuthal northing scale reciprocal, both in `degrees`.
| EasNorExact4Tuple 4-Tuple `(easting, northing, convergence, scale)` in `meter`, `meter`, {degrees} and `scalar`.
| EasNorRadius3Tuple 3-Tuple `(easting, northing, radius)`, all in `meter`.
| Elevation2Tuple 2-Tuple `(elevation, data_source)` in `meter` and `str`.
| GeoidHeight2Tuple 2-Tuple `(height, model_name)`, geoid `height` in `meter` and `model_name` as `str`.
| GeoidHeight5Tuple 5-Tuple `(lat, lon, egm84, egm96, egm2008)` for GeoidHeights.dat tests with the heights for 3 different EGM grids with `-90.0 <= lat <= 90.0` and `-180.0 <= lon <= 180.0` degrees (and `lon` converted from the original `0.0 <= EasterLon <= 360.0`).
| LatLon2Tuple 2-Tuple `(lat, lon)` in `degrees[90]` and `degrees[180]`.
| LatLon3Tuple 3-Tuple `(lat, lon, height)` in `degrees[90]`, `degrees[180]` and `meter`.
| LatLon4Tuple 4-Tuple `(lat, lon, height, datum)` in `degrees90`, `degrees180`, `meter` and Datum.
| LatLonAziRk4Tuple 4-Tuple `(lat, lon, azimuth, reciprocal)`, all in `degrees` where `azimuth` is the azimuth of easting direction and `reciprocal` the reciprocal of azimuthal northing scale.
| LatLonDatum3Tuple 3-Tuple `(lat, lon, datum)` in `degrees[90]`, `degrees[180]` and Datum.
| LatLonDatum5Tuple 5-Tuple `(lat, lon, datum, convergence, scale)` in `degrees[90]`, `degrees[180]`, Datum, {degrees} and `float`.
| LatLonExact4Tuple 4-Tuple `(lat, lon, convergence, scale)` in `degrees180`, `degrees`, `degrees` and `scalar`.
| 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).
| Mgrs4Tuple 4-Tuple `(zone, digraph, easting, northing)`, `zone` and `digraph` as `str`, `easting` and `northing` in `meter`.
| Mgrs6Tuple 6-Tuple `(zone, digraph, easting, northing, band, datum)`, `zone`, `digraph` and `band` as `str`, `easting` and `northing` in `meter` and `datum` a Datum.
| 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`.
| NearestOn5Tuple 5-Tuple `(lat, lon, distance, angle, height)` all in `degrees`, except `height`.
| Ned3Tuple 3-Tuple `(north, east, down)`, all in `degrees`.
| 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`.
| Point3Tuple 3-Tuple `(x, y, ll)` in `meter`, `meter` and `LatLon`.
| Points2Tuple 2-Tuple `(number, points)` with the `number` of points and -possible reduced- `list` or `tuple` of `points`.
| Shape2Tuple 2-Tuple `(nrows, ncols)`, the number of rows and columns, both `int`.
| UtmUps2Tuple 2-Tuple `(zone, hemipole)` as `int` and `str`, where `zone` is `1..60` for UTM or `0` for UPS and `hemipole` `'N'|'S'` is the UTM hemisphere or the UPS pole.
| UtmUps4Tuple 4-Tuple `(zone, hemipole, easting, northing)` as `str`, `str`, `meter` and `meter`.
| UtmUps5Tuple 5-Tuple `(zone, hemipole, easting, northing, band)` as `int`, `str`, `meter`, `meter` and `band` letter, where `zone` is `1..60` for UTM or `0` for UPS, `hemipole` `'N'|'S'` is the UTM hemisphere or the UPS pole and {band} is `""` or the (longitudinal) UTM band `'C'|'D'..'W'|'X'` or the (polar) UPS band `'A'|'B'|'Y'|'Z'`.
| UtmUps8Tuple 8-Tuple `(zone, hemipole, easting, northing, band, datum, convergence, scale)` as `int`, `str`, `meter`, `meter`, `band` letter, `Datum`, `degrees` and `float`, where `zone` is `1..60` for UTM or `0` for UPS, `hemipole` `'N'|'S'` is the UTM hemisphere or the UPS pole and {band} is `""` or the (longitudinal) UTM band `'C'|'D'..'W'|'X'` or the (polar) UPS band `'A'|'B'|'Y'|'Z'`.
| UtmUpsLatLon5Tuple 5-Tuple `(zone, band, hemipole, lat, lon)` as `int`, `str`, `str`, `degrees90` and `degrees180`, where `zone` is `1..60` for UTM or `0` for UPS, {band} is `""` or the (longitudinal) UTM band `'C'|'D'..'W'|'X'` or (polar) UPS band `'A'|'B'|'Y'|'Z'` and `hemipole` `'N'|'S'` is the UTM hemisphere or the UPS pole.
| 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
classname(inst, prefixed=None) Return the instance' class name optionally prefixed with the module name. |
classnaming(prefixed=None) Get/set the default naming for `[module.]class` names. |
inStr(inst, *args, **kwds) Return the string representation of an instance. |
nameof(inst) Get the name of an instance. |

Function Details

### classname(inst, prefixed=None) |
Return the instance' class name optionally prefixed with the module name. Parameters: `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 naming for `[module.]class` names. Parameters: `prefixed` - Include the module name (`bool`). Returns: Previous class naming setting (`bool`).

### inStr(inst, *args, **kwds) |
Return the string representation of an instance. Parameters: `inst` - The instance (any `type`). `args` - Optional positional arguments. `kwds` - Optional keyword arguments. Returns: The `inst`'s representation (`str`).

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