BinGridCorners¶
- class geodetic_engine.bingrid.BinGridCorners[source]¶
Bases:
objectThe four corners A, B, C and D of a bin grid, labelled by their numbers.
Build with
from_corners(), which takes the corners in any order.- a¶
(min inline, min crossline).
- b¶
(min inline, max crossline).
- c¶
(max inline, min crossline).
- d¶
(max inline, max crossline).
- Raises:
InvalidCornersError – On construction, if the corners’ numbers are not those of A, B, C and D.
- classmethod from_corners(corners)[source]¶
Label four corners given in any order.
- Parameters:
corners (
Iterable[BinGridCorner|tuple[int,int,float,float]]) – Exactly four corners, each aBinGridCorneror an(inline, crossline, easting, northing)tuple.- Return type:
- Returns:
The corners as A, B, C and D.
- Raises:
InvalidCornersError – If there are not exactly four, or their inline and crossline numbers are not two distinct values each in all four combinations.
- labelled()[source]¶
The corners with their labels, in order A, B, C, D.
- Return type:
tuple[tuple[str,BinGridCorner],...]
- property coordinates: NDArray[float64]¶
Coordinates of A, B, C and D as an array of shape
(4, 2).
- property numbers: NDArray[float64]¶
Inline and crossline numbers of A, B, C and D, shape
(4, 2).
- with_coordinates(coordinates)[source]¶
The same corners at other coordinates.
- __init__(a, b, c, d)¶