geo-registry

turf.lineOffset

How Turf.js runs Offset Curve: turf.lineOffset.

About this implementation
Engine Turf.js
Tool name turf.lineOffset
Interface js
Implements Offset Curve
Documentation Not stated
Effects modifies input: no, network: no
Notes From @turf/line-offset.
Status active

Parameters

Name Type Required Default Choices Note
geojson Feature<T> | T yes Not stated Not stated Not stated
distance number 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
distance distance Not stated
unit options.units m = meters; ft = feet; km = kilometers; mi = miles. not supported: us-ft

Differences from the operation

  • A positive distance offsets to the right of the line's direction, the opposite of the canonical convention; negate it.
  • units defaults to kilometers.
  • 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.