Struct GeodesicSegmentNearestResult

Result of nearest-point evaluation on a bounded geodesic segment.

struct GeodesicSegmentNearestResult(T)
  
if (isGeodesyScalar!T);

nearestPoint and nearestDistance belong to the finite segment. supportingFoot, alongTrack, and signedCrossTrack belong to the local oriented supporting geodesic through A->B.

.init is invalid.

Properties

NameTypeDescription
alongTrack[get] TSigned distance from A to supportingFoot along the A->B geodesic.
isValid[get] boolTrue for a successfully computed nearest-point result.
kind[get] GeodesicSegmentNearestKindWhether the bounded nearest point is A, interior, or B.
nearestDistance[get] TUnsigned distance from target to nearestPoint.
nearestPoint[get] GeographicCoordinate!TTrue nearest point on the bounded segment.
signedCrossTrack[get] TSigned perpendicular distance from the supporting geodesic to target.
supportingFoot[get] GeographicCoordinate!TLocal perpendicular intercept on the oriented supporting geodesic.

Example

Example using the nearest-result type.

GeodesicSegmentNearestResult!double result;
assert(!result.isValid);