LocalFrame

class geodetic_engine.welltrajectory.LocalFrame[source]

Bases: object

The wellhead, and the CRS and datum a trajectory is placed in.

Built once per trajectory so that no method re-derives it.

crs

The trajectory CRS, as given.

horizontal_crs

Its horizontal part in 2D, unwrapped from any binding; its coordinate values are crs’s horizontal ones.

geographic_crs

The CRS’s own geodetic CRS. Every method stays on this datum, so no datum transformation is ever applied.

wellhead

The wellhead’s (x, y) in crs.

longitude

Wellhead longitude in degrees from the datum’s own prime meridian.

latitude

Wellhead latitude in degrees.

height

Wellhead elevation in metres.

factors

Grid convergence and scale factor at the wellhead.

classmethod at(crs, x, y, height)[source]

Build the frame for a wellhead at (x, y) in crs, height m up.

Return type:

LocalFrame

property semi_axes: tuple[float, float]

The datum ellipsoid’s semi-major and semi-minor axes, in metres.

property horizontal_unit: float

Metres, or radians if geographic, per unit of the first horizontal axis.

to_crs(longitude, latitude)[source]

Geographic degrees on the frame’s datum, as (n, 2) CRS values.

Return type:

FloatArray

__init__(crs, horizontal_crs, geographic_crs, wellhead, longitude, latitude, height, factors)