Skip to main content

geometryLength

The length of a geometry in metres, along the ground. A line is its length, a polygon its perimeter, holes included, and a collection the sum of its members. A point, and any empty geometry, has no length. It sums the same per-line measure as measureLineDistance, so the two agree.

This is a function exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import { geometryLength } from "@mapcairn/core";

function geometryLength(input: GeometryInput): number;

Parameters​

  • input (GeometryInput)

Returns​

number

Throws​

  • GeometryError of kind invalid for a malformed geometry.

See also​

Source: packages/core/src/geometry/queries.ts:191