geo-registry

turf.length

How Turf.js runs Measure Length: turf.length.

About this implementation
Engine Turf.js
Tool name turf.length
Interface js
Implements Measure Length
Documentation Not stated
Effects modifies input: no, network: no
Notes From @turf/length.
Status active

Parameters

Name Type Required Default Choices Note
geojson Feature<any> | FeatureCollection<any> | GeometryCollection yes Not stated Not stated Not stated
options { units?: Units; } no Not stated Not stated Not stated
options.units Units no Not stated Not stated field of options

How it maps to the operation

Operation parameter Parameter here Note
layer geojson Not stated
unit options.units m = meters; ft = feet; km = kilometers; mi = miles. not supported: us-ft

Differences from the operation

  • units defaults to kilometers, so pass the unit even when it is the canonical default (metres); one total for all features.
  • Turf works on GeoJSON in longitude/latitude (WGS 84); data in another CRS must be reprojected first.

Harvested by the turf harvester from engine version 7.4.0. Names can change when an engine is harvested again.