Skip to main content

Function: pathLengthMeters()

function pathLengthMeters(points): number;

Defined in: packages/core/src/expr/functions.ts:978

Great-circle length of a path, in metres. The implementation behind REL's distance(), exported because a renderer showing a live length while an enumerator walks a boundary must compute it the same way the form's own expressions will (docs/14 §4.3) — two implementations of a haversine is two chances for the number on screen to disagree with the number in the data.

A single point is a zero-length path, as in ODK.

Parameters

ParameterType
pointsreadonly LatLng[]

Returns

number