Function GeocentricCoordinate.fromComponents

Construct from finite X/Y/Z components.

static GeocentricCoordinate fromComponents(
  const T x,
  const T y,
  const T z
) @safe;

Parameters

NameDescription
x Finite geocentric X component.
y Finite geocentric Y component.
z Finite geocentric Z component.

Returns

The constructed coordinate.

Throws

GeodesyValueException when any component is NaN or infinite.

Example

Example constructing an ECEF coordinate.

import geodesy;
const point = GeocentricCoordinate!double.fromComponents(
    4_085_000.0, 1_260_000.0, 4_717_000.0);
assert(point.z == 4_717_000.0);
}

/** Geocentric X component. */
@property T x() const pure nothrow @safe @nogc { return _x;